diff --git a/data/sql/updates/pending_db_world/rev_1601843049417097700.sql b/data/sql/updates/pending_db_world/rev_1601843049417097700.sql new file mode 100644 index 000000000..a94bebcbb --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1601843049417097700.sql @@ -0,0 +1,25 @@ +INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1601843049417097700'); + +UPDATE `creature_template` SET `npcflag`= 2 WHERE `entry` IN (27657, 27658, 27659); + +DELETE FROM `gossip_menu_option` WHERE `MenuID`= 9708 AND `OptionID`= 0; +INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES +(9708, 0, 0, 'So where do we go from here?', 28427, 1, 1, 0, 0, 0, 0, '', 0, 0); + +DELETE FROM `gossip_menu_option` WHERE `MenuID`= 9575 AND `OptionID`= 3; +INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES +(9575, 3, 0, 'What abilities do ruby drakes have?', 28085, 1, 1, 0, 0, 0, 0, '', 0, 0); + +DELETE FROM `gossip_menu_option` WHERE `MenuID`= 9574 AND `OptionID` IN (2, 3); +INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES +(9574, 2, 0, 'I want to exchange my Amber Essence for Emerald Essence.', 27038, 1, 1, 0, 0, 0, 0, '', 0, 0), +(9574, 3, 0, 'I want to exchange my Ruby Essence for Emerald Essence.', 27039, 1, 1, 0, 0, 0, 0, '', 0, 0); + +DELETE FROM `npc_text` WHERE `ID`= 12916; +INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `BroadcastTextID0`, `lang0`, `Probability0`, `em0_0`, `em0_1`, `em0_2`, `em0_3`, `em0_4`, `em0_5`, `text1_0`, `text1_1`, `BroadcastTextID1`, `lang1`, `Probability1`, `em1_0`, `em1_1`, `em1_2`, `em1_3`, `em1_4`, `em1_5`, `text2_0`, `text2_1`, `BroadcastTextID2`, `lang2`, `Probability2`, `em2_0`, `em2_1`, `em2_2`, `em2_3`, `em2_4`, `em2_5`, `text3_0`, `text3_1`, `BroadcastTextID3`, `lang3`, `Probability3`, `em3_0`, `em3_1`, `em3_2`, `em3_3`, `em3_4`, `em3_5`, `text4_0`, `text4_1`, `BroadcastTextID4`, `lang4`, `Probability4`, `em4_0`, `em4_1`, `em4_2`, `em4_3`, `em4_4`, `em4_5`, `text5_0`, `text5_1`, `BroadcastTextID5`, `lang5`, `Probability5`, `em5_0`, `em5_1`, `em5_2`, `em5_3`, `em5_4`, `em5_5`, `text6_0`, `text6_1`, `BroadcastTextID6`, `lang6`, `Probability6`, `em6_0`, `em6_1`, `em6_2`, `em6_3`, `em6_4`, `em6_5`, `text7_0`, `text7_1`, `BroadcastTextID7`, `lang7`, `Probability7`, `em7_0`, `em7_1`, `em7_2`, `em7_3`, `em7_4`, `em7_5`, `VerifiedBuild`) VALUES +(12916, 'Varos Cloudstrider and his ring guardians protect the second ring. Your drakes are more than a match for the ring guardians, but Varos stands behind an impenetrable shield created from the energy of the Oculus itself. Ten centrifuge constructs power the shield from the ring and platforms above. Destroy them and Varos will be vulnerable.$B$BI can grant you the power to call upon a drake from the red flight. Speak to Eternos or Verdisa if you prefer to draw on the power of the bronze or the green.', '', 26950, 0, 1, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 12340); + +DELETE FROM `broadcast_text` WHERE `ID` IN (26950, 29536); +INSERT INTO `broadcast_text` (`ID`, `Language`, `MaleText`, `FemaleText`, `EmoteID0`, `EmoteID1`, `EmoteID2`, `EmoteDelay0`, `EmoteDelay1`, `EmoteDelay2`, `SoundId`, `Unk1`, `Unk2`, `VerifiedBuild`) VALUES +(26950, 0, 'Varos Cloudstrider and his ring guardians protect the second ring. Your drakes are more than a match for the ring guardians, but Varos stands behind an impenetrable shield created from the energy of the Oculus itself. Ten centrifuge constructs power the shield from the ring and platforms above. Destroy them and Varos will be vulnerable.$B$BI can grant you the power to call upon a drake from the red flight. Speak to Eternos or Verdisa if you prefer to draw on the power of the bronze or the green.', '', 0, 0, 0, 0, 0, 0, 0, 0, 1, 18019),(29536, 0, 'Varos Cloudstrider and his ring guardians protect the second ring. Your drakes are more than a match for the ring guardians, but Varos stands behind an impenetrable shield created from the energy of the Oculus itself. Ten centrifuge constructs power the shield from the ring and platforms above. Destroy them and Varos will be vulnerable.', 'Varos Cloudstrider and his ring guardians protect the second ring. Your drakes are more than a match for the ring guardians, but Varos stands behind an impenetrable shield created from the energy of the Oculus itself. Ten centrifuge constructs power the shield from the ring and platforms above. Destroy them and Varos will be vulnerable.', 0, 0, 0, 0, 0, 0, 0, 0, 1, 18019); + diff --git a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp index 0ab8b3c47..9946e4f6f 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp @@ -15,6 +15,7 @@ #include "SpellInfo.h" #include "SpellAuraEffects.h" #include "SpellScript.h" +#include enum Drakes { @@ -47,31 +48,110 @@ enum DrakeGiverTexts { GOSSIP_TEXTID_DRAKES = 13267, GOSSIP_TEXTID_BELGARISTRASZ1 = 12916, - GOSSIP_TEXTID_BELGARISTRASZ2 = 13466, - GOSSIP_TEXTID_BELGARISTRASZ3 = 13254, - GOSSIP_TEXTID_VERDISA1 = 1, - GOSSIP_TEXTID_VERDISA2 = 1, - GOSSIP_TEXTID_VERDISA3 = 1, - GOSSIP_TEXTID_ETERNOS1 = 1, - GOSSIP_TEXTID_ETERNOS2 = 1, + GOSSIP_TEXTID_BELGARISTRASZ2 = 13254, + GOSSIP_TEXTID_VERDISA1 = 12915, + GOSSIP_TEXTID_VERDISA2 = 13466, + GOSSIP_TEXTID_VERDISA3 = 13258, + GOSSIP_TEXTID_ETERNOS1 = 12917, + GOSSIP_TEXTID_ETERNOS2 = 13466, GOSSIP_TEXTID_ETERNOS3 = 13256, }; -#define GOSSIP_ITEM_DRAKES "So where do we go from here?" -#define GOSSIP_ITEM_BELGARISTRASZ1 "I want to fly on the wings of the Red Flight" -#define GOSSIP_ITEM_BELGARISTRASZ2 "What abilities do Ruby Drakes have?" -#define GOSSIP_ITEM_VERDISA1 "I want to fly on the wings of the Green Flight" -#define GOSSIP_ITEM_VERDISA2 "What abilities do Emerald Drakes have?" -#define GOSSIP_ITEM_ETERNOS1 "I want to fly on the wings of the Bronze Flight" -#define GOSSIP_ITEM_ETERNOS2 "What abilities do Amber Drakes have?" - #define HAS_ESSENCE(a) ((a)->HasItemCount(ITEM_EMERALD_ESSENCE) || (a)->HasItemCount(ITEM_AMBER_ESSENCE) || (a)->HasItemCount(ITEM_RUBY_ESSENCE)) class npc_oculus_drakegiver : public CreatureScript { public: + std::unordered_mapopenedMenu; + npc_oculus_drakegiver() : CreatureScript("npc_oculus_drakegiver") { } + CreatureAI* GetAI(Creature* creature) const override + { + return new npc_oculus_drakegiverAI(creature); + } + + struct npc_oculus_drakegiverAI : public ScriptedAI { + npc_oculus_drakegiverAI(Creature* creature) : ScriptedAI(creature) + { + m_pInstance = me->GetInstanceScript(); + if (m_pInstance->GetData(DATA_DRAKOS) == DONE) + { + resetPosition = true; + moved = true; + } + else { + moved = false; + resetPosition = false; + } + timer = 0; + } + + InstanceScript* m_pInstance; + bool resetPosition, moved; + uint32 timer; + + void UpdateAI(uint32 diff) override + { + if (m_pInstance->GetData(DATA_DRAKOS) == DONE) + { + if (!moved) + { + timer += diff; + + if (timer > 3000) + { + moved = true; + me->SetWalk(true); + switch (me->GetEntry()) + { + case NPC_VERDISA: + me->GetMotionMaster()->MovePoint(POINT_MOVE_DRAKES, VerdisaPOS); + break; + case NPC_BELGARISTRASZ: + me->GetMotionMaster()->MovePoint(POINT_MOVE_DRAKES, BelgaristraszPOS); + break; + case NPC_ETERNOS: + me->GetMotionMaster()->MovePoint(POINT_MOVE_DRAKES, EternosPOS); + break; + } + } + } + if (resetPosition) + { + me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER); + switch (me->GetEntry()) + { + case NPC_VERDISA: + me->SetPosition(VerdisaPOS); + break; + case NPC_BELGARISTRASZ: + me->SetPosition(BelgaristraszPOS); + break; + case NPC_ETERNOS: + me->SetPosition(EternosPOS); + break; + } + resetPosition = false; + } + } + } + + void MovementInform(uint32 /*type*/, uint32 id) override + { + if (id != POINT_MOVE_DRAKES) + { + return; + } + + if(me->GetEntry() == NPC_BELGARISTRASZ) + { + Talk(SAY_BELGARISTRASZ); + } + me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER); + } + }; + bool OnGossipHello(Player* player, Creature* creature) override { if(creature->IsQuestGiver()) @@ -79,116 +159,158 @@ public: if(creature->GetInstanceScript()->GetData(DATA_DRAKOS) == DONE) { - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_DRAKES, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - SendGossipMenuFor(player, GOSSIP_TEXTID_DRAKES, creature->GetGUID()); + switch (creature->GetEntry()) + { + case NPC_VERDISA: + AddGossipItemFor(player, 9573, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + if (player->HasItemCount(ITEM_AMBER_ESSENCE)) + { + AddGossipItemFor(player, 9573, 2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + } + else if (player->HasItemCount(ITEM_RUBY_ESSENCE)) + { + AddGossipItemFor(player, 9573, 3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + } + else if (!player->HasItemCount(ITEM_EMERALD_ESSENCE)) + { + AddGossipItemFor(player, 9573, 1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + } + AddGossipItemFor(player, 9573, 4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + SendGossipMenuFor(player, GOSSIP_TEXTID_VERDISA1, creature->GetGUID()); + break; + case NPC_BELGARISTRASZ: + if (HAS_ESSENCE(player)) + { + openedMenu[player->GetGUID()] = true; + } + + if (openedMenu[player->GetGUID()] != true) + { + AddGossipItemFor(player, 9708, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + SendGossipMenuFor(player, GOSSIP_TEXTID_DRAKES, creature->GetGUID()); + } + else + { + OnGossipSelect(player, creature, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + } + break; + case NPC_ETERNOS: + AddGossipItemFor(player, 9574, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + if (player->HasItemCount(ITEM_EMERALD_ESSENCE)) + { + AddGossipItemFor(player, 9574, 2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + } + else if (player->HasItemCount(ITEM_RUBY_ESSENCE)) + { + AddGossipItemFor(player, 9574, 3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + } + else if (!player->HasItemCount(ITEM_AMBER_ESSENCE)) + { + AddGossipItemFor(player, 9574, 1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + } + AddGossipItemFor(player, 9574, 4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + SendGossipMenuFor(player, GOSSIP_TEXTID_ETERNOS1, creature->GetGUID()); + break; + } } return true; } + void StoreEssence(Player* player, uint32 itemId) + { + ItemPosCountVec dest; + uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, itemId, 1); + if (msg == EQUIP_ERR_OK) + { + if (Item* item = player->StoreNewItem(dest, itemId, true)) + { + player->SendNewItem(item, 1, true, true); + } + } + } + + void RemoveEssence(Player* player, uint32 itemId) + { + player->DestroyItemCount(itemId, 1, true); + } + bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction) override { - player->PlayerTalkClass->GetGossipMenu().ClearMenu(); + ClearGossipMenuFor(player); switch(creature->GetEntry()) { - case NPC_VERDISA: - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF + 1: - if (!HAS_ESSENCE(player)) - { - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_VERDISA1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_VERDISA2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - SendGossipMenuFor(player, GOSSIP_TEXTID_VERDISA1, creature->GetGUID()); - } - else - { - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_VERDISA2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - SendGossipMenuFor(player, GOSSIP_TEXTID_VERDISA2, creature->GetGUID()); - } - break; - case GOSSIP_ACTION_INFO_DEF + 2: - { - ItemPosCountVec dest; - uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_EMERALD_ESSENCE, 1); - if (msg == EQUIP_ERR_OK) - player->StoreNewItem(dest, ITEM_EMERALD_ESSENCE, true); - CloseGossipMenuFor(player); - break; - } - case GOSSIP_ACTION_INFO_DEF + 3: - if (!HAS_ESSENCE(player)) - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_VERDISA1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - SendGossipMenuFor(player, GOSSIP_TEXTID_VERDISA3, creature->GetGUID()); - break; - } + case NPC_VERDISA: + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF: + SendGossipMenuFor(player, GOSSIP_TEXTID_VERDISA2, creature->GetGUID()); + return true; + case GOSSIP_ACTION_INFO_DEF + 4: + SendGossipMenuFor(player, GOSSIP_TEXTID_VERDISA3, creature->GetGUID()); + return true; + case GOSSIP_ACTION_INFO_DEF + 1: + RemoveEssence(player, ITEM_AMBER_ESSENCE); break; - case NPC_BELGARISTRASZ: - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF + 1: - if (!HAS_ESSENCE(player)) - { - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_BELGARISTRASZ1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_BELGARISTRASZ2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - SendGossipMenuFor(player, GOSSIP_TEXTID_BELGARISTRASZ1, creature->GetGUID()); - } - else - { - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_BELGARISTRASZ2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - SendGossipMenuFor(player, GOSSIP_TEXTID_BELGARISTRASZ2, creature->GetGUID()); - } - break; - case GOSSIP_ACTION_INFO_DEF + 2: - { - ItemPosCountVec dest; - uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_RUBY_ESSENCE, 1); - if (msg == EQUIP_ERR_OK) - player->StoreNewItem(dest, ITEM_RUBY_ESSENCE, true); - CloseGossipMenuFor(player); - break; - } - case GOSSIP_ACTION_INFO_DEF + 3: - if (!HAS_ESSENCE(player)) - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_BELGARISTRASZ1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - SendGossipMenuFor(player, GOSSIP_TEXTID_BELGARISTRASZ3, creature->GetGUID()); - break; - } + case GOSSIP_ACTION_INFO_DEF + 2: + RemoveEssence(player, ITEM_RUBY_ESSENCE); break; - case NPC_ETERNOS: - switch(uiAction) + } + StoreEssence(player, ITEM_EMERALD_ESSENCE); + CloseGossipMenuFor(player); + break; + case NPC_BELGARISTRASZ: + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF: + openedMenu[player->GetGUID()] = true; + if (player->HasItemCount(ITEM_AMBER_ESSENCE)) { - case GOSSIP_ACTION_INFO_DEF + 1: - if (!HAS_ESSENCE(player)) - { - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_ETERNOS1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_ETERNOS2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - SendGossipMenuFor(player, GOSSIP_TEXTID_ETERNOS1, creature->GetGUID()); - } - else - { - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_ETERNOS2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - SendGossipMenuFor(player, GOSSIP_TEXTID_ETERNOS2, creature->GetGUID()); - } - break; - case GOSSIP_ACTION_INFO_DEF + 2: - { - ItemPosCountVec dest; - uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_AMBER_ESSENCE, 1); - if (msg == EQUIP_ERR_OK) - player->StoreNewItem(dest, ITEM_AMBER_ESSENCE, true); - - CloseGossipMenuFor(player); - break; - } - case GOSSIP_ACTION_INFO_DEF + 3: - if (!HAS_ESSENCE(player)) - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_ETERNOS1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - - SendGossipMenuFor(player, GOSSIP_TEXTID_ETERNOS3, creature->GetGUID()); - break; + AddGossipItemFor(player, 9575, 1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); } + else if (player->HasItemCount(ITEM_EMERALD_ESSENCE)) + { + AddGossipItemFor(player, 9575, 2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + } + else if (!player->HasItemCount(ITEM_RUBY_ESSENCE)) + { + AddGossipItemFor(player, 9575, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + } + AddGossipItemFor(player, 9575, 3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + SendGossipMenuFor(player, GOSSIP_TEXTID_BELGARISTRASZ1, creature->GetGUID()); + return true; + case GOSSIP_ACTION_INFO_DEF + 4: + SendGossipMenuFor(player, GOSSIP_TEXTID_BELGARISTRASZ2, creature->GetGUID()); + return true; + case GOSSIP_ACTION_INFO_DEF + 1: + RemoveEssence(player, ITEM_AMBER_ESSENCE); break; + case GOSSIP_ACTION_INFO_DEF + 2: + RemoveEssence(player, ITEM_EMERALD_ESSENCE); + break; + } + StoreEssence(player, ITEM_RUBY_ESSENCE); + CloseGossipMenuFor(player); + break; + case NPC_ETERNOS: + switch (uiAction) + { + case GOSSIP_ACTION_INFO_DEF: + SendGossipMenuFor(player, GOSSIP_TEXTID_ETERNOS2, creature->GetGUID()); + return true; + case GOSSIP_ACTION_INFO_DEF + 4: + SendGossipMenuFor(player, GOSSIP_TEXTID_ETERNOS3, creature->GetGUID()); + return true; + case GOSSIP_ACTION_INFO_DEF + 1: + RemoveEssence(player, ITEM_EMERALD_ESSENCE); + break; + case GOSSIP_ACTION_INFO_DEF + 2: + RemoveEssence(player, ITEM_RUBY_ESSENCE); + break; + } + StoreEssence(player, ITEM_AMBER_ESSENCE); + CloseGossipMenuFor(player); + break; } return true; @@ -288,20 +410,20 @@ public: void UpdateAI(uint32 diff) override { - if( JustSummoned ) + if (JustSummoned) { despawnTimer = 1; JustSummoned = false; - if( m_pInstance ) + if (m_pInstance) { - if( !m_pInstance->IsEncounterInProgress() || m_pInstance->GetData(DATA_EREGOS) == IN_PROGRESS ) + if (!m_pInstance->IsEncounterInProgress() || m_pInstance->GetData(DATA_EREGOS) == IN_PROGRESS) { - if( me->GetVehicleKit() && me->IsSummon() ) - if( !me->GetVehicleKit()->GetPassenger(0) ) + if (me->GetVehicleKit() && me->IsSummon()) + if (!me->GetVehicleKit()->GetPassenger(0)) { - if( m_pInstance->GetData(DATA_UROM) == DONE ) + if (m_pInstance->GetData(DATA_UROM) == DONE) { - switch( me->GetEntry() ) + switch (me->GetEntry()) { case 27692: me->m_spells[5] = 50344; diff --git a/src/server/scripts/Northrend/Nexus/Oculus/oculus.h b/src/server/scripts/Northrend/Nexus/Oculus/oculus.h index fbaaca845..8396b2cb7 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/oculus.h +++ b/src/server/scripts/Northrend/Nexus/Oculus/oculus.h @@ -9,6 +9,10 @@ #include "SpellAuras.h" #include "SpellAuraEffects.h" +Position const VerdisaPOS = { 949.056f, 1032.97f, 359.967f, 1.035795f }; +Position const BelgaristraszPOS = { 941.355f, 1044.26f, 359.967f, 0.222459f }; +Position const EternosPOS = { 943.202f, 1059.35f, 359.967f, 5.757278f }; + enum Data { DATA_DRAKOS, // Drakos the Interrogator @@ -45,6 +49,11 @@ enum NPCs NPC_IMAGE_OF_BELGARISTRASZ = 28012, }; +enum Talks +{ + SAY_BELGARISTRASZ = 0, +}; + enum Items { ITEM_EMERALD_ESSENCE = 37815, @@ -78,4 +87,8 @@ enum OculusWorldStates WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT = 3486 }; +enum MISC +{ + POINT_MOVE_DRAKES +}; #endif