mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 22:26:22 +00:00
fix(Core): Fixed a few crashes/bugs that were found via static code analysis (#2617)
This commit is contained in:
@@ -551,11 +551,14 @@ class boss_essence_of_anger : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_ANGER_SOUL_SCREAM, 10000);
|
||||
break;
|
||||
case EVENT_ANGER_SEETHE:
|
||||
if (targetGUID && targetGUID != me->GetVictim()->GetGUID())
|
||||
me->CastSpell(me, SPELL_SEETHE, false);
|
||||
// victim can be lost
|
||||
if (me->GetVictim())
|
||||
targetGUID = me->GetVictim()->GetGUID();
|
||||
if (Unit* victim = me->GetVictim())
|
||||
{
|
||||
uint64 victimGUID = victim->GetGUID();
|
||||
if (targetGUID && targetGUID != victimGUID)
|
||||
me->CastSpell(me, SPELL_SEETHE, false);
|
||||
// victim can be lost
|
||||
targetGUID = victimGUID;
|
||||
}
|
||||
events.ScheduleEvent(EVENT_ANGER_SEETHE, 1000);
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user