mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-28 12:52:25 +01:00
Core/Misc: Fix some static analysis issues
Add some asserts and additional NULL checks as sanity checks.
This commit is contained in:
@@ -250,8 +250,9 @@ public:
|
||||
target->CastSpell(target, SPELL_SNAKE_WRAP, true);
|
||||
|
||||
if (TempSummon* _me = me->ToTempSummon())
|
||||
if (Creature* sladran = _me->GetSummoner()->ToCreature())
|
||||
sladran->AI()->SetGUID(target->GetGUID(), DATA_SNAKES_WHYD_IT_HAVE_TO_BE_SNAKES);
|
||||
if (Unit* summoner = _me->GetSummoner())
|
||||
if (Creature* sladran = summoner->ToCreature())
|
||||
sladran->AI()->SetGUID(target->GetGUID(), DATA_SNAKES_WHYD_IT_HAVE_TO_BE_SNAKES);
|
||||
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user