From ac35d440c03747e8bc5b22bd51789be455727b2e Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Wed, 4 Jan 2023 21:26:11 +0100 Subject: [PATCH] Scripts/Throne of the Tides: fixed the falling rocks visual --- sql/updates/world/4.3.4/2023_01_04_00_world.sql | 1 + .../instance_throne_of_the_tides.cpp | 3 --- .../ThroneOfTheTides/throne_of_the_tides.cpp | 13 +++++++++++++ .../ThroneOfTheTides/throne_of_the_tides.h | 1 - 4 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 sql/updates/world/4.3.4/2023_01_04_00_world.sql diff --git a/sql/updates/world/4.3.4/2023_01_04_00_world.sql b/sql/updates/world/4.3.4/2023_01_04_00_world.sql new file mode 100644 index 0000000000..91be7a5737 --- /dev/null +++ b/sql/updates/world/4.3.4/2023_01_04_00_world.sql @@ -0,0 +1 @@ +UPDATE `gameobject_template` SET `ScriptName`= 'go_tott_temp_falling_rocks' WHERE `entry`= 202742; \ No newline at end of file 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 1501fcae58..ee1cf8f568 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 @@ -340,9 +340,6 @@ class instance_throne_of_the_tides : public InstanceMapScript switch (go->GetEntry()) { - case GO_TEMP_FALLING_ROCKS: - go->SendCustomAnim(0); - break; case GO_DOODAD_ABYSSAL_MAW_DOOR_1: if (_eventIndex >= EVENT_INDEX_LADY_NAZJAR_GAUNTLET) go->SetGoState(GO_STATE_ACTIVE); 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 73e5a04393..bf4d9b2acd 100644 --- a/src/server/scripts/EasternKingdoms/ThroneOfTheTides/throne_of_the_tides.cpp +++ b/src/server/scripts/EasternKingdoms/ThroneOfTheTides/throne_of_the_tides.cpp @@ -366,6 +366,18 @@ private: InstanceScript * _instance; }; +struct go_tott_temp_falling_rocks : public GameObjectAI +{ + go_tott_temp_falling_rocks(GameObject* go) : GameObjectAI(go) { } + + void JustAppeared() override + { + me->SetGoState(GO_STATE_ACTIVE); + me->SendCustomAnim(0); + } +}; + + class spell_tott_camera: public SpellScript { void HandleScriptEffect(SpellEffIndex /*effIndex*/) @@ -511,6 +523,7 @@ void AddSC_throne_of_the_tides() RegisterThroneOfTheTidesCreatureAI(npc_tott_lady_nazjar); RegisterSpellScript(spell_tott_trigger_murloc); RegisterGameObjectAI(go_tott_defense_system); + RegisterGameObjectAI(go_tott_temp_falling_rocks); RegisterSpellScript(spell_tott_camera); RegisterSpellScript(spell_tott_shock_defense_script); RegisterSpellScript(spell_tott_ulthok_intro_visual_impact); 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 ee94ed7694..b7e836f93b 100644 --- a/src/server/scripts/EasternKingdoms/ThroneOfTheTides/throne_of_the_tides.h +++ b/src/server/scripts/EasternKingdoms/ThroneOfTheTides/throne_of_the_tides.h @@ -109,7 +109,6 @@ enum TotTCreatureIds enum TotTGameObjectIds { - GO_TEMP_FALLING_ROCKS = 202742, GO_DOODAD_ABYSSAL_MAW_DOOR_1 = 204338, GO_DOODAD_ABYSSAL_MAW_DOOR_2 = 204339, GO_DOODAD_ABYSSAL_MAW_DOOR_4 = 204341,