diff --git a/src/server/scripts/EasternKingdoms/ThroneOfTheTides/instance_throne_of_the_tides.cpp b/src/server/scripts/EasternKingdoms/ThroneOfTheTides/instance_throne_of_the_tides.cpp index 315de701647..ce245f5f20b 100644 --- a/src/server/scripts/EasternKingdoms/ThroneOfTheTides/instance_throne_of_the_tides.cpp +++ b/src/server/scripts/EasternKingdoms/ThroneOfTheTides/instance_throne_of_the_tides.cpp @@ -33,6 +33,7 @@ ObjectData const creatureData[] = { NPC_OZUMAT_VEHICLE_BIG, DATA_OZUMAT_VEHICLE_BIG }, { NPC_OZUMAT_VEHICLE, DATA_OZUMAT_VEHICLE }, { NPC_NEPTULON, DATA_NEPTULON }, + { NPC_OZUMAT, DATA_OZUMAT_PASSENGER }, { 0, 0 } // END }; diff --git a/src/server/scripts/EasternKingdoms/ThroneOfTheTides/throne_of_the_tides.cpp b/src/server/scripts/EasternKingdoms/ThroneOfTheTides/throne_of_the_tides.cpp index f1ddc25fe59..1d848b9cbe9 100644 --- a/src/server/scripts/EasternKingdoms/ThroneOfTheTides/throne_of_the_tides.cpp +++ b/src/server/scripts/EasternKingdoms/ThroneOfTheTides/throne_of_the_tides.cpp @@ -43,15 +43,9 @@ struct npc_tott_ozumat_vehicle_big : public ScriptedAI void JustAppeared() override { - me->setActive(true); // ugly but the only safe way for now to keep the grid loaded... if (_instance->GetData(DATA_CURRENT_EVENT_PROGRESS) < EVENT_INDEX_DEFENSE_SYSTEM_ACTIVATED) - { if (Creature* ozumat = DoSummon(NPC_OZUMAT, me->GetPosition())) - { - me->HandleSpellClick(ozumat, SEAT_TENTACLE_BLOCK); - ozumat->setActive(true); - } - } + ozumat->EnterVehicle(me, SEAT_TENTACLE_BLOCK); } void DoAction(int32 action) override @@ -70,16 +64,16 @@ struct npc_tott_ozumat_vehicle_big : public ScriptedAI { case EVENT_CHANGE_TO_SHOCK_SEAT: if (Vehicle* vehicle = me->GetVehicleKit()) - if (Unit* ozumat = vehicle->GetPassenger(SEAT_TENTACLE_BLOCK)) - me->HandleSpellClick(ozumat, SEAT_DEFENSE_SYSTEM); + if (Creature* ozumat = _instance->GetCreature(DATA_OZUMAT_PASSENGER)) + ozumat->EnterVehicle(me, SEAT_DEFENSE_SYSTEM); _events.ScheduleEvent(EVENT_CHANGE_TO_ESCAPE_SEAT, 29s); break; case EVENT_CHANGE_TO_ESCAPE_SEAT: if (Vehicle* vehicle = me->GetVehicleKit()) { - if (Unit* ozumat = vehicle->GetPassenger(SEAT_DEFENSE_SYSTEM)) + if (Creature* ozumat = _instance->GetCreature(DATA_OZUMAT_PASSENGER)) { - me->HandleSpellClick(ozumat, SEAT_ESCAPE); + ozumat->EnterVehicle(me, SEAT_ESCAPE); me->DespawnOrUnsummon(6s); if (Creature* creature = ozumat->ToCreature()) creature->DespawnOrUnsummon(6s); diff --git a/src/server/scripts/EasternKingdoms/ThroneOfTheTides/throne_of_the_tides.h b/src/server/scripts/EasternKingdoms/ThroneOfTheTides/throne_of_the_tides.h index d6b3005312d..e59a630ee70 100644 --- a/src/server/scripts/EasternKingdoms/ThroneOfTheTides/throne_of_the_tides.h +++ b/src/server/scripts/EasternKingdoms/ThroneOfTheTides/throne_of_the_tides.h @@ -47,7 +47,8 @@ enum TotTDataTypes DATA_ABYSSAL_CORAL_CHUNK = 14, DATA_NEPTULON = 15, DATA_OZUMAT_VEHICLE = 16, - DATA_LADY_NAZJAR_GEYSERS = 17 + DATA_LADY_NAZJAR_GEYSERS = 17, + DATA_OZUMAT_PASSENGER = 18 }; enum TotTCreatureIds