diff options
author | megamage <none@none> | 2008-11-21 10:07:11 -0600 |
---|---|---|
committer | megamage <none@none> | 2008-11-21 10:07:11 -0600 |
commit | 71707df1dec2aa77864d9a853c34108bb6021138 (patch) | |
tree | 2c1825c5965d15a41c6000ae0ddd4dc911713dd2 /src/game/SpellHandler.cpp | |
parent | 5528b7c512ef7968b11ea93a48364a58b629b18b (diff) |
*Let creature search nearby target before enter evade mode
*Add function canStartAttack to reduce code in MoveInLineOfSight
*Fix a bug that cancelling bind sight auras may crash the server
--HG--
branch : trunk
Diffstat (limited to 'src/game/SpellHandler.cpp')
-rw-r--r-- | src/game/SpellHandler.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/game/SpellHandler.cpp b/src/game/SpellHandler.cpp index 0e318eb5ddc..07d8b18b543 100644 --- a/src/game/SpellHandler.cpp +++ b/src/game/SpellHandler.cpp @@ -368,10 +368,11 @@ void WorldSession::HandleCancelAuraOpcode( WorldPacket& recvPacket) spellInfo->EffectApplyAuraName[i] == SPELL_AURA_MOD_CHARM || spellInfo->EffectApplyAuraName[i] == SPELL_AURA_BIND_SIGHT) { + // Fix me: creature may be killed during player aura cancel _player->RemoveAurasDueToSpellByCancel(spellId); if (_player->GetCharm()) _player->GetCharm()->RemoveAurasDueToSpellByCancel(spellId); - else if (_player->GetFarsightTarget()->GetTypeId() != TYPEID_DYNAMICOBJECT) + else if (_player->GetFarsightTarget() && _player->GetFarsightTarget()->GetTypeId() != TYPEID_DYNAMICOBJECT) ((Unit*)_player->GetFarsightTarget())->RemoveAurasDueToSpellByCancel(spellId); return; } |