mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-05 08:28:57 +01:00
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
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