*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:
1 parent
5528b7c512
commit
71707df1de
6 files changed
+53
-38
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user