mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-16 08:46:09 +00:00
fix(Core): Fixed a few crashes/bugs that were found via static code analysis (#2617)
This commit is contained in:
@@ -749,7 +749,7 @@ public:
|
||||
{
|
||||
case EVENT_WORGEN_MORTAL:
|
||||
{
|
||||
me->CastSpell(me->GetVictim(), IsHeroic() ? SPELL_MORTAL_WOUND_H : SPELL_MORTAL_WOUND_H, false);
|
||||
me->CastSpell(me->GetVictim(), IsHeroic() ? SPELL_MORTAL_WOUND_H : SPELL_MORTAL_WOUND_N, false);
|
||||
events.RepeatEvent(4000 + rand()%3000);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ public:
|
||||
|
||||
void SetData(uint32 data, uint32 param)
|
||||
{
|
||||
if (data != 1 || param != 1 || Started || instance->GetData(DATA_SVALA_SORROWGRAVE) == DONE)
|
||||
if (data != 1 || param != 1 || Started || (instance && instance->GetData(DATA_SVALA_SORROWGRAVE) == DONE))
|
||||
return;
|
||||
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
|
||||
Reference in New Issue
Block a user