Show
Ignore:
Timestamp:
11/21/08 16:54:14 (17 years ago)
Author:
yumileroy
Message:

*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

Original author: megamage
Date: 2008-11-21 10:07:11-06:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/SpellHandler.cpp

    r260 r267  
    369369                spellInfo->EffectApplyAuraName[i] == SPELL_AURA_BIND_SIGHT) 
    370370            { 
     371                // Fix me: creature may be killed during player aura cancel 
    371372                _player->RemoveAurasDueToSpellByCancel(spellId); 
    372373                if (_player->GetCharm()) 
    373374                    _player->GetCharm()->RemoveAurasDueToSpellByCancel(spellId); 
    374                 else if (_player->GetFarsightTarget()->GetTypeId() != TYPEID_DYNAMICOBJECT) 
     375                else if (_player->GetFarsightTarget() && _player->GetFarsightTarget()->GetTypeId() != TYPEID_DYNAMICOBJECT) 
    375376                    ((Unit*)_player->GetFarsightTarget())->RemoveAurasDueToSpellByCancel(spellId); 
    376377                return;