From 12b895e5baa5be30a64bc7d46813d681bde6fb93 Mon Sep 17 00:00:00 2001 From: warmech Date: Sun, 20 Apr 2014 23:00:32 -0500 Subject: Fixed spelling typo in gnomeregan.cpp script. Fixed a typo on line 32 where [GOSSIP_START_EVENT "I am ready to being"] should read [GOSSIP_START_EVENT "I am ready to begin."] --- src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/server/scripts') diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp index 2b50c525f78..9962ace5b94 100644 --- a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp +++ b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp @@ -29,7 +29,7 @@ Script Data End */ #include "ScriptedEscortAI.h" #include "Player.h" -#define GOSSIP_START_EVENT "I am ready to being" +#define GOSSIP_START_EVENT "I am ready to begin." enum BlastmasterEmi { -- cgit v1.2.3 From 6c0ff5717f14e90dfd92cf963c0805adae3c668b Mon Sep 17 00:00:00 2001 From: joschiwald Date: Mon, 21 Apr 2014 21:39:51 +0200 Subject: Scripts/Gnomeregan: moved Blastmaster Emi gossip to db --- sql/updates/world/2014_04_20_02_creature_text.sql | 4 -- .../world/2014_04_20_02_world_creature_text.sql | 4 ++ .../world/2014_04_20_03_gossip_menu_option.sql | 2 - .../2014_04_20_03_world_gossip_menu_option.sql | 2 + .../world/2014_04_21_05_world_gossip_menu.sql | 13 ++++++ src/server/scripts/Commands/cs_quest.cpp | 5 --- .../EasternKingdoms/Gnomeregan/gnomeregan.cpp | 49 +++++++--------------- 7 files changed, 34 insertions(+), 45 deletions(-) delete mode 100644 sql/updates/world/2014_04_20_02_creature_text.sql create mode 100644 sql/updates/world/2014_04_20_02_world_creature_text.sql delete mode 100644 sql/updates/world/2014_04_20_03_gossip_menu_option.sql create mode 100644 sql/updates/world/2014_04_20_03_world_gossip_menu_option.sql create mode 100644 sql/updates/world/2014_04_21_05_world_gossip_menu.sql (limited to 'src/server/scripts') diff --git a/sql/updates/world/2014_04_20_02_creature_text.sql b/sql/updates/world/2014_04_20_02_creature_text.sql deleted file mode 100644 index 0a5a064a72d..00000000000 --- a/sql/updates/world/2014_04_20_02_creature_text.sql +++ /dev/null @@ -1,4 +0,0 @@ --- -DELETE FROM `creature_text` WHERE `entry`=17123; -INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `broadcasttextid`) VALUES -(17123,0,0,'Welcome, kind spirit. What has brought you to us?',12,0,100,0,0,0,'',13512); diff --git a/sql/updates/world/2014_04_20_02_world_creature_text.sql b/sql/updates/world/2014_04_20_02_world_creature_text.sql new file mode 100644 index 00000000000..0a5a064a72d --- /dev/null +++ b/sql/updates/world/2014_04_20_02_world_creature_text.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `creature_text` WHERE `entry`=17123; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `broadcasttextid`) VALUES +(17123,0,0,'Welcome, kind spirit. What has brought you to us?',12,0,100,0,0,0,'',13512); diff --git a/sql/updates/world/2014_04_20_03_gossip_menu_option.sql b/sql/updates/world/2014_04_20_03_gossip_menu_option.sql deleted file mode 100644 index 7e6b7224173..00000000000 --- a/sql/updates/world/2014_04_20_03_gossip_menu_option.sql +++ /dev/null @@ -1,2 +0,0 @@ --- -UPDATE `gossip_menu_option` SET `option_text`='Chief Ashtotem, I have misplaced the token that you gave me.', `OptionBroadcastTextID`=22811 WHERE `menu_id`=8898 AND `id`=0; diff --git a/sql/updates/world/2014_04_20_03_world_gossip_menu_option.sql b/sql/updates/world/2014_04_20_03_world_gossip_menu_option.sql new file mode 100644 index 00000000000..7e6b7224173 --- /dev/null +++ b/sql/updates/world/2014_04_20_03_world_gossip_menu_option.sql @@ -0,0 +1,2 @@ +-- +UPDATE `gossip_menu_option` SET `option_text`='Chief Ashtotem, I have misplaced the token that you gave me.', `OptionBroadcastTextID`=22811 WHERE `menu_id`=8898 AND `id`=0; diff --git a/sql/updates/world/2014_04_21_05_world_gossip_menu.sql b/sql/updates/world/2014_04_21_05_world_gossip_menu.sql new file mode 100644 index 00000000000..9403c6f4de4 --- /dev/null +++ b/sql/updates/world/2014_04_21_05_world_gossip_menu.sql @@ -0,0 +1,13 @@ +UPDATE `creature_template` SET `gossip_menu_id`=1080, `speed_walk`=1, `speed_run`=1.142857, `rangeattacktime`=2000 WHERE `entry`=7998; + +DELETE FROM `gossip_menu` WHERE `entry`=1080; +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES +(1080, 1693); -- 7998 + +DELETE FROM `gossip_menu_option` WHERE `menu_id`=1080; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `OptionBroadcastTextID`, `option_id`, `npc_option_npcflag`, `box_coded`, `box_money`, `box_text`, `BoxBroadcastTextID`) VALUES +(1080, 0, 0, 'I am ready to begin.', 4084, 1, 1, 0, 0, '', 0); -- 7998 + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=1080; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,1080,0,0,0,13,1,1,0,0,0,0,0,'','Show gossip option only if Blastmaster Emi Encounter is not started'); diff --git a/src/server/scripts/Commands/cs_quest.cpp b/src/server/scripts/Commands/cs_quest.cpp index 369a8e87289..51eea4c2c6f 100644 --- a/src/server/scripts/Commands/cs_quest.cpp +++ b/src/server/scripts/Commands/cs_quest.cpp @@ -91,13 +91,8 @@ public: // ok, normal (creature/GO starting) quest if (player->CanAddQuest(quest, true)) - { player->AddQuestAndCheckCompletion(quest, NULL); - if (player->CanCompleteQuest(entry)) - player->CompleteQuest(entry); - } - return true; } diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp index 9962ace5b94..7d80d0c20b7 100644 --- a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp +++ b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp @@ -24,17 +24,13 @@ Script Data End */ #include "ScriptMgr.h" #include "ScriptedCreature.h" -#include "ScriptedGossip.h" -#include "gnomeregan.h" #include "ScriptedEscortAI.h" +#include "ScriptedGossip.h" #include "Player.h" - -#define GOSSIP_START_EVENT "I am ready to begin." +#include "gnomeregan.h" enum BlastmasterEmi { - GOSSIP_TEXT_EMI = 1693, - SAY_BLASTMASTER_0 = 0, SAY_BLASTMASTER_1 = 1, SAY_BLASTMASTER_2 = 2, @@ -93,34 +89,6 @@ public: return GetInstanceAI(creature); } - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE - { - player->PlayerTalkClass->ClearMenus(); - if (action == GOSSIP_ACTION_INFO_DEF+1) - { - if (npc_escortAI* pEscortAI = CAST_AI(npc_blastmaster_emi_shortfuse::npc_blastmaster_emi_shortfuseAI, creature->AI())) - pEscortAI->Start(true, false, player->GetGUID()); - - creature->setFaction(player->getFaction()); - creature->AI()->SetData(1, 0); - - player->CLOSE_GOSSIP_MENU(); - } - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) OVERRIDE - { - InstanceScript* instance = creature->GetInstanceScript(); - - if (instance && instance->GetData(TYPE_EVENT) == NOT_STARTED) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_START_EVENT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - - player->SEND_GOSSIP_MENU(GOSSIP_TEXT_EMI, creature->GetGUID()); - - return true; - } - struct npc_blastmaster_emi_shortfuseAI : public npc_escortAI { npc_blastmaster_emi_shortfuseAI(Creature* creature) : npc_escortAI(creature) @@ -152,6 +120,19 @@ public: } } + void sGossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) OVERRIDE + { + if (gossipListId == 0) + { + Start(true, false, player->GetGUID()); + + me->setFaction(player->getFaction()); + SetData(1, 0); + + player->PlayerTalkClass->SendCloseGossip(); + } + } + void NextStep(uint32 uiTimerStep, bool bNextStep = true, uint8 uiPhaseStep = 0) { uiTimer = uiTimerStep; -- cgit v1.2.3 From 805a026c6c8c40f1092eda64dc187b840c68d2bb Mon Sep 17 00:00:00 2001 From: joschiwald Date: Tue, 22 Apr 2014 16:07:27 +0200 Subject: DB/CreatureText: readd accidentally deleted text --- sql/updates/world/2014_04_22_02_world_creature_text.sql | 3 +++ .../TrialOfTheCrusader/instance_trial_of_the_crusader.cpp | 2 +- .../CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp | 4 ++-- .../CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h | 3 +-- 4 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 sql/updates/world/2014_04_22_02_world_creature_text.sql (limited to 'src/server/scripts') diff --git a/sql/updates/world/2014_04_22_02_world_creature_text.sql b/sql/updates/world/2014_04_22_02_world_creature_text.sql new file mode 100644 index 00000000000..356f7831f10 --- /dev/null +++ b/sql/updates/world/2014_04_22_02_world_creature_text.sql @@ -0,0 +1,3 @@ +DELETE FROM `creature_text` WHERE `entry`=16980 AND `groupid`=0; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`,`BroadcastTextID`) VALUES +(16980,0,0,'Intruders have breached the inner sanctum. Hasten the destruction of the green dragon! Leave only bones and sinew for the reanimation!',14,0,0,0,0,17251,'The Lich King - Valithria Dreamwalker - SAY_LICH_KING_INTRO',38682); diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp index c0e49fa43fb..9e02bb9bcf6 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp @@ -586,7 +586,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript case 5060: case 5070: case 5080: - return NPC_LICH_KING_1; + return NPC_LICH_KING; break; case 120: case 122: diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp index fdefde10b4f..6e835345d8b 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp @@ -275,7 +275,7 @@ class boss_lich_king_toc : public CreatureScript if (!_instance) return; - if (_instance->GetData(TYPE_EVENT_NPC) != NPC_LICH_KING_1) + if (_instance->GetData(TYPE_EVENT_NPC) != NPC_LICH_KING) return; _updateTimer = _instance->GetData(TYPE_EVENT_TIMER); @@ -764,7 +764,7 @@ class npc_tirion_toc : public CreatureScript case 5005: _updateTimer = 8*IN_MILLISECONDS; _instance->SetData(TYPE_EVENT, 5010); - me->SummonCreature(NPC_LICH_KING_1, ToCCommonLoc[2].GetPositionX(), ToCCommonLoc[2].GetPositionY(), ToCCommonLoc[2].GetPositionZ(), 5); + me->SummonCreature(NPC_LICH_KING, ToCCommonLoc[2].GetPositionX(), ToCCommonLoc[2].GetPositionY(), ToCCommonLoc[2].GetPositionZ(), 5); break; case 5020: Talk(SAY_STAGE_4_03); diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h index 17e4f2869c6..562105c0866 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h @@ -184,8 +184,7 @@ enum CreatureIds NPC_FIZZLEBANG = 35458, NPC_GARROSH = 34995, NPC_VARIAN = 34990, - NPC_LICH_KING_0 = 16980, - NPC_LICH_KING_1 = 35877, + NPC_LICH_KING = 35877, NPC_THRALL = 34994, NPC_PROUDMOORE = 34992, -- cgit v1.2.3