Scripts/Ulduar: Fix crash
Change an assert to a NULL check on Flame Leviathan vehicle kit, it can be NULL on map unload. Close #16662 (cherry picked from commit 31cd082833926539c56569ff6faabc139f5f3223)
This commit is contained in:
@@ -334,7 +334,8 @@ class boss_flame_leviathan : public CreatureScript
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
|
||||
{
|
||||
if (spell->Id == SPELL_START_THE_ENGINE)
|
||||
ASSERT_NOTNULL(me->GetVehicleKit())->InstallAllAccessories(false);
|
||||
if (Vehicle* vehicleKit = me->GetVehicleKit())
|
||||
vehicleKit->InstallAllAccessories(false);
|
||||
|
||||
if (spell->Id == SPELL_ELECTROSHOCK)
|
||||
me->InterruptSpell(CURRENT_CHANNELED_SPELL);
|
||||
|
||||
Reference in New Issue
Block a user