*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
This commit is contained in:
megamage committed 2008-11-21 10:07:11 -06:00
1 parent 5528b7c512
commit 71707df1de
6 files changed
+53 -38

No files matched your search

+2 -1
View File
@@ -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;
}