From a37ae4642b5b5b1528fa8e197a5e2cbda4c97eaf Mon Sep 17 00:00:00 2001 From: brotalnia Date: Sat, 18 Nov 2017 04:03:13 +0200 Subject: [PATCH] Corrected more wrong npc_text ids. --- sql/migrations/20171118020045_world.sql | 143 ++++++++++++++++++ .../quest_stormwind_rendezvous.cpp | 4 +- .../instance_scarlet_monastery.cpp | 24 ++- .../instance_temple_of_ahnqiraj.cpp | 20 --- src/scripts/world/boss_azuregos.cpp | 4 +- src/scripts/world/npcs_special.cpp | 43 ------ 6 files changed, 168 insertions(+), 70 deletions(-) create mode 100644 sql/migrations/20171118020045_world.sql diff --git a/sql/migrations/20171118020045_world.sql b/sql/migrations/20171118020045_world.sql new file mode 100644 index 000000000..84ec7c9d0 --- /dev/null +++ b/sql/migrations/20171118020045_world.sql @@ -0,0 +1,143 @@ +DROP PROCEDURE IF EXISTS add_migration; +delimiter ?? +CREATE PROCEDURE `add_migration`() +BEGIN +DECLARE v INT DEFAULT 1; +SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20171118020045'); +IF v=0 THEN +INSERT INTO `migrations` VALUES ('20171118020045'); +-- Add your query below. + + +-- Some of these texts are from TBC and WotLK, the rest have wrong ids. +DELETE FROM `npc_text` WHERE `ID` IN (20201, 20551, 20564, 21024, 22932, 22990, 30000, 30010, 30031, 40100, 40101, 50013, 55001, 55002, 55003, 55101, 55102, 55103, 55131, 55132, 55133, 100000, 125800, 125801, 672901, 921061, 1491201, 1491301, 1491401, 1491501, 1548101, 1548102, 1548103, 1548104, 1548105, 1548106, 1548107, 1548108, 1548109, 1548110, 1548111, 1548112, 1548113, 1548114, 1603301, 1678785); + +-- Text ids used by High Inquisitor Fairbanks. Approximation based on broadcast text id. +UPDATE `npc_text` SET `ID`=8599 WHERE `ID`=30117; +UPDATE `gossip_menu` SET `text_id`=8599 WHERE `text_id`=30117; +UPDATE `npc_text` SET `ID`=8600 WHERE `ID`=30118; +UPDATE `gossip_menu` SET `text_id`=8600 WHERE `text_id`=30118; +UPDATE `npc_text` SET `ID`=8601 WHERE `ID`=30119; +UPDATE `gossip_menu` SET `text_id`=8601 WHERE `text_id`=30119; +UPDATE `npc_text` SET `ID`=8602 WHERE `ID`=30120; +UPDATE `gossip_menu` SET `text_id`=8602 WHERE `text_id`=30120; +UPDATE `npc_text` SET `ID`=8603 WHERE `ID`=30121; +UPDATE `gossip_menu` SET `text_id`=8603 WHERE `text_id`=30121; +UPDATE `npc_text` SET `ID`=8604 WHERE `ID`=30122; +UPDATE `gossip_menu` SET `text_id`=8604 WHERE `text_id`=30122; +UPDATE `npc_text` SET `ID`=8605 WHERE `ID`=30123; +UPDATE `gossip_menu` SET `text_id`=8605 WHERE `text_id`=30123; +UPDATE `npc_text` SET `ID`=8606 WHERE `ID`=30124; +UPDATE `gossip_menu` SET `text_id`=8606 WHERE `text_id`=30124; +UPDATE `npc_text` SET `ID`=8607 WHERE `ID`=30125; +UPDATE `gossip_menu` SET `text_id`=8607 WHERE `text_id`=30125; +UPDATE `npc_text` SET `ID`=8608 WHERE `ID`=30126; +UPDATE `gossip_menu` SET `text_id`=8608 WHERE `text_id`=30126; +UPDATE `npc_text` SET `ID`=8609 WHERE `ID`=30127; +UPDATE `gossip_menu` SET `text_id`=8609 WHERE `text_id`=30127; +UPDATE `npc_text` SET `ID`=8610 WHERE `ID`=30128; +UPDATE `gossip_menu` SET `text_id`=8610 WHERE `text_id`=30128; +UPDATE `npc_text` SET `ID`=8611 WHERE `ID`=30129; +UPDATE `gossip_menu` SET `text_id`=8611 WHERE `text_id`=30129; +UPDATE `npc_text` SET `ID`=8612 WHERE `ID`=30130; +UPDATE `gossip_menu` SET `text_id`=8612 WHERE `text_id`=30130; +UPDATE `npc_text` SET `ID`=8613 WHERE `ID`=30131; +UPDATE `gossip_menu` SET `text_id`=8613 WHERE `text_id`=30131; +UPDATE `npc_text` SET `ID`=8614 WHERE `ID`=30132; +UPDATE `gossip_menu` SET `text_id`=8614 WHERE `text_id`=30132; +UPDATE `npc_text` SET `ID`=8615 WHERE `ID`=30133; +UPDATE `gossip_menu` SET `text_id`=8615 WHERE `text_id`=30133; + +-- Gossip menu for Caelestrasz. +INSERT INTO `gossip_menu` VALUES (6794, 8078, 0); +INSERT INTO `gossip_menu` VALUES (6794, 8112, 15727); +UPDATE `creature_template` SET `gossip_menu_id`=6794, `ScriptName`='' WHERE `entry`=15379; +-- Check if C'Thun is done. +INSERT INTO `conditions` VALUES (15727, 18, 5, 5); + +-- Approximate npc text id for Rigglefuzz based on broadcast text id. +UPDATE `npc_text` SET `ID`=2398 WHERE `ID`=50010; +UPDATE `npc_gossip` SET `textid`=2398 WHERE `textid`=50010; + +-- High Executor Darthalia has a quest greeting, not gossip. +-- https://youtu.be/D9O903Wnmb4?t=11m6s +DELETE FROM `npc_gossip` WHERE `textid`=50013; +INSERT INTO `quest_greeting` (`entry`, `content_default`) VALUES (2215, 'In order to serve the Dark Lady and Varimathras we need to advance the front on the Human Infestation.'); + +-- Adding quest greeting for Apothecary Lydon. +-- https://youtu.be/D9O903Wnmb4?t=1h41m14s +-- https://youtu.be/D9O903Wnmb4?t=2h16m8s +INSERT INTO `quest_greeting` (`entry`, `content_default`) VALUES (2216, 'We are but so close to developing the New Plague that our Dark Lady desires with such fervor.'); + +-- Meridith the Mermaiden's gossip menu and texts have wrong id. +UPDATE `creature_template` SET `gossip_menu_id`=6658 WHERE `entry`=15526; +UPDATE `gossip_menu_option` SET `menu_id`=6658 WHERE `menu_id`=15526; +DELETE FROM `gossip_menu` WHERE `entry`=15526; + +-- Morridune has wrong gossip menu id and text id. +UPDATE `creature_template` SET `gossip_menu_id`=321 WHERE `entry`=6729; +DELETE FROM `gossip_menu` WHERE `entry`=16000; +INSERT INTO `gossip_menu` VALUES (321, 818, 0); +UPDATE `gossip_menu_option` SET `menu_id`=321 WHERE `menu_id`=16000; + +-- Custom French crap. +DELETE FROM `gossip_menu` WHERE `entry` IN (14912, 14913, 14914, 14915, 16030, 16031); +DELETE FROM `gossip_menu_option` WHERE `menu_id`=16030; +DELETE FROM `gossip_scripts` WHERE `id` IN (13, 14, 15); + +-- AQ gossips. +UPDATE `gossip_menu` SET `text_id`=7885 WHERE `text_id`=1548101; +UPDATE `gossip_menu` SET `text_id`=7886 WHERE `text_id`=1548102; +UPDATE `gossip_menu` SET `text_id`=7887 WHERE `text_id`=1548103; +UPDATE `gossip_menu` SET `text_id`=7888 WHERE `text_id`=1548104; +UPDATE `gossip_menu` SET `text_id`=7889 WHERE `text_id`=1548105; +UPDATE `gossip_menu` SET `text_id`=7890 WHERE `text_id`=1548106; +UPDATE `gossip_menu` SET `text_id`=7891 WHERE `text_id`=1548107; +UPDATE `gossip_menu` SET `text_id`=7892 WHERE `text_id`=1548108; +UPDATE `gossip_menu` SET `text_id`=7893 WHERE `text_id`=1548109; +UPDATE `gossip_menu` SET `text_id`=7894 WHERE `text_id`=1548110; +UPDATE `gossip_menu` SET `text_id`=7895 WHERE `text_id`=1548111; +UPDATE `gossip_menu` SET `text_id`=7896 WHERE `text_id`=1548112; +UPDATE `gossip_menu` SET `text_id`=7897 WHERE `text_id`=1548113; +UPDATE `gossip_menu` SET `text_id`=7901 WHERE `text_id`=1548114; + +-- Add gossip menu for Doctor Gustaf VanHowzen and Doctor Gregory Victor. +UPDATE `creature_template` SET `gossip_menu_id`=5382 WHERE `entry` IN (12920, 12939); +DELETE FROM `npc_gossip` WHERE `textid`=1678785; +INSERT INTO `conditions` VALUES (165, 7, 129, 240); +INSERT INTO `conditions` VALUES (166, 7, 129, 260); +INSERT INTO `conditions` VALUES (167, 7, 129, 290); +INSERT INTO `conditions` VALUES (171, 17, 10841, 1); +INSERT INTO `conditions` VALUES (172, 17, 18629, 1); +INSERT INTO `conditions` VALUES (173, 17, 18630, 1); +INSERT INTO `conditions` VALUES (175, 8, 6622, 0); +INSERT INTO `conditions` VALUES (176, 8, 6624, 0); +INSERT INTO `conditions` VALUES (177, -2, 175, 176); +INSERT INTO `conditions` VALUES (178, 15, 40, 1); +INSERT INTO `conditions` VALUES (179, -1, 177, 178); +INSERT INTO `conditions` VALUES (182, -1, 165, 171); +INSERT INTO `conditions` VALUES (183, -1, 166, 172); +INSERT INTO `conditions` VALUES (184, -1, 167, 173); +INSERT INTO `conditions` VALUES (193, -1, 179, 182); +INSERT INTO `conditions` VALUES (194, -1, 179, 183); +INSERT INTO `conditions` VALUES (195, -1, 179, 184); +INSERT INTO `conditions` VALUES (396, 7, 129, 1); +DELETE FROM `gossip_menu` WHERE `entry`=5382; +INSERT INTO `gossip_menu` VALUES (5382, 6413, 2); +INSERT INTO `gossip_menu` VALUES (5382, 6414, 66); +INSERT INTO `gossip_menu` VALUES (5382, 6415, 0); +INSERT INTO `gossip_menu` VALUES (5382, 6573, 396); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`, `condition_id`) VALUES (5382, 0, 0, 'Teach me how to create and apply a Heavy Mageweave Bandage, Doctor.', 1, 1, 0, 0, 5382, 0, 0, '', 193); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`, `condition_id`) VALUES (5382, 1, 0, 'Teach me how to create and apply a Runecloth Bandage, Doctor.', 1, 1, 0, 0, 5383, 0, 0, '', 194); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`, `condition_id`) VALUES (5382, 2, 0, 'Teach me how to create and apply a Heavy Runecloth Bandage, Doctor.', 1, 1, 0, 0, 5384, 0, 0, '', 195); +INSERT INTO `gossip_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `comments`) VALUES (5382, 0, 15, 10843, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Heavy Mageweave Bandage'); +INSERT INTO `gossip_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `comments`) VALUES (5383, 0, 15, 18631, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Runecloth Bandages'); +INSERT INTO `gossip_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `comments`) VALUES (5384, 0, 15, 18632, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Heavy Runecloth Bandages'); + + +-- End of migration. +END IF; +END?? +delimiter ; +CALL add_migration(); +DROP PROCEDURE IF EXISTS add_migration; diff --git a/src/scripts/eastern_kingdoms/stormwind_city/quest_stormwind_rendezvous.cpp b/src/scripts/eastern_kingdoms/stormwind_city/quest_stormwind_rendezvous.cpp index fa50bcf77..ae77b36fc 100644 --- a/src/scripts/eastern_kingdoms/stormwind_city/quest_stormwind_rendezvous.cpp +++ b/src/scripts/eastern_kingdoms/stormwind_city/quest_stormwind_rendezvous.cpp @@ -785,11 +785,11 @@ bool GossipHello_npc_reginald_windsor(Player* pPlayer, Creature* pCreature) if (auto pWindsorEventAI = static_cast(pCreature->AI())) { if (pPlayer == pWindsorEventAI->GetPlayer() && pWindsorEventAI->QuestAccepted) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Me and my friends are ready. Let's stop this masquerade!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, sObjectMgr.GetBroadcastText(8256, pPlayer->GetSession()->GetSessionDbLocaleIndex(), pPlayer->getGender()), GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); else if (pCreature->isQuestGiver()) pPlayer->PrepareQuestMenu(pCreature->GetGUID()); - pPlayer->SEND_GOSSIP_MENU(125800, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(5633, pCreature->GetGUID()); } return true; } diff --git a/src/scripts/eastern_kingdoms/tirisfal_glades/scarlet_monastery/instance_scarlet_monastery.cpp b/src/scripts/eastern_kingdoms/tirisfal_glades/scarlet_monastery/instance_scarlet_monastery.cpp index 7e19c7b0f..8f7872e72 100644 --- a/src/scripts/eastern_kingdoms/tirisfal_glades/scarlet_monastery/instance_scarlet_monastery.cpp +++ b/src/scripts/eastern_kingdoms/tirisfal_glades/scarlet_monastery/instance_scarlet_monastery.cpp @@ -39,12 +39,10 @@ enum AshbringerEventMisc NPC_COMMANDER_MOGRAINE = 3976, NPC_HIGHLORD_MOGRAINE = 16062, - SAY_HAVE_YOU_COME = -1999927, SAY_AND_SO_IT_BEG = -1999928, SAY_ASHBRINGER = -1999916, SAY_KNEEL_BEFORE = -1999917, SAY_MY_LORD = -1999918, - SAY_TAKE_ME_WITH = -1999919, GO_CHAPPEL_DOOR = 104591, SAY_COMMANDER1 = -1999920, @@ -171,6 +169,26 @@ struct instance_scarlet_monastery : ScriptedInstance return 0; } + uint32 GetRandomScarletText() + { + switch (urand(0, 6)) + { + case 0: + return 12378; + case 1: + return 12379; + case 2: + return 12380; + case 3: + return 12381; + case 4: + return 12382; + case 5: + return 12383; + } + return 12384; + } + void OnCreatureSpellHit(Unit* pCaster, Creature* receiver, const SpellEntry* spell) override { if (!m_ashbringerActive || !pCaster || !receiver || !spell) @@ -204,7 +222,7 @@ struct instance_scarlet_monastery : ScriptedInstance if (!m_ashbringerSayTimer && urand(0,1)) { m_ashbringerSayTimer = 2000; - DoScriptText(irand(SAY_TAKE_ME_WITH, SAY_HAVE_YOU_COME), receiver); + DoScriptText(GetRandomScarletText(), receiver); } break; } diff --git a/src/scripts/kalimdor/silithus/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp b/src/scripts/kalimdor/silithus/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp index f2308b8b4..d27eed603 100644 --- a/src/scripts/kalimdor/silithus/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp +++ b/src/scripts/kalimdor/silithus/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp @@ -865,21 +865,6 @@ InstanceData* GetInstanceData_instance_temple_of_ahnqiraj(Map* pMap) return new instance_temple_of_ahnqiraj(pMap); } -bool GossipHello_npc_Caelestrasz(Player* pPlayer, Creature* pCreature) -{ - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); - if (InstanceData* instData = pCreature->GetInstanceData()) { - if (instData->GetData(TYPE_CTHUN) == DONE) { - pPlayer->SEND_GOSSIP_MENU(40101, pCreature->GetGUID()); - } - else { - pPlayer->SEND_GOSSIP_MENU(40100, pCreature->GetGUID()); - } - return true; - } - return false; -} - CreatureAI* GetAI_qirajiMindslayer(Creature* pCreature) { return new AI_QirajiMindslayer(pCreature); @@ -899,11 +884,6 @@ void AddSC_instance_temple_of_ahnqiraj() pNewScript->pAreaTrigger = &AreaTrigger_at_temple_ahnqiraj; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "aq_caelestrasz_ai"; - pNewScript->pGossipHello = &GossipHello_npc_Caelestrasz; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "mob_qiraji_mindslayer"; pNewScript->GetAI = &GetAI_qirajiMindslayer; diff --git a/src/scripts/world/boss_azuregos.cpp b/src/scripts/world/boss_azuregos.cpp index 429c450e5..1d2cab576 100644 --- a/src/scripts/world/boss_azuregos.cpp +++ b/src/scripts/world/boss_azuregos.cpp @@ -28,8 +28,8 @@ enum ITEM_MAGICAL_LEDGER = 20949, TEXT_HARM = 7880, - TEXT_SAVING_WORLD = 1548114, - TEXT_SCEPTER_0 = 1548101, + TEXT_SAVING_WORLD = 7901, + TEXT_SCEPTER_0 = 7885, PLAYER_SAY_0 = -3100013, MAX_SCEPTER_DIALOGUE = 13, diff --git a/src/scripts/world/npcs_special.cpp b/src/scripts/world/npcs_special.cpp index a547a4acf..90d38e4e5 100644 --- a/src/scripts/world/npcs_special.cpp +++ b/src/scripts/world/npcs_special.cpp @@ -221,47 +221,6 @@ const uint32 HordeSoldierId[3] = ## npc_doctor (handles both Gustaf Vanhowzen and Gregory Victor) ######*/ -bool GossipHello_npc_doctor(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if ((pPlayer->GetTeam() == ALLIANCE && pPlayer->GetQuestStatus(QUEST_TRIAGE_A) == QUEST_STATUS_COMPLETE) || (pPlayer->GetTeam() == HORDE && pPlayer->GetQuestStatus(QUEST_TRIAGE_H) == QUEST_STATUS_COMPLETE)) - { - if (pPlayer->GetSkillValue(SKILL_FIRST_AID) >= 240 && !pPlayer->HasSpell(10841)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, -3100005, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - if (pPlayer->GetSkillValue(SKILL_FIRST_AID) >= 260 && !pPlayer->HasSpell(18629)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, -3100006, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - if (pPlayer->GetSkillValue(SKILL_FIRST_AID) >= 290 && !pPlayer->HasSpell(18630)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, -3100007, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - } - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_doctor(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - pPlayer->PlayerTalkClass->ClearMenus(); - - switch (uiAction) - { - case GOSSIP_ACTION_INFO_DEF + 1: - pPlayer->CastSpell(pPlayer, 10843, true); - pPlayer->CLOSE_GOSSIP_MENU(); - break; - case GOSSIP_ACTION_INFO_DEF + 2: - pPlayer->CastSpell(pPlayer, 18631, true); - pPlayer->CLOSE_GOSSIP_MENU(); - break; - case GOSSIP_ACTION_INFO_DEF + 3: - pPlayer->CastSpell(pPlayer, 18632, true); - pPlayer->CLOSE_GOSSIP_MENU(); - break; - } - return true; -} - struct npc_doctorAI : public ScriptedAI { npc_doctorAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -3537,8 +3496,6 @@ void AddSC_npcs_special() newscript->GetAI = &GetAI_npc_doctor; newscript->pQuestAcceptNPC = &QuestAccept_npc_doctor; newscript->pQuestRewardedNPC = &QuestRewarded_npc_doctor; - newscript->pGossipHello = &GossipHello_npc_doctor; - newscript->pGossipSelect = &GossipSelect_npc_doctor; newscript->RegisterSelf(); newscript = new Script;