*Fix sniper training - by Astellar.

*Correct GO delete call in Gameobject::Update.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-07-12 13:38:38 +02:00
parent 2750d95a5d
commit 04a39ce6df
2 changed files with 35 additions and 12 deletions

View File

@@ -432,10 +432,11 @@ void GameObject::Update(uint32 /*p_time*/)
if(GetOwnerGUID())
{
if(Unit* owner = GetOwner())
{
owner->RemoveGameObject(this, false);
SetRespawnTime(0);
Delete();
SetRespawnTime(0);
Delete();
}
return;
}

View File

@@ -2242,11 +2242,33 @@ void AuraEffect::TriggerSpell()
}
break;
}
case SPELLFAMILY_HUNTER:
{
switch (auraId)
{
// Sniper training
case 53302:
case 53303:
case 53304:
if (m_target->GetTypeId() != TYPEID_PLAYER)
return;
// case SPELLFAMILY_HUNTER:
// {
// switch(auraId)
// {
if (((Player*)m_target)->isMoving())
{
m_amount = m_target->CalculateSpellDamage(m_spellProto,m_effIndex,m_currentBasePoints,m_target);
return;
}
// We are standing at the moment
if (m_amount > 0)
{
--m_amount;
return;
}
trigger_spell_id = 64418 + auraId - 53302;
break;
// //Frost Trap Aura
// case 13810:
// return;
@@ -2273,11 +2295,11 @@ void AuraEffect::TriggerSpell()
// case 30648: // Tame Greater Timberstrider
// case 30652: // Tame Nightstalker
// return;
// default:
// break;
// }
// break;
// }
default:
break;
}
break;
}
case SPELLFAMILY_SHAMAN:
{
switch(auraId)