mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
*Fix sniper training - by Astellar.
*Correct GO delete call in Gameobject::Update. --HG-- branch : trunk
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user