diff --git a/sql/updates/world/4.3.4/2022_12_19_04_world.sql b/sql/updates/world/4.3.4/2022_12_19_04_world.sql new file mode 100644 index 0000000000..d1b0542c15 --- /dev/null +++ b/sql/updates/world/4.3.4/2022_12_19_04_world.sql @@ -0,0 +1,9 @@ +UPDATE `gossip_menu_option` SET `OptionType`= 1 WHERE `MenuID`= 12646; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=12646 AND SourceId = 0; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`, `NegativeCondition`, `ScriptName`,`Comment`) VALUES +(15, 12646, 1, 0, 0, 13, 0, 1, 3, 2, 0, 0, "", "Show gossip if Anraphet or Earthrager Ptah have been defeated"), +(15, 12646, 1, 0, 1, 13, 0, 2, 3, 2, 0, 0, "", "Show gossip if Anraphet or Earthrager Ptah have been defeated"), +(15, 12646, 2, 0, 0, 13, 0, 3, 3, 2, 0, 0, "", "Show gossip if the Constructs of the Four Seats have been defeated"), +(15, 12646, 2, 0, 0, 13, 0, 4, 3, 2, 0, 0, "", "Show gossip if the Constructs of the Four Seats have been defeated"), +(15, 12646, 2, 0, 0, 13, 0, 5, 3, 2, 0, 0, "", "Show gossip if the Constructs of the Four Seats have been defeated"), +(15, 12646, 2, 0, 0, 13, 0, 6, 3, 2, 0, 0, "", "Show gossip if the Constructs of the Four Seats have been defeated"); diff --git a/src/server/scripts/Kalimdor/HallsOfOrigination/halls_of_origination.cpp b/src/server/scripts/Kalimdor/HallsOfOrigination/halls_of_origination.cpp index 8ed12464d5..4e0b0ae3b1 100644 --- a/src/server/scripts/Kalimdor/HallsOfOrigination/halls_of_origination.cpp +++ b/src/server/scripts/Kalimdor/HallsOfOrigination/halls_of_origination.cpp @@ -732,61 +732,21 @@ struct npc_hoo_aqua_bubble : public NullCreatureAI } }; -// The Maker's Lift -enum ElevatorMisc -{ - GOSSIP_MENU_HOO_LIFT = 12646, - GOSSIP_NPC_TEXT_CHOOSE_A_DESTINATION = 17791, - GOSSIP_OPTION_FIRST_FLOOR = 0, - GOSSIP_OPTION_HOO_LIFT_SECOND_FLOOR = 1, - GOSSIP_OPTION_HOO_LIFT_THIRD_FLOOR = 2 -}; - // 207669 - The Maker's Lift Controller struct go_hoo_the_makers_lift_controller : public GameObjectAI { go_hoo_the_makers_lift_controller(GameObject* go) : GameObjectAI(go) { } - bool GossipHello(Player* player) override - { - InstanceScript* instance = player->GetInstanceScript(); - if (!instance) - return false; - - // Build menu. - // First floor: Option available from start. - AddGossipItemFor(player, GOSSIP_MENU_HOO_LIFT, GOSSIP_OPTION_FIRST_FLOOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 0); - - // Second floor: Anraphet must be defeated first. - if (instance->GetBossState(DATA_ANRAPHET) == DONE || instance->GetBossState(DATA_EARTHRAGER_PTAH) == DONE) - AddGossipItemFor(player, GOSSIP_MENU_HOO_LIFT, GOSSIP_OPTION_HOO_LIFT_SECOND_FLOOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - - // Third floor: Constructs of The Four Seats must be defeated first. - if (instance->GetBossState(DATA_ISISET) == DONE && instance->GetBossState(DATA_AMMUNAE) == DONE && - instance->GetBossState(DATA_SETESH) == DONE && instance->GetBossState(DATA_RAJH) == DONE) - AddGossipItemFor(player, GOSSIP_MENU_HOO_LIFT, GOSSIP_OPTION_HOO_LIFT_THIRD_FLOOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - - SendGossipMenuFor(player, GOSSIP_NPC_TEXT_CHOOSE_A_DESTINATION, me->GetGUID()); - return true; - } - bool GossipSelect(Player* player, uint32 /*sender*/, uint32 action) override { ClearGossipMenuFor(player); player->PlayerTalkClass->SendCloseGossip(); - InstanceScript* instance = player->GetInstanceScript(); - if (!instance) - return true; + if (InstanceScript* instance = player->GetInstanceScript()) + if (GameObject* elevator = instance->GetGameObject(DATA_LIFT_OF_THE_MAKERS)) + elevator->SetGoState(GOState(GO_STATE_TRANSPORT_ACTIVE + action)); - // Handle elevator: gossip item index => stopFrame (floor index). - GameObject* elevator = instance->GetGameObject(DATA_LIFT_OF_THE_MAKERS); - if (!elevator) - return true; - - elevator->SetGoState(GOState(GO_STATE_TRANSPORT_ACTIVE + action)); - - return true; + return false; } };