From 59557091a6cab47f0a653ef0ca7c2c8aa7635901 Mon Sep 17 00:00:00 2001 From: Gacko Date: Sun, 14 Oct 2012 17:24:59 +0200 Subject: Core/DB: Quest 'Distortions in time' --- src/server/scripts/Northrend/storm_peaks.cpp | 48 ++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'src/server/scripts') diff --git a/src/server/scripts/Northrend/storm_peaks.cpp b/src/server/scripts/Northrend/storm_peaks.cpp index 976a6e5dba5..5c375d84998 100644 --- a/src/server/scripts/Northrend/storm_peaks.cpp +++ b/src/server/scripts/Northrend/storm_peaks.cpp @@ -564,6 +564,53 @@ class npc_hyldsmeet_protodrake : public CreatureScript } }; +enum eCloseRift +{ + SPELL_DESPAWN_RIFT = 61665 +}; + +class spell_close_rift : public SpellScriptLoader +{ + public: + spell_close_rift() : SpellScriptLoader("spell_close_rift") { } + + class spell_close_rift_AuraScript : public AuraScript + { + PrepareAuraScript(spell_close_rift_AuraScript); + + bool Load() + { + counter = 0; + return true; + } + + bool Validate(SpellInfo const* /*spell*/) + { + return (bool) sSpellMgr->GetSpellInfo(SPELL_DESPAWN_RIFT); + } + + void HandlePeriodic(AuraEffect const* /* aurEff */) + { + if (++counter == 5) + GetTarget()->CastSpell((Unit*)NULL, SPELL_DESPAWN_RIFT, true); + } + + void Register() + { + OnEffectPeriodic += AuraEffectPeriodicFn(spell_close_rift_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); + } + + private: + uint8 counter; + + }; + + AuraScript* GetAuraScript() const + { + return new spell_close_rift_AuraScript(); + } +}; + void AddSC_storm_peaks() { new npc_agnetta_tyrsdottar(); @@ -574,4 +621,5 @@ void AddSC_storm_peaks() new npc_freed_protodrake(); new npc_icefang(); new npc_hyldsmeet_protodrake(); + new spell_close_rift(); } -- cgit v1.2.3 From 887509b1dede2f9fb4a3a16d025821d9fda99263 Mon Sep 17 00:00:00 2001 From: Gacko Date: Sun, 14 Oct 2012 19:18:41 +0200 Subject: Core/DB: Quest 'Distortions in time' --- sql/updates/world/2012-10-14-00-world_distortions_in_time.sql | 2 +- src/server/scripts/Northrend/storm_peaks.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/server/scripts') diff --git a/sql/updates/world/2012-10-14-00-world_distortions_in_time.sql b/sql/updates/world/2012-10-14-00-world_distortions_in_time.sql index 46d566c092d..fe74f8a7a80 100644 --- a/sql/updates/world/2012-10-14-00-world_distortions_in_time.sql +++ b/sql/updates/world/2012-10-14-00-world_distortions_in_time.sql @@ -1,7 +1,7 @@ -- Area conditions for Plant Chieftains Totem DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=56765; INSERT INTO `conditions`(`SourceTypeOrReferenceId`,`SourceEntry`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ErrorTextId`,`Comment`) VALUES -(17,56765,29,30446,10,64,'Plant Chieftains Totem only useable next to Rift'); +(17,56765,29,30446,15,64,'Plant Chieftains Totem only useable next to Rift'); -- Apply Close Rift to The Chieftain's Totem DELETE FROM `creature_template_addon` WHERE `entry`=30444; diff --git a/src/server/scripts/Northrend/storm_peaks.cpp b/src/server/scripts/Northrend/storm_peaks.cpp index 5c375d84998..de17fb843d8 100644 --- a/src/server/scripts/Northrend/storm_peaks.cpp +++ b/src/server/scripts/Northrend/storm_peaks.cpp @@ -586,7 +586,7 @@ class spell_close_rift : public SpellScriptLoader bool Validate(SpellInfo const* /*spell*/) { - return (bool) sSpellMgr->GetSpellInfo(SPELL_DESPAWN_RIFT); + return sSpellMgr->GetSpellInfo(SPELL_DESPAWN_RIFT); } void HandlePeriodic(AuraEffect const* /* aurEff */) -- cgit v1.2.3 From 1da4a8503cef12d51e9d14a86f21e272cdde19ad Mon Sep 17 00:00:00 2001 From: Gacko Date: Tue, 16 Oct 2012 12:01:48 +0200 Subject: Core: Quest 'Distortion in time' - Codestyle Replace enum name eCloseRift with CloseRift and add underscore to private member counter. --- src/server/scripts/Northrend/storm_peaks.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/server/scripts') diff --git a/src/server/scripts/Northrend/storm_peaks.cpp b/src/server/scripts/Northrend/storm_peaks.cpp index de17fb843d8..fc4f2785990 100644 --- a/src/server/scripts/Northrend/storm_peaks.cpp +++ b/src/server/scripts/Northrend/storm_peaks.cpp @@ -564,7 +564,7 @@ class npc_hyldsmeet_protodrake : public CreatureScript } }; -enum eCloseRift +enum CloseRift { SPELL_DESPAWN_RIFT = 61665 }; @@ -580,7 +580,7 @@ class spell_close_rift : public SpellScriptLoader bool Load() { - counter = 0; + _counter = 0; return true; } @@ -591,7 +591,7 @@ class spell_close_rift : public SpellScriptLoader void HandlePeriodic(AuraEffect const* /* aurEff */) { - if (++counter == 5) + if (++_counter == 5) GetTarget()->CastSpell((Unit*)NULL, SPELL_DESPAWN_RIFT, true); } @@ -601,7 +601,7 @@ class spell_close_rift : public SpellScriptLoader } private: - uint8 counter; + uint8 _counter; }; -- cgit v1.2.3 From 290ddd64fe0f3ab66ce06da0bec5f1f6ea4988e7 Mon Sep 17 00:00:00 2001 From: durotar Date: Tue, 16 Oct 2012 19:30:33 -0500 Subject: Core/Script: Update creature_text for gnomeregan --- .../EasternKingdoms/Gnomeregan/gnomeregan.cpp | 130 ++++++++++++--------- .../EasternKingdoms/Gnomeregan/gnomeregan.h | 3 +- 2 files changed, 74 insertions(+), 59 deletions(-) (limited to 'src/server/scripts') diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp index f1aa3d68bce..8b0774a4bd7 100644 --- a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp +++ b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp @@ -30,40 +30,41 @@ Script Data End */ #define GOSSIP_START_EVENT "I am ready to being" -enum eBlastmasterEmiShortfuse +enum BlastmasterEmi { GOSSIP_TEXT_EMI = 1693, - SAY_BLASTMASTER_0 = -1090000, - SAY_BLASTMASTER_1 = -1090001, - SAY_BLASTMASTER_2 = -1090002, - SAY_BLASTMASTER_3 = -1090003, - SAY_BLASTMASTER_4 = -1090004, - SAY_BLASTMASTER_5 = -1090005, - SAY_BLASTMASTER_6 = -1090006, - SAY_BLASTMASTER_7 = -1090007, - SAY_BLASTMASTER_8 = -1090008, - SAY_BLASTMASTER_9 = -1090009, - SAY_BLASTMASTER_10 = -1090010, - SAY_BLASTMASTER_11 = -1090011, - SAY_BLASTMASTER_12 = -1090012, - SAY_BLASTMASTER_13 = -1090013, - SAY_BLASTMASTER_14 = -1090014, - SAY_BLASTMASTER_15 = -1090015, - SAY_BLASTMASTER_16 = -1090016, - SAY_BLASTMASTER_17 = -1090017, - SAY_BLASTMASTER_18 = -1090018, - SAY_BLASTMASTER_19 = -1090019, - SAY_BLASTMASTER_20 = -1090020, - SAY_BLASTMASTER_21 = -1090021, - SAY_BLASTMASTER_22 = -1090022, - SAY_BLASTMASTER_23 = -1090023, - SAY_BLASTMASTER_24 = -1090024, - SAY_BLASTMASTER_25 = -1090025, - SAY_BLASTMASTER_26 = -1090026, - SAY_BLASTMASTER_27 = -1090027, - - SAY_GRUBBIS = -1090028 + SAY_BLASTMASTER_0 = 0, + SAY_BLASTMASTER_1 = 1, + SAY_BLASTMASTER_2 = 2, + SAY_BLASTMASTER_3 = 3, + SAY_BLASTMASTER_4 = 4, + SAY_BLASTMASTER_5 = 5, + SAY_BLASTMASTER_6 = 6, + SAY_BLASTMASTER_7 = 7, + SAY_BLASTMASTER_8 = 8, + SAY_BLASTMASTER_9 = 9, + SAY_BLASTMASTER_10 = 10, + SAY_BLASTMASTER_11 = 11, + SAY_BLASTMASTER_12 = 12, + SAY_BLASTMASTER_13 = 13, + SAY_BLASTMASTER_14 = 14, + SAY_BLASTMASTER_15 = 15, + SAY_BLASTMASTER_16 = 16, + SAY_BLASTMASTER_17 = 17, + SAY_BLASTMASTER_18 = 18, + SAY_BLASTMASTER_19 = 19, + SAY_BLASTMASTER_20 = 20, + SAY_BLASTMASTER_21 = 21, + SAY_BLASTMASTER_22 = 22, + SAY_BLASTMASTER_23 = 23, + SAY_BLASTMASTER_24 = 24, + SAY_BLASTMASTER_25 = 25, + SAY_BLASTMASTER_26 = 26, + SAY_BLASTMASTER_27 = 27, + SAY_BLASTMASTER_28 = 28, + + SAY_GRUBBIS = 0 }; const Position SpawnPosition[] = @@ -78,13 +79,16 @@ const Position SpawnPosition[] = {-552.534f, -110.012f, -153.577f, 0.747f}, {-550.708f, -116.436f, -153.103f, 0.679f}, {-554.030f, -115.983f, -152.635f, 0.695f}, - {-494.595f, -87.516f, 149.116f, 3.344f}, + {-494.595f, -87.516f, -149.116f, 3.344f}, {-493.349f, -90.845f, -148.882f, 3.717f}, {-491.995f, -87.619f, -148.197f, 3.230f}, {-490.732f, -90.739f, -148.091f, 3.230f}, {-490.554f, -89.114f, -148.055f, 3.230f}, {-495.240f, -90.808f, -149.493f, 3.238f}, - {-494.195f, -89.553f, -149.131f, 3.254f} + {-494.195f, -89.553f, -149.131f, 3.254f}, + {-511.3304f, -139.9622f, -152.4761f}, + {-510.6754f, -139.4371f, -152.6167f}, + {-511.8976f, -139.3562f, -152.4785f} }; class npc_blastmaster_emi_shortfuse : public CreatureScript @@ -305,7 +309,7 @@ public: break; case 14: SetInFace(false); - DoScriptText(SAY_BLASTMASTER_26, me); + Talk(SAY_BLASTMASTER_26); SetEscortPaused(true); NextStep(5000, false, 20); break; @@ -318,8 +322,8 @@ public: { case 1: SetEscortPaused(true); - DoScriptText(SAY_BLASTMASTER_0, me); - NextStep(1500, true); + Talk(SAY_BLASTMASTER_0); + NextStep(2000, true); break; case 2: if (!instance) @@ -368,7 +372,7 @@ public: me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000); me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000); me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[3], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000); - DoScriptText(SAY_BLASTMASTER_19, me); + Talk(SAY_BLASTMASTER_19); break; case 4: if (GameObject* go = me->SummonGameObject(183410, -542.199f, -96.854f, -155.790f, 0, 0, 0, 0, 0, 1000)) @@ -381,7 +385,7 @@ public: me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000); me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000); me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000); - DoScriptText(SAY_BLASTMASTER_15, me); + Talk(SAY_BLASTMASTER_15); break; case 6: me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[10], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000); @@ -406,10 +410,15 @@ public: } break; case 9: - if (Creature* pGrubbis = me->SummonCreature(NPC_GRUBBIS, SpawnPosition[15], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000)) - DoScriptText(SAY_GRUBBIS, pGrubbis); + if (Creature* grubbis = me->SummonCreature(NPC_GRUBBIS, SpawnPosition[15], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000)) + grubbis->AI()->Talk(SAY_GRUBBIS); me->SummonCreature(NPC_CHOMPER, SpawnPosition[16], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000); break; + case 10: + me->SummonGameObject(GO_RED_ROCKET, SpawnPosition[17].GetPositionX(), SpawnPosition[17].GetPositionY(), SpawnPosition[17].GetPositionZ(), 0.7504908f, 0, 0, 0, 0, 7200); + me->SummonGameObject(GO_RED_ROCKET, SpawnPosition[18].GetPositionX(), SpawnPosition[18].GetPositionY(), SpawnPosition[18].GetPositionZ(), 3.33359f, 0, 0, 0, 0, 7200); + me->SummonGameObject(GO_RED_ROCKET, SpawnPosition[19].GetPositionX(), SpawnPosition[19].GetPositionY(), SpawnPosition[19].GetPositionZ(), 3.961899f, 0, 0, 0, 0, 7200); + break; } } @@ -422,29 +431,29 @@ public: switch (uiPhase) { case 1: - DoScriptText(SAY_BLASTMASTER_1, me); - NextStep(1500, true); + Talk(SAY_BLASTMASTER_1); + NextStep(2000, true); break; case 2: SetEscortPaused(false); NextStep(0, false, 0); break; case 3: - DoScriptText(SAY_BLASTMASTER_2, me); + Talk(SAY_BLASTMASTER_2); SetEscortPaused(false); NextStep(0, false, 0); break; case 4: - DoScriptText(SAY_BLASTMASTER_3, me); + Talk(SAY_BLASTMASTER_3); NextStep(3000, true); break; case 5: - DoScriptText(SAY_BLASTMASTER_4, me); + Talk(SAY_BLASTMASTER_4); NextStep(3000, true); break; case 6: SetInFace(true); - DoScriptText(SAY_BLASTMASTER_5, me); + Talk(SAY_BLASTMASTER_5); Summon(1); if (instance) if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_GO_CAVE_IN_RIGHT))) @@ -452,12 +461,12 @@ public: NextStep(3000, true); break; case 7: - DoScriptText(SAY_BLASTMASTER_6, me); + Talk(SAY_BLASTMASTER_6); SetEscortPaused(false); NextStep(0, false, 0); break; case 8: - me->HandleEmoteCommand(EMOTE_STATE_WORK); + me->HandleEmoteCommand(EMOTE_STATE_USE_STANDING); NextStep(25000, true); break; case 9: @@ -469,28 +478,28 @@ public: NextStep(0, false); break; case 11: - DoScriptText(SAY_BLASTMASTER_17, me); + Talk(SAY_BLASTMASTER_17); NextStep(5000, true); break; case 12: - DoScriptText(SAY_BLASTMASTER_18, me); + Talk(SAY_BLASTMASTER_18); NextStep(5000, true); break; case 13: - DoScriptText(SAY_BLASTMASTER_20, me); + Talk(SAY_BLASTMASTER_20); CaveDestruction(true); NextStep(8000, true); break; case 14: - DoScriptText(SAY_BLASTMASTER_21, me); + Talk(SAY_BLASTMASTER_21); NextStep(8500, true); break; case 15: - DoScriptText(SAY_BLASTMASTER_22, me); + Talk(SAY_BLASTMASTER_22); NextStep(2000, true); break; case 16: - DoScriptText(SAY_BLASTMASTER_23, me); + Talk(SAY_BLASTMASTER_23); SetInFace(false); if (instance) if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_GO_CAVE_IN_LEFT))) @@ -499,7 +508,7 @@ public: break; case 17: SetEscortPaused(false); - DoScriptText(SAY_BLASTMASTER_24, me); + Talk(SAY_BLASTMASTER_24); Summon(6); NextStep(0, false); break; @@ -510,11 +519,11 @@ public: case 19: SetInFace(false); Summon(8); - DoScriptText(SAY_BLASTMASTER_25, me); + Talk(SAY_BLASTMASTER_25); NextStep(0, false); break; case 20: - DoScriptText(SAY_BLASTMASTER_27, me); + Talk(SAY_BLASTMASTER_27); NextStep(2000, true); break; case 21: @@ -523,7 +532,12 @@ public: break; case 22: CaveDestruction(false); - DoScriptText(SAY_BLASTMASTER_20, me); + Talk(SAY_BLASTMASTER_20); + NextStep(2000, true); + break; + case 23: + Summon(10); + Talk(SAY_BLASTMASTER_28); NextStep(0, false); break; } diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h index a62cf9f9cae..068ba5d26af 100644 --- a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h +++ b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h @@ -21,7 +21,8 @@ enum eGameObjects { GO_CAVE_IN_LEFT = 146085, - GO_CAVE_IN_RIGHT = 146086 + GO_CAVE_IN_RIGHT = 146086, + GO_RED_ROCKET = 103820 }; enum eCreatures -- cgit v1.2.3 From e56ef015ab9fdd37b0a5fc811412458329a8e4bc Mon Sep 17 00:00:00 2001 From: durotar Date: Tue, 16 Oct 2012 19:51:57 -0500 Subject: Added some suggestions from Subv --- src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/server/scripts') diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp index 8b0774a4bd7..65dc6c37d8a 100644 --- a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp +++ b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp @@ -86,9 +86,9 @@ const Position SpawnPosition[] = {-490.554f, -89.114f, -148.055f, 3.230f}, {-495.240f, -90.808f, -149.493f, 3.238f}, {-494.195f, -89.553f, -149.131f, 3.254f}, - {-511.3304f, -139.9622f, -152.4761f}, - {-510.6754f, -139.4371f, -152.6167f}, - {-511.8976f, -139.3562f, -152.4785f} + {-511.3304f, -139.9622f, -152.4761f, 0.7504908f}, + {-510.6754f, -139.4371f, -152.6167f, 3.33359f}, + {-511.8976f, -139.3562f, -152.4785f, 3.961899f} }; class npc_blastmaster_emi_shortfuse : public CreatureScript @@ -415,9 +415,9 @@ public: me->SummonCreature(NPC_CHOMPER, SpawnPosition[16], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000); break; case 10: - me->SummonGameObject(GO_RED_ROCKET, SpawnPosition[17].GetPositionX(), SpawnPosition[17].GetPositionY(), SpawnPosition[17].GetPositionZ(), 0.7504908f, 0, 0, 0, 0, 7200); - me->SummonGameObject(GO_RED_ROCKET, SpawnPosition[18].GetPositionX(), SpawnPosition[18].GetPositionY(), SpawnPosition[18].GetPositionZ(), 3.33359f, 0, 0, 0, 0, 7200); - me->SummonGameObject(GO_RED_ROCKET, SpawnPosition[19].GetPositionX(), SpawnPosition[19].GetPositionY(), SpawnPosition[19].GetPositionZ(), 3.961899f, 0, 0, 0, 0, 7200); + me->SummonGameObject(GO_RED_ROCKET, SpawnPosition[17].GetPositionX(), SpawnPosition[17].GetPositionY(), SpawnPosition[17].GetPositionZ(), SpawnPosition[17].GetOrientation(), 0, 0, 0, 0, 7200); + me->SummonGameObject(GO_RED_ROCKET, SpawnPosition[18].GetPositionX(), SpawnPosition[18].GetPositionY(), SpawnPosition[18].GetPositionZ(), SpawnPosition[18].GetOrientation(), 0, 0, 0, 0, 7200); + me->SummonGameObject(GO_RED_ROCKET, SpawnPosition[19].GetPositionX(), SpawnPosition[19].GetPositionY(), SpawnPosition[19].GetPositionZ(), SpawnPosition[19].GetOrientation(), 0, 0, 0, 0, 7200); break; } } -- cgit v1.2.3 From 67a03027ae6a2ea93904f1cc6652b6aa60ed8b07 Mon Sep 17 00:00:00 2001 From: Spp Date: Fri, 19 Oct 2012 17:47:51 +0200 Subject: Proper naming of LfgDungeon structures --- src/server/game/DataStores/DBCStores.cpp | 2 +- src/server/game/DataStores/DBCStores.h | 2 +- src/server/game/DataStores/DBCStructure.h | 2 +- src/server/game/DungeonFinding/LFGMgr.cpp | 22 +++++++++++----------- src/server/game/DungeonFinding/LFGMgr.h | 12 ++++++------ src/server/game/Entities/Player/Player.cpp | 4 ++-- src/server/game/Groups/Group.cpp | 2 +- src/server/game/Handlers/LFGHandler.cpp | 6 +++--- src/server/game/Maps/Map.cpp | 4 ++-- src/server/scripts/Spells/spell_generic.cpp | 4 ++-- 10 files changed, 30 insertions(+), 30 deletions(-) (limited to 'src/server/scripts') diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp index 16595eb16dd..850c58bdf93 100755 --- a/src/server/game/DataStores/DBCStores.cpp +++ b/src/server/game/DataStores/DBCStores.cpp @@ -118,7 +118,7 @@ DBCStorage sItemRandomPropertiesStore(ItemRandomProp DBCStorage sItemRandomSuffixStore(ItemRandomSuffixfmt); DBCStorage sItemSetStore(ItemSetEntryfmt); -DBCStorage sLFGDungeonStore(LFGDungeonEntryfmt); +DBCStorage sLFGDungeonStore(LFGDungeonEntryfmt); DBCStorage sLiquidTypeStore(LiquidTypefmt); DBCStorage sLockStore(LockEntryfmt); diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h index f6fabb5a73d..cd30ed587f8 100755 --- a/src/server/game/DataStores/DBCStores.h +++ b/src/server/game/DataStores/DBCStores.h @@ -120,7 +120,7 @@ extern DBCStorage sItemLimitCategoryStore; extern DBCStorage sItemRandomPropertiesStore; extern DBCStorage sItemRandomSuffixStore; extern DBCStorage sItemSetStore; -extern DBCStorage sLFGDungeonStore; +extern DBCStorage sLFGDungeonStore; extern DBCStorage sLiquidTypeStore; extern DBCStorage sLockStore; extern DBCStorage sMailTemplateStore; diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index 2fc61e69fe2..20eab098add 100755 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -1193,7 +1193,7 @@ struct ItemSetEntry uint32 required_skill_value; // 52 m_requiredSkillRank }; -struct LFGDungeonEntryDbc +struct LFGDungeonEntry { uint32 ID; // 0 char* name[16]; // 1-17 Name lang diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp index 16fda8952ac..a19034a76ec 100755 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -239,7 +239,7 @@ void LFGMgr::LoadRewards() sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u lfg dungeon rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } -LFGDungeonEntry const* LFGMgr::GetLFGDungeon(uint32 id) +LFGDungeonData const* LFGMgr::GetLFGDungeon(uint32 id) { LFGDungeonMap::const_iterator itr = m_LfgDungeonMap.find(id); if (itr != m_LfgDungeonMap.end()) @@ -262,7 +262,7 @@ void LFGMgr::LoadLFGDungeons(bool reload /* = false */) // Initialize Dungeon map with data from dbcs for (uint32 i = 0; i < sLFGDungeonStore.GetNumRows(); ++i) { - LFGDungeonEntryDbc const* dungeon = sLFGDungeonStore.LookupEntry(i); + LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(i); if (!dungeon) continue; @@ -272,7 +272,7 @@ void LFGMgr::LoadLFGDungeons(bool reload /* = false */) case LFG_TYPE_HEROIC: case LFG_TYPE_RAID: case LFG_TYPE_RANDOM: - m_LfgDungeonMap[dungeon->ID] = LFGDungeonEntry(dungeon); + m_LfgDungeonMap[dungeon->ID] = LFGDungeonData(dungeon); break; } } @@ -299,7 +299,7 @@ void LFGMgr::LoadLFGDungeons(bool reload /* = false */) continue; } - LFGDungeonEntry& data = dungeonItr->second; + LFGDungeonData& data = dungeonItr->second; data.x = fields[1].GetFloat(); data.y = fields[2].GetFloat(); data.z = fields[3].GetFloat(); @@ -314,7 +314,7 @@ void LFGMgr::LoadLFGDungeons(bool reload /* = false */) // Fill all other teleport coords from areatriggers for (LFGDungeonMap::iterator itr = m_LfgDungeonMap.begin(); itr != m_LfgDungeonMap.end(); ++itr) { - LFGDungeonEntry& dungeon = itr->second; + LFGDungeonData& dungeon = itr->second; // No teleport coords in database, load from areatriggers if (dungeon.x == 0.0f && dungeon.y == 0.0f && dungeon.z == 0.0f) { @@ -462,7 +462,7 @@ void LFGMgr::InitializeLockedDungeons(Player* player, uint8 level /* = 0 */) for (LfgDungeonSet::const_iterator it = dungeons.begin(); it != dungeons.end(); ++it) { - LFGDungeonEntry const* dungeon = GetLFGDungeon(*it); + LFGDungeonData const* dungeon = GetLFGDungeon(*it); if (!dungeon) // should never happen - We provide a list from sLFGDungeonStore continue; @@ -1014,7 +1014,7 @@ void LFGMgr::MakeNewGroup(const LfgProposal& proposal) } // Set the dungeon difficulty - LFGDungeonEntry const* dungeon = GetLFGDungeon(proposal.dungeonId); + LFGDungeonData const* dungeon = GetLFGDungeon(proposal.dungeonId); ASSERT(dungeon); Group* grp = proposal.group ? sGroupMgr->GetGroupByGUID(GUID_LOPART(proposal.group)) : NULL; @@ -1384,7 +1384,7 @@ void LFGMgr::TeleportPlayer(Player* player, bool out, bool fromOpcode /*= false* Group* grp = player->GetGroup(); uint64 gguid = grp->GetGUID(); - LFGDungeonEntry const* dungeon = GetLFGDungeon(GetDungeon(gguid)); + LFGDungeonData const* dungeon = GetLFGDungeon(GetDungeon(gguid)); if (!dungeon || (out && player->GetMapId() != uint32(dungeon->map))) return; @@ -1501,7 +1501,7 @@ void LFGMgr::RewardDungeonDoneFor(const uint32 dungeonId, Player* player) SetState(guid, LFG_STATE_FINISHED_DUNGEON); // Give rewards only if its a random or seasonal dungeon - LFGDungeonEntry const* dungeon = GetLFGDungeon(rDungeonId); + LFGDungeonData const* dungeon = GetLFGDungeon(rDungeonId); if (!dungeon || (dungeon->type != LFG_TYPE_RANDOM && !dungeon->seasonal)) { sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::RewardDungeonDoneFor: [" UI64FMTD "] dungeon %u is not random nor seasonal", guid, rDungeonId); @@ -1551,7 +1551,7 @@ void LFGMgr::RewardDungeonDoneFor(const uint32 dungeonId, Player* player) */ const LfgDungeonSet& LFGMgr::GetDungeonsByRandom(uint32 randomdungeon) { - LFGDungeonEntry const* dungeon = GetLFGDungeon(randomdungeon); + LFGDungeonData const* dungeon = GetLFGDungeon(randomdungeon); uint32 group = dungeon ? dungeon->group : 0; return m_CachedDungeonMap[group]; } @@ -1586,7 +1586,7 @@ LfgReward const* LFGMgr::GetRandomDungeonReward(uint32 dungeon, uint8 level) */ LfgType LFGMgr::GetDungeonType(uint32 dungeonId) { - LFGDungeonEntry const* dungeon = GetLFGDungeon(dungeonId); + LFGDungeonData const* dungeon = GetLFGDungeon(dungeonId); if (!dungeon) return LFG_TYPE_NONE; diff --git a/src/server/game/DungeonFinding/LFGMgr.h b/src/server/game/DungeonFinding/LFGMgr.h index 1f9c9cf3b2c..39cdd390792 100755 --- a/src/server/game/DungeonFinding/LFGMgr.h +++ b/src/server/game/DungeonFinding/LFGMgr.h @@ -117,7 +117,7 @@ enum LfgRoleCheckState }; // Forward declaration (just to have all typedef together) -struct LFGDungeonEntry; +struct LFGDungeonData; struct LfgReward; struct LfgQueueInfo; struct LfgRoleCheck; @@ -136,7 +136,7 @@ typedef std::map LfgProposalPlayerMap; typedef std::map LfgPlayerBootMap; typedef std::map LfgGroupDataMap; typedef std::map LfgPlayerDataMap; -typedef UNORDERED_MAP LFGDungeonMap; +typedef UNORDERED_MAP LFGDungeonMap; // Data needed by SMSG_LFG_JOIN_RESULT struct LfgJoinResultData @@ -251,12 +251,12 @@ struct LfgPlayerBoot std::string reason; ///< kick reason }; -struct LFGDungeonEntry +struct LFGDungeonData { - LFGDungeonEntry(): id(0), name(""), map(0), type(0), expansion(0), group(0), minlevel(0), + LFGDungeonData(): id(0), name(""), map(0), type(0), expansion(0), group(0), minlevel(0), maxlevel(0), difficulty(REGULAR_DIFFICULTY), seasonal(false), x(0.0f), y(0.0f), z(0.0f), o(0.0f) { } - LFGDungeonEntry(LFGDungeonEntryDbc const* dbc): id(dbc->ID), name(dbc->name[0]), map(dbc->map), + LFGDungeonData(LFGDungeonEntry const* dbc): id(dbc->ID), name(dbc->name[0]), map(dbc->map), type(dbc->type), expansion(dbc->expansion), group(dbc->grouptype), minlevel(dbc->minlevel), maxlevel(dbc->maxlevel), difficulty(Difficulty(dbc->difficulty)), seasonal(dbc->flags & LFG_FLAG_SEASONAL), x(0.0f), y(0.0f), z(0.0f), o(0.0f) @@ -358,7 +358,7 @@ class LFGMgr static char const * GetStateString(LfgState state); void LoadLFGDungeons(bool reload = false); - LFGDungeonEntry const* GetLFGDungeon(uint32 id); + LFGDungeonData const* GetLFGDungeon(uint32 id); LFGDungeonMap& GetLFGDungeonMap(); void ClearState(uint64 guid, char const *debugMsg); diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 93a0580a866..e06463bf0aa 100755 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -11901,7 +11901,7 @@ InventoryResult Player::CanRollForItemInLFG(ItemTemplate const* proto, WorldObje bool lootedObjectInDungeon = false; Map const* map = lootedObject->GetMap(); if (uint32 dungeonId = sLFGMgr->GetDungeon(GetGroup()->GetGUID(), true)) - if (LFGDungeonEntry const* dungeon = sLFGMgr->GetLFGDungeon(dungeonId)) + if (LFGDungeonData const* dungeon = sLFGMgr->GetLFGDungeon(dungeonId)) if (uint32(dungeon->map) == map->GetId() && dungeon->difficulty == uint32(map->GetDifficulty())) lootedObjectInDungeon = true; @@ -23304,7 +23304,7 @@ bool Player::inRandomLfgDungeon() const LfgDungeonSet& dungeons = sLFGMgr->GetSelectedDungeons(GetGUID()); if (!dungeons.empty()) { - LFGDungeonEntry const* dungeon = sLFGMgr->GetLFGDungeon(*dungeons.begin()); + LFGDungeonData const* dungeon = sLFGMgr->GetLFGDungeon(*dungeons.begin()); if (dungeon && (dungeon->type == LFG_TYPE_RANDOM || dungeon->seasonal)) return true; } diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp index f4106730e49..11d9f502bab 100755 --- a/src/server/game/Groups/Group.cpp +++ b/src/server/game/Groups/Group.cpp @@ -600,7 +600,7 @@ bool Group::RemoveMember(uint64 guid, const RemoveMethod &method /*= GROUP_REMOV if (isLFGGroup() && GetMembersCount() == 1) { Player* Leader = ObjectAccessor::FindPlayer(GetLeaderGUID()); - LFGDungeonEntry const* dungeon = sLFGMgr->GetLFGDungeon(sLFGMgr->GetDungeon(GetGUID())); + LFGDungeonData const* dungeon = sLFGMgr->GetLFGDungeon(sLFGMgr->GetDungeon(GetGUID())); if ((Leader && dungeon && Leader->isAlive() && Leader->GetMapId() != uint32(dungeon->map)) || !dungeon) { Disband(); diff --git a/src/server/game/Handlers/LFGHandler.cpp b/src/server/game/Handlers/LFGHandler.cpp index 4f208d33bde..116afdf8c75 100755 --- a/src/server/game/Handlers/LFGHandler.cpp +++ b/src/server/game/Handlers/LFGHandler.cpp @@ -165,7 +165,7 @@ void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recv_data LFGDungeonMap& LfgDungeons = sLFGMgr->GetLFGDungeonMap(); for (LFGDungeonMap::const_iterator itr = LfgDungeons.begin(); itr != LfgDungeons.end(); ++itr) { - LFGDungeonEntry const& dungeon = itr->second; + LFGDungeonData const& dungeon = itr->second; if ((dungeon.type == LFG_TYPE_RANDOM || (dungeon.seasonal && sLFGMgr->IsSeasonActive(dungeon.id))) && dungeon.expansion <= expansion && dungeon.minlevel <= level && level <= dungeon.maxlevel) randomDungeons.insert(dungeon.Entry()); @@ -403,7 +403,7 @@ void WorldSession::SendLfgRoleCheckUpdate(const LfgRoleCheck& roleCheck) { for (LfgDungeonSet::iterator it = dungeons.begin(); it != dungeons.end(); ++it) { - LFGDungeonEntry const* dungeon = sLFGMgr->GetLFGDungeon(*it); + LFGDungeonData const* dungeon = sLFGMgr->GetLFGDungeon(*it); data << uint32(dungeon ? dungeon->Entry() : 0); // Dungeon } } @@ -552,7 +552,7 @@ void WorldSession::SendLfgUpdateProposal(uint32 proposalId, LfgProposal const& p dungeonEntry = (*playerDungeons.begin()); } - if (LFGDungeonEntry const* dungeon = sLFGMgr->GetLFGDungeon(dungeonEntry)) + if (LFGDungeonData const* dungeon = sLFGMgr->GetLFGDungeon(dungeonEntry)) dungeonEntry = dungeon->Entry(); data << uint32(dungeonEntry); // Dungeon diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index c3c6befe2f9..51435d6df9b 100755 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -2468,8 +2468,8 @@ bool InstanceMap::AddPlayerToMap(Player* player) if (group && group->isLFGGroup()) if (uint32 dungeonId = sLFGMgr->GetDungeon(group->GetGUID(), true)) - if (LFGDungeonEntry const* dungeon = sLFGMgr->GetLFGDungeon(dungeonId)) - if (LFGDungeonEntry const* randomDungeon = sLFGMgr->GetLFGDungeon(*(sLFGMgr->GetSelectedDungeons(player->GetGUID()).begin()))) + if (LFGDungeonData const* dungeon = sLFGMgr->GetLFGDungeon(dungeonId)) + if (LFGDungeonData const* randomDungeon = sLFGMgr->GetLFGDungeon(*(sLFGMgr->GetSelectedDungeons(player->GetGUID()).begin()))) if (uint32(dungeon->map) == GetId() && dungeon->difficulty == uint32(GetDifficulty()) && randomDungeon->type == uint32(LFG_TYPE_RANDOM)) player->CastSpell(player, LFG_SPELL_LUCK_OF_THE_DRAW, true); } diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 547cb3dba51..519d79add6d 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -1581,12 +1581,12 @@ class spell_gen_luck_of_the_draw : public SpellScriptLoader } - LFGDungeonEntry const* randomDungeon = sLFGMgr->GetLFGDungeon(*itr); + LFGDungeonData const* randomDungeon = sLFGMgr->GetLFGDungeon(*itr); if (Group* group = owner->GetGroup()) if (Map const* map = owner->GetMap()) if (group->isLFGGroup()) if (uint32 dungeonId = sLFGMgr->GetDungeon(group->GetGUID(), true)) - if (LFGDungeonEntry const* dungeon = sLFGMgr->GetLFGDungeon(dungeonId)) + if (LFGDungeonData const* dungeon = sLFGMgr->GetLFGDungeon(dungeonId)) if (uint32(dungeon->map) == map->GetId() && dungeon->difficulty == uint32(map->GetDifficulty())) if (randomDungeon && randomDungeon->type == LFG_TYPE_RANDOM) return; // in correct dungeon -- cgit v1.2.3 From 0b7a842b61cee07141db4ec674fd8fb4edfc6d56 Mon Sep 17 00:00:00 2001 From: Gacko Date: Sat, 20 Oct 2012 15:01:04 +0200 Subject: Core/DB: Quest 'Gordunni Cobalt' SpellScript and conditions for spells of this quest. --- .../2012_10_20_01_world_spell_script_names.sql | 8 ++++++ src/server/scripts/Kalimdor/feralas.cpp | 33 ++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 sql/updates/world/2012_10_20_01_world_spell_script_names.sql (limited to 'src/server/scripts') diff --git a/sql/updates/world/2012_10_20_01_world_spell_script_names.sql b/sql/updates/world/2012_10_20_01_world_spell_script_names.sql new file mode 100644 index 00000000000..a8830806a83 --- /dev/null +++ b/sql/updates/world/2012_10_20_01_world_spell_script_names.sql @@ -0,0 +1,8 @@ +-- Spellscript and conditions for spells of quest Gordunni Cobalt +DELETE FROM `spell_script_names` WHERE `spell_id`=19395; +INSERT INTO `spell_script_names`(`spell_id`,`ScriptName`) VALUES +(19395,'spell_gordunni_trap'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=11757; +INSERT INTO `conditions`(`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`Comment`) VALUES +(11757,1,13,31,5,144050,'Digging for Cobalt targets Gordunni Trap'); diff --git a/src/server/scripts/Kalimdor/feralas.cpp b/src/server/scripts/Kalimdor/feralas.cpp index 4fcd20951c9..c978b9c7531 100644 --- a/src/server/scripts/Kalimdor/feralas.cpp +++ b/src/server/scripts/Kalimdor/feralas.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" +#include "SpellScript.h" /*###### ## npc_gregan_brewspewer @@ -201,6 +202,37 @@ public: } }; +enum GordunniTrap +{ + GO_GORDUNNI_DIRT_MOUND = 144064, +}; +class spell_gordunni_trap : public SpellScriptLoader +{ + public: + spell_gordunni_trap() : SpellScriptLoader("spell_gordunni_trap") { } + + class spell_gordunni_trap_SpellScript : public SpellScript + { + PrepareSpellScript(spell_gordunni_trap_SpellScript); + + void HandleDummy() + { + if (Unit* caster = GetCaster()) + if (GameObject* chest = caster->SummonGameObject(GO_GORDUNNI_DIRT_MOUND, caster->GetPositionX(), caster->GetPositionY(), caster->GetPositionZ(), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0)) + chest->SetSpellId(GetSpellInfo()->Id); + } + + void Register() + { + OnCast += SpellCastFn(spell_gordunni_trap_SpellScript::HandleDummy); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_gordunni_trap_SpellScript(); + } +}; /*###### ## AddSC @@ -211,4 +243,5 @@ void AddSC_feralas() new npc_gregan_brewspewer(); new npc_oox22fe(); new npc_screecher_spirit(); + new spell_gordunni_trap(); } -- cgit v1.2.3 From ae199b48393ee670ed00c7a3350f468228ec31b9 Mon Sep 17 00:00:00 2001 From: Gacko Date: Sat, 20 Oct 2012 15:53:11 +0200 Subject: Core/DB: Quest 'Gordunni Cobalt' - Codestyle --- src/server/scripts/Kalimdor/feralas.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/server/scripts') diff --git a/src/server/scripts/Kalimdor/feralas.cpp b/src/server/scripts/Kalimdor/feralas.cpp index c978b9c7531..c1e247044f7 100644 --- a/src/server/scripts/Kalimdor/feralas.cpp +++ b/src/server/scripts/Kalimdor/feralas.cpp @@ -202,10 +202,12 @@ public: } }; + enum GordunniTrap { GO_GORDUNNI_DIRT_MOUND = 144064, }; + class spell_gordunni_trap : public SpellScriptLoader { public: -- cgit v1.2.3 From 998c74ebe0e7031c2cb7dcf8b9763e1f6f741261 Mon Sep 17 00:00:00 2001 From: durotar Date: Sat, 20 Oct 2012 11:44:43 -0500 Subject: Core/Script: Gnomeregan - Deleting duplicate texts and adjusted the script --- .../world/2012_10_19_00_world_creature_text.sql | 36 ------------ .../world/2012_10_20_02_world_creature_text.sql | 27 +++++++++ .../EasternKingdoms/Gnomeregan/gnomeregan.cpp | 66 +++++++++------------- 3 files changed, 53 insertions(+), 76 deletions(-) delete mode 100644 sql/updates/world/2012_10_19_00_world_creature_text.sql create mode 100644 sql/updates/world/2012_10_20_02_world_creature_text.sql (limited to 'src/server/scripts') diff --git a/sql/updates/world/2012_10_19_00_world_creature_text.sql b/sql/updates/world/2012_10_19_00_world_creature_text.sql deleted file mode 100644 index aad3627a26a..00000000000 --- a/sql/updates/world/2012_10_19_00_world_creature_text.sql +++ /dev/null @@ -1,36 +0,0 @@ --- Gnomeregan/Blastmaster Emi Shortfuse's event -DELETE FROM `script_texts` WHERE `entry` BETWEEN -1090028 AND -1090000; -DELETE FROM `creature_text` WHERE `entry` IN (7361,7998); -INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES --- Emi Shortfuse -(7998,0,0, 'With your help, I can evaluate these tunnels.',12,0,100,0,0,0, 'SAY_BLASTMASTER_0'), -(7998,1,0, 'Let''s see if we can find out where these Troggs are coming from... and put a stop to the invasion!',12,0,100,0,0,0, 'SAY_BLASTMASTER_1'), -(7998,2,0, 'Such devastation... what horrible mess...',12,0,100,0,0,0, 'SAY_BLASTMASTER_2'), -(7998,3,0, 'It''s quiet here...',12,0,100,0,0,0, 'SAY_BLASTMASTER_3'), -(7998,4,0, '...too quiet.',12,0,100,0,0,0, 'SAY_BLASTMASTER_4'), -(7998,5,0, 'Look! Over there at the tunnel wall!',12,0,100,0,0,0, 'SAY_BLASTMASTER_5'), -(7998,6,0, 'Trogg incrusion! Defend me while I blast the hole closed!',12,0,100,0,0,0, 'SAY_BLASTMASTER_6'), -(7998,7,0, 'The charges are set. Get back before they blow!',12,0,100,0,0,0, 'SAY_BLASTMASTER_7'), -(7998,8,0, 'Incoming blast in 10 seconds!',14,0,100,0,0,0, 'SAY_BLASTMASTER_8'), -(7998,9,0, 'Incoming blast in 5 seconds. Clear the tunnel!',14,0,100,0,0,0, 'SAY_BLASTMASTER_9'), -(7998,10,0, 'FIRE IN THE HOLE!',14,0,100,0,0,0, 'SAY_BLASTMASTER_10'), -(7998,11,0, 'Well done! Without your help I would have never been able to thwart that wave of troggs.',12,0,100,0,0,0, 'SAY_BLASTMASTER_11'), -(7998,12,0, 'Did you hear something?',12,0,100,0,0,0, 'SAY_BLASTMASTER_12'), -(7998,13,0, 'I heard something over there.',12,0,100,0,0,0, 'SAY_BLASTMASTER_13'), -(7998,14,0, 'More troggs! Ward them off as I prepare the explosives!',12,0,100,0,0,0, 'SAY_BLASTMASTER_14'), -(7998,15,0, 'The final charge is set. Stand back!',12,0,100,0,0,0, 'SAY_BLASTMASTER_15'), -(7998,16,0, 'The final charge is set. Stand back!',12,0,100,0,0,0, 'SAY_BLASTMASTER_16'), -(7998,17,0, 'Incoming blast in 10 seconds!',14,0,100,0,0,0, 'SAY_BLASTMASTER_17'), -(7998,18,0, 'Incoming blast in 5 seconds. Clear the tunnel!',14,0,100,0,0,0, 'SAY_BLASTMASTER_18'), -(7998,19,0, 'I don''t think one charge is going to cut it. Keep fending them off!',12,0,100,0,0,0, 'SAY_BLASTMASTER_19'), -(7998,20,0, 'FIRE IN THE HOLE!',14,0,100,0,0,0, 'SAY_BLASTMASTER_20'), -(7998,21,0, 'Well done! Without your help I would have never been able to thwart that wave of troggs.',12,0,100,0,0,0, 'SAY_BLASTMASTER_21'), -(7998,22,0, 'Did you hear something?',12,0,100,0,0,0, 'SAY_BLASTMASTER_22'), -(7998,23,0, 'I heard something over there.',12,0,100,0,0,0, 'SAY_BLASTMASTER_23'), -(7998,24,0, 'More troggs! Ward them off as I prepare the explosives!',12,0,100,0,0,0, 'SAY_BLASTMASTER_24'), -(7998,25,0, 'The final charge is set. Stand back!',12,0,100,0,0,0, 'SAY_BLASTMASTER_25'), -(7998,26,0, '10 seconds to blast! Stand back!!!',14,0,100,0,0,0, 'SAY_BLASTMASTER_26'), -(7998,27,0, '5 seconds until detonation!!',14,0,100,0,0,0, 'SAY_BLASTMASTER_27'), -(7998,28,0, 'Superb! Because of your help, my people stand a chance of re-taking our belowed city. Three cheers to you!',12,0,100,0,0,0, 'SAY_BLASTMASTER_28'), --- Grubbis -(7361,0,0, 'We come from below! You can never stop us!',14,0,100,0,0,0, 'SAY_GRUBBIS'); diff --git a/sql/updates/world/2012_10_20_02_world_creature_text.sql b/sql/updates/world/2012_10_20_02_world_creature_text.sql new file mode 100644 index 00000000000..bb153c6b2f6 --- /dev/null +++ b/sql/updates/world/2012_10_20_02_world_creature_text.sql @@ -0,0 +1,27 @@ +-- Gnomeregan/Blastmaster Emi Shortfuse's event +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1090028 AND -1090000; +DELETE FROM `creature_text` WHERE `entry` IN (7361,7998); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES +-- Emi Shortfuse +(7998,0,0, 'With your help, I can evaluate these tunnels.',12,0,100,0,0,0, 'SAY_BLASTMASTER_0'), +(7998,1,0, 'Let''s see if we can find out where these Troggs are coming from... and put a stop to the invasion!',12,0,100,0,0,0, 'SAY_BLASTMASTER_1'), +(7998,2,0, 'Such devastation... what horrible mess...',12,0,100,0,0,0, 'SAY_BLASTMASTER_2'), +(7998,3,0, 'It''s quiet here...',12,0,100,0,0,0, 'SAY_BLASTMASTER_3'), +(7998,4,0, '...too quiet.',12,0,100,0,0,0, 'SAY_BLASTMASTER_4'), +(7998,5,0, 'Look! Over there at the tunnel wall!',12,0,100,0,0,0, 'SAY_BLASTMASTER_5'), +(7998,6,0, 'Trogg incrusion! Defend me while I blast the hole closed!',12,0,100,0,0,0, 'SAY_BLASTMASTER_6'), +(7998,7,0, 'I don''t think one charge is going to cut it. Keep fending them off!',12,0,100,0,0,0, 'SAY_BLASTMASTER_7'), +(7998,8,0, 'The charges are set. Get back before they blow!',12,0,100,0,0,0, 'SAY_BLASTMASTER_8'), +(7998,9,0, 'Incoming blast in 10 seconds!',14,0,100,0,0,0, 'SAY_BLASTMASTER_9'), +(7998,10,0, 'Incoming blast in 5 seconds. Clear the tunnel!',14,0,100,0,0,0, 'SAY_BLASTMASTER_10'), +(7998,11,0, 'FIRE IN THE HOLE!',14,0,100,0,0,0, 'SAY_BLASTMASTER_11'), +(7998,12,0, 'Well done! Without your help I would have never been able to thwart that wave of troggs.',12,0,100,0,0,0, 'SAY_BLASTMASTER_12'), +(7998,13,0, 'Did you hear something?',12,0,100,0,0,0, 'SAY_BLASTMASTER_13'), +(7998,14,0, 'I heard something over there.',12,0,100,0,0,0, 'SAY_BLASTMASTER_14'), +(7998,15,0, 'More troggs! Ward them off as I prepare the explosives!',12,0,100,0,0,0, 'SAY_BLASTMASTER_15'), +(7998,16,0, 'The final charge is set. Stand back!',12,0,100,0,0,0, 'SAY_BLASTMASTER_16'), +(7998,17,0, '10 seconds to blast! Stand back!!!',14,0,100,0,0,0, 'SAY_BLASTMASTER_17'), +(7998,18,0, '5 seconds until detonation!!',14,0,100,0,0,0, 'SAY_BLASTMASTER_18'), +(7998,19,0, 'Superb! Because of your help, my people stand a chance of re-taking our belowed city. Three cheers to you!',12,0,100,0,0,0, 'SAY_BLASTMASTER_19'), +-- Grubbis +(7361,0,0, 'We come from below! You can never stop us!',14,0,100,0,0,0, 'SAY_GRUBBIS'); diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp index 65dc6c37d8a..8f79c4973f7 100644 --- a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp +++ b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp @@ -54,15 +54,6 @@ enum BlastmasterEmi SAY_BLASTMASTER_17 = 17, SAY_BLASTMASTER_18 = 18, SAY_BLASTMASTER_19 = 19, - SAY_BLASTMASTER_20 = 20, - SAY_BLASTMASTER_21 = 21, - SAY_BLASTMASTER_22 = 22, - SAY_BLASTMASTER_23 = 23, - SAY_BLASTMASTER_24 = 24, - SAY_BLASTMASTER_25 = 25, - SAY_BLASTMASTER_26 = 26, - SAY_BLASTMASTER_27 = 27, - SAY_BLASTMASTER_28 = 28, SAY_GRUBBIS = 0 }; @@ -304,12 +295,12 @@ public: NextStep(25000, false, 18); break; case 13: - Summon(7); + Summon(6); NextStep(25000, false, 19); break; case 14: SetInFace(false); - Talk(SAY_BLASTMASTER_26); + Talk(SAY_BLASTMASTER_17); SetEscortPaused(true); NextStep(5000, false, 20); break; @@ -372,7 +363,7 @@ public: me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000); me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000); me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[3], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000); - Talk(SAY_BLASTMASTER_19); + Talk(SAY_BLASTMASTER_7); break; case 4: if (GameObject* go = me->SummonGameObject(183410, -542.199f, -96.854f, -155.790f, 0, 0, 0, 0, 0, 1000)) @@ -382,39 +373,33 @@ public: } break; case 5: - me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000); - me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000); - me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000); - Talk(SAY_BLASTMASTER_15); - break; - case 6: me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[10], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000); me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[11], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000); me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[12], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000); me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[13], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000); me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[14], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000); break; - case 7: + case 6: if (GameObject* go = me->SummonGameObject(183410, -507.820f, -103.333f, -151.353f, 0, 0, 0, 0, 0, 1000)) { GoSummonList.push_back(go->GetGUID()); go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); //We can't use it! - Summon(6); + Summon(5); } break; - case 8: + case 7: if (GameObject* go = me->SummonGameObject(183410, -511.829f, -86.249f, -151.431f, 0, 0, 0, 0, 0, 1000)) { GoSummonList.push_back(go->GetGUID()); go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); //We can't use it! } break; - case 9: + case 8: if (Creature* grubbis = me->SummonCreature(NPC_GRUBBIS, SpawnPosition[15], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000)) grubbis->AI()->Talk(SAY_GRUBBIS); me->SummonCreature(NPC_CHOMPER, SpawnPosition[16], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000); break; - case 10: + case 9: me->SummonGameObject(GO_RED_ROCKET, SpawnPosition[17].GetPositionX(), SpawnPosition[17].GetPositionY(), SpawnPosition[17].GetPositionZ(), SpawnPosition[17].GetOrientation(), 0, 0, 0, 0, 7200); me->SummonGameObject(GO_RED_ROCKET, SpawnPosition[18].GetPositionX(), SpawnPosition[18].GetPositionY(), SpawnPosition[18].GetPositionZ(), SpawnPosition[18].GetOrientation(), 0, 0, 0, 0, 7200); me->SummonGameObject(GO_RED_ROCKET, SpawnPosition[19].GetPositionX(), SpawnPosition[19].GetPositionY(), SpawnPosition[19].GetPositionZ(), SpawnPosition[19].GetOrientation(), 0, 0, 0, 0, 7200); @@ -475,31 +460,32 @@ public: break; case 10: Summon(4); + Talk(SAY_BLASTMASTER_8); NextStep(0, false); break; case 11: - Talk(SAY_BLASTMASTER_17); + Talk(SAY_BLASTMASTER_9); NextStep(5000, true); break; case 12: - Talk(SAY_BLASTMASTER_18); + Talk(SAY_BLASTMASTER_10); NextStep(5000, true); break; case 13: - Talk(SAY_BLASTMASTER_20); + Talk(SAY_BLASTMASTER_11); CaveDestruction(true); NextStep(8000, true); break; case 14: - Talk(SAY_BLASTMASTER_21); + Talk(SAY_BLASTMASTER_12); NextStep(8500, true); break; case 15: - Talk(SAY_BLASTMASTER_22); + Talk(SAY_BLASTMASTER_13); NextStep(2000, true); break; case 16: - Talk(SAY_BLASTMASTER_23); + Talk(SAY_BLASTMASTER_14); SetInFace(false); if (instance) if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_GO_CAVE_IN_LEFT))) @@ -508,36 +494,36 @@ public: break; case 17: SetEscortPaused(false); - Talk(SAY_BLASTMASTER_24); - Summon(6); + Talk(SAY_BLASTMASTER_15); + Summon(5); NextStep(0, false); break; case 18: - Summon(7); + Summon(6); NextStep(0, false); break; case 19: SetInFace(false); - Summon(8); - Talk(SAY_BLASTMASTER_25); + Summon(7); + Talk(SAY_BLASTMASTER_16); NextStep(0, false); break; case 20: - Talk(SAY_BLASTMASTER_27); + Talk(SAY_BLASTMASTER_18); NextStep(2000, true); break; case 21: - Summon(9); + Summon(8); NextStep(0, false); break; case 22: CaveDestruction(false); - Talk(SAY_BLASTMASTER_20); - NextStep(2000, true); + Talk(SAY_BLASTMASTER_11); + NextStep(3000, true); break; case 23: - Summon(10); - Talk(SAY_BLASTMASTER_28); + Summon(9); + Talk(SAY_BLASTMASTER_19); NextStep(0, false); break; } -- cgit v1.2.3