From c3e527da6d0e5b6fcf7c7faadfd441c2f0a941bc Mon Sep 17 00:00:00 2001 From: Discover- Date: Sun, 25 Dec 2011 00:36:17 +0100 Subject: Core/Quests: Script quest Captain Tyralius. Closes #3091. --- src/server/scripts/Outland/netherstorm.cpp | 36 ++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'src/server/scripts/Outland') diff --git a/src/server/scripts/Outland/netherstorm.cpp b/src/server/scripts/Outland/netherstorm.cpp index 5f2626c0039..f892169f7ae 100644 --- a/src/server/scripts/Outland/netherstorm.cpp +++ b/src/server/scripts/Outland/netherstorm.cpp @@ -29,6 +29,7 @@ go_manaforge_control_console npc_commander_dawnforge npc_bessy npc_maxx_a_million +go_captain_tyralius_prison EndContentData */ #include "ScriptPCH.h" @@ -1046,6 +1047,40 @@ public: } }; +/*###### +## go_captain_tyralius_prison +######*/ + +enum CaptainTyralius +{ + NPC_CAPTAIN_TYRALIUS = 20787, + SAY_FREE = 0, +}; + +class go_captain_tyralius_prison : public GameObjectScript +{ + public: + go_captain_tyralius_prison() : GameObjectScript("go_captain_tyralius_prison") { } + + bool OnGossipHello(Player* player, GameObject* go) + { + if (Creature* tyralius = go->FindNearestCreature(NPC_CAPTAIN_TYRALIUS, 1.0f)) + { + if (tyralius) + { + go->UseDoorOrButton(); + + if (player) + player->KilledMonsterCredit(NPC_CAPTAIN_TYRALIUS, 0); + + tyralius->AI()->Talk(SAY_FREE); + tyralius->ForcedDespawn(8000); + } + } + return true; + } +}; + void AddSC_netherstorm() { new go_manaforge_control_console(); @@ -1056,4 +1091,5 @@ void AddSC_netherstorm() new mob_phase_hunter(); new npc_bessy(); new npc_maxx_a_million_escort(); + new go_captain_tyralius_prison(); } -- cgit v1.2.3 From 49e10f992a7e73e4afcc627cfbdf0dc3db28ef1a Mon Sep 17 00:00:00 2001 From: Discover- Date: Sun, 25 Dec 2011 00:52:01 +0100 Subject: Scripts/Quests: Zuhuled the Wacked And obviously, some typo's. Closes #3704 --- sql/updates/world/2011_12_25_00_world_misc.sql | 2 +- sql/updates/world/2011_12_25_01_world_misc.sql | 3 +++ src/server/scripts/Outland/shadowmoon_valley.cpp | 25 ++++++++++++++---------- src/server/scripts/World/go_scripts.cpp | 4 ++-- 4 files changed, 21 insertions(+), 13 deletions(-) create mode 100644 sql/updates/world/2011_12_25_01_world_misc.sql (limited to 'src/server/scripts/Outland') diff --git a/sql/updates/world/2011_12_25_00_world_misc.sql b/sql/updates/world/2011_12_25_00_world_misc.sql index 22effda3d04..8f1d3c44ceb 100644 --- a/sql/updates/world/2011_12_25_00_world_misc.sql +++ b/sql/updates/world/2011_12_25_00_world_misc.sql @@ -5,5 +5,5 @@ INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`pr (20787,0,0,"You've saved me, fleshling! Ameer will hear of this noble act.",12,0,100,0,0,0,"Captain Tyralius"); -- Heroes of Old -UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `entry`=2702; +UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `id`=2702; DELETE FROM `quest_start_scripts` WHERE `id`=2702; diff --git a/sql/updates/world/2011_12_25_01_world_misc.sql b/sql/updates/world/2011_12_25_01_world_misc.sql new file mode 100644 index 00000000000..9e4d7e6c058 --- /dev/null +++ b/sql/updates/world/2011_12_25_01_world_misc.sql @@ -0,0 +1,3 @@ +-- Zuhuled the Wacked +UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `id`=10866; +DELETE FROM `quest_start_scripts` WHERE `id`=10866; diff --git a/src/server/scripts/Outland/shadowmoon_valley.cpp b/src/server/scripts/Outland/shadowmoon_valley.cpp index 610cf684a77..ecbdb921567 100644 --- a/src/server/scripts/Outland/shadowmoon_valley.cpp +++ b/src/server/scripts/Outland/shadowmoon_valley.cpp @@ -635,26 +635,31 @@ public: # npc_karynaku ####*/ -enum eKarynaku +enum Karynaku { QUEST_ALLY_OF_NETHER = 10870, + QUEST_ZUHULED_THE_WACK = 10866, - TAXI_PATH_ID = 649 + NPC_ZUHULED_THE_WACKED = 11980, + + TAXI_PATH_ID = 649, }; class npc_karynaku : public CreatureScript { -public: - npc_karynaku() : CreatureScript("npc_karynaku") { } + public: + npc_karynaku() : CreatureScript("npc_karynaku") { } - bool OnQuestAccept(Player* player, Creature* /*creature*/, Quest const* quest) - { - if (quest->GetQuestId() == QUEST_ALLY_OF_NETHER) - player->ActivateTaxiPathTo(TAXI_PATH_ID); //player->ActivateTaxiPathTo(649); + bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) + { + if (quest->GetQuestId() == QUEST_ALLY_OF_NETHER) + player->ActivateTaxiPathTo(TAXI_PATH_ID); - return true; - } + if (quest->GetQuestId() == QUEST_ZUHULED_THE_WACK) + creature->SummonCreature(NPC_ZUHULED_THE_WACKED, -4204.94f, 316.397f, 122.508f, 1.309f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 300000); + return true; + } }; /*#### diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp index fad92ec1af5..e93dd2751e6 100644 --- a/src/server/scripts/World/go_scripts.cpp +++ b/src/server/scripts/World/go_scripts.cpp @@ -1289,7 +1289,7 @@ enum MissingFriends { QUEST_MISSING_FRIENDS = 10852, NPC_CAPTIVE_CHILD = 22314, - SAY_FREE = 0, + SAY_FREE_0 = 0, }; class go_veil_skith_cage : public GameObjectScript @@ -1309,7 +1309,7 @@ class go_veil_skith_cage : public GameObjectScript player->KilledMonsterCredit(NPC_CAPTIVE_CHILD, (*itr)->GetGUID()); (*itr)->ForcedDespawn(5000); (*itr)->GetMotionMaster()->MovePoint(1, go->GetPositionX()+5, go->GetPositionY(), go->GetPositionZ()); - (*itr)->AI()->Talk(SAY_FREE); + (*itr)->AI()->Talk(SAY_FREE_0); (*itr)->GetMotionMaster()->Clear(); } } -- cgit v1.2.3 From 275aa8a7d851b69f6dc01dda99ab914dd7805b64 Mon Sep 17 00:00:00 2001 From: Discover- Date: Sun, 25 Dec 2011 01:21:09 +0100 Subject: DB/Miscellaneous: Implement humans transforming into worgens at night inside Pyrewood Village. And yet again some silly typo's, sorry guys. Closes #3062 --- .../2011_12_25_00_world_gameobject_scriptnames.sql | 1 + .../2011_12_25_01_world_gameobject_scriptnames.sql | 1 - sql/updates/world/2011_12_25_02_world_misc.sql | 89 ++++++++++++++++++++++ src/server/scripts/Kalimdor/desolace.cpp | 8 +- src/server/scripts/Outland/netherstorm.cpp | 12 +-- 5 files changed, 98 insertions(+), 13 deletions(-) create mode 100644 sql/updates/world/2011_12_25_00_world_gameobject_scriptnames.sql delete mode 100644 sql/updates/world/2011_12_25_01_world_gameobject_scriptnames.sql create mode 100644 sql/updates/world/2011_12_25_02_world_misc.sql (limited to 'src/server/scripts/Outland') diff --git a/sql/updates/world/2011_12_25_00_world_gameobject_scriptnames.sql b/sql/updates/world/2011_12_25_00_world_gameobject_scriptnames.sql new file mode 100644 index 00000000000..c545550e129 --- /dev/null +++ b/sql/updates/world/2011_12_25_00_world_gameobject_scriptnames.sql @@ -0,0 +1 @@ +UPDATE `gameobject_template` SET `ScriptName`='go_demon_portal' WHERE `entry` IN (177243,177365,177369,177397,177398,177399,177400,177366,177367,177368); diff --git a/sql/updates/world/2011_12_25_01_world_gameobject_scriptnames.sql b/sql/updates/world/2011_12_25_01_world_gameobject_scriptnames.sql deleted file mode 100644 index c545550e129..00000000000 --- a/sql/updates/world/2011_12_25_01_world_gameobject_scriptnames.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE `gameobject_template` SET `ScriptName`='go_demon_portal' WHERE `entry` IN (177243,177365,177369,177397,177398,177399,177400,177366,177367,177368); diff --git a/sql/updates/world/2011_12_25_02_world_misc.sql b/sql/updates/world/2011_12_25_02_world_misc.sql new file mode 100644 index 00000000000..ee2fd9c1964 --- /dev/null +++ b/sql/updates/world/2011_12_25_02_world_misc.sql @@ -0,0 +1,89 @@ +-- Make the human versions in Pyrewood Village despawn during night and the worgens spawn during night +SET @GUID := 152280; +DELETE FROM `game_event_creature` WHERE `eventEntry`=25; +INSERT INTO `game_event_creature` (`eventEntry`,`guid`) VALUES +-- Humans +(-25,17908),(-25,18404),(-25,18408), +(-25,19002),(-25,19005),(-25,19084), +(-25,19219),(-25,19222),(-25,19223), +(-25,19224),(-25,19227),(-25,19229), +(-25,19316),(-25,19343),(-25,18307), +(-25,17911),(-25,17910),(-25,18236), +(-25,18237),(-25,18239),(-25,18291), +(-25,18306),(-25,18350),(-25,18400), +(-25,18411),(-25,18413),(-25,18996), +(-25,19008),(-25,19012),(-25,19015), +(-25,19019),(-25,19220),(-25,19228), +(-25,17663),(-25,17905),(-25,18220), +(-25,18221),(-25,18238),(-25,18310), +(-25,18354),(-25,18355),(-25,18405), +(-25,18407),(-25,18409),(-25,19007), +(-25,18235),(-25,18309), +-- Worgens +(25,@GUID+1),(25,@GUID+2),(25,@GUID+3), +(25,@GUID+4),(25,@GUID+5),(25,@GUID+6), +(25,@GUID+7),(25,@GUID+8),(25,@GUID+9), +(25,@GUID+10),(25,@GUID+11),(25,@GUID+12), +(25,@GUID+13),(25,@GUID+14),(25,@GUID+15), +(25,@GUID+16),(25,@GUID+17),(25,@GUID+18), +(25,@GUID+19),(25,@GUID+20),(25,@GUID+21), +(25,@GUID+22),(25,@GUID+23),(25,@GUID+24), +(25,@GUID+25),(25,@GUID+26),(25,@GUID+27), +(25,@GUID+28),(25,@GUID+29),(25,@GUID+30), +(25,@GUID+31),(25,@GUID+32),(25,@GUID+33), +(25,@GUID+34),(25,@GUID+35),(25,@GUID+36), +(25,@GUID+37),(25,@GUID+38),(25,@GUID+39), +(25,@GUID+40),(25,@GUID+41),(25,@GUID+42), +(25,@GUID+43),(25,@GUID+44),(25,@GUID+45), +(25,@GUID+46),(25,@GUID+0); + +-- Spawn all Moonrage versions of the humans +DELETE FROM `creature` WHERE `id` IN (3533,3531,3529,1896,1893,1892); +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES +(@GUID+0,3533,0,1,1,0,-408.091,1604.03,18.2868,5.5676,600,0,0,300,0,0,0,0,0), +(@GUID+1,3531,0,1,1,0,-360.278,1495.03,17.196,0.830526,600,0,0,328,0,0,0,0,0), +(@GUID+2,3529,0,1,1,0,-345.967,1501.4,18.9875,0.942478,600,0,0,328,0,0,0,0,0), +(@GUID+3,1896,0,1,1,0,-327.462,1555.21,25.2491,1.61376,600,0,0,276,295,0,0,0,0), +(@GUID+4,1896,0,1,1,0,-407.955,1451.33,27.0859,0.767945,600,0,0,276,295,0,0,0,0), +(@GUID+5,1896,0,1,1,0,-391.907,1432.23,27.0313,6.07375,600,0,0,276,295,0,0,0,0), +(@GUID+6,1896,0,1,1,0,-344.082,1504.01,18.7918,4.18879,600,0,0,276,295,0,0,0,0), +(@GUID+7,1896,0,1,1,0,-329.456,1545.74,30.1367,2.26893,600,0,0,276,295,0,0,0,0), +(@GUID+8,1896,0,1,1,0,-414.124,1581.03,19.7275,6.10865,600,0,0,276,295,0,0,0,0), +(@GUID+9,1896,0,1,1,0,-413.706,1579.64,24.2994,2.9861,600,0,0,276,295,0,0,0,0), +(@GUID+10,1896,0,1,1,0,-423.094,1578.33,24.3098,2.98749,600,0,0,276,295,0,0,0,0), +(@GUID+11,1896,0,1,1,0,-411.947,1517.76,19.7711,4.86947,600,0,0,276,295,0,0,0,0), +(@GUID+12,1896,0,1,1,0,-424.202,1543.84,18.5687,6.17846,600,0,0,276,295,0,0,0,0), +(@GUID+13,1896,0,1,1,0,-397.475,1543.61,17.1712,3.0459,600,5,0,276,295,1,0,0,0), +(@GUID+14,1896,0,1,1,0,-378.435,1625.51,16.8077,0.694863,600,3,0,276,295,1,0,0,0), +(@GUID+15,1893,0,1,1,0,-404.028,1460.9,31.7653,5.84685,600,0,0,300,0,0,0,0,0), +(@GUID+16,1893,0,1,1,0,-410.983,1453.18,31.679,5.59007,600,5,0,300,0,1,0,0,0), +(@GUID+17,1893,0,1,1,0,-333.219,1548.41,25.2864,4.7729,600,0,0,300,0,0,0,0,0), +(@GUID+18,1893,0,1,1,0,-339.031,1547.76,30.0369,3.83411,600,3,0,300,0,1,0,0,0), +(@GUID+19,1893,0,1,1,0,-341.711,1553.34,24.5273,3.26377,600,0,0,300,0,0,0,0,0), +(@GUID+20,1893,0,1,1,0,-380.605,1435.24,25.7369,5.98648,600,0,0,300,0,0,0,0,0), +(@GUID+21,1893,0,1,1,0,-378.287,1655.98,10.346,2.89725,600,3,0,300,0,1,0,0,0), +(@GUID+22,1893,0,1,1,0,-411.642,1509.01,19.8575,1.55334,600,0,0,300,0,0,0,0,0), +(@GUID+23,1893,0,1,1,0,-390.535,1466.63,25.9869,5.34071,600,0,0,300,0,0,0,0,0), +(@GUID+24,1893,0,1,1,0,-391.615,1601.72,17.1706,4.86947,600,0,0,300,0,0,0,0,0), +(@GUID+25,1893,0,1,1,0,-355.263,1580.06,18.0622,0.078739,600,0,0,300,0,0,0,0,0), +(@GUID+26,1893,0,1,1,0,-442.388,1539.5,19.6376,4.53468,600,5,0,300,0,1,0,0,0), +(@GUID+27,1893,0,1,1,0,-389.73,1634.41,17.4309,6.20095,600,0,0,300,0,0,0,0,0), +(@GUID+28,1893,0,1,1,0,-385.558,1618.24,24.2887,4.07713,600,3,0,300,0,1,0,0,0), +(@GUID+29,1893,0,1,1,0,-385.776,1632.95,24.2887,3.83402,600,0,0,300,0,0,0,0,0), +(@GUID+30,1893,0,1,1,0,-384.391,1560.98,17.1156,2.65866,600,5,0,300,0,1,0,0,0), +(@GUID+31,1893,0,1,1,0,-420.551,1544.65,18.3187,2.70724,600,0,0,300,0,2,0,0,0), +(@GUID+32,1893,0,1,1,0,-372.427,1611.08,24.3721,1.32645,600,0,0,300,0,0,0,0,0), +(@GUID+33,1892,0,1,1,0,-405.033,1458.8,27.0968,0.15708,600,0,0,300,0,0,0,0,0), +(@GUID+34,1892,0,1,1,0,-350.427,1448.5,24.3665,4.72984,600,0,0,300,0,0,0,0,0), +(@GUID+35,1892,0,1,1,0,-370.983,1576.35,16.981,1.98656,600,0,0,300,0,2,0,0,0), +(@GUID+36,1892,0,1,1,0,-377.63,1491.95,18.4887,5.32325,600,0,0,300,0,0,0,0,0), +(@GUID+37,1892,0,1,1,0,-381.301,1653.14,17.7911,4.4855,600,0,0,300,0,0,0,0,0), +(@GUID+38,1892,0,1,1,0,-354.378,1421.62,28.2597,5.14872,600,0,0,300,0,0,0,0,0), +(@GUID+39,1892,0,1,1,0,-432.435,1531.27,18.7313,4.20121,600,5,0,300,0,1,0,0,0), +(@GUID+40,1892,0,1,1,0,-350.822,1606.93,18.0028,3.78911,600,0,0,300,0,0,0,0,0), +(@GUID+41,1892,0,1,1,0,-416.268,1576.92,19.5441,3.61468,600,0,0,300,0,0,0,0,0), +(@GUID+42,1892,0,1,1,0,-439.617,1517.84,19.5619,3.33314,600,5,0,300,0,1,0,0,0), +(@GUID+43,1892,0,1,1,0,-358.11,1528.2,24.9468,1.18862,600,0,0,300,0,0,0,0,0), +(@GUID+44,1892,0,1,1,0,-433.404,1564.13,19.7291,1.48262,600,5,0,300,0,1,0,0,0), +(@GUID+45,1892,0,1,1,0,-363.818,1545.45,24.4813,3.24746,600,0,0,300,0,0,0,0,0), +(@GUID+46,1892,0,1,1,0,-345.242,1601.84,17.0845,2.23485,600,0,0,300,0,0,0,0,0); diff --git a/src/server/scripts/Kalimdor/desolace.cpp b/src/server/scripts/Kalimdor/desolace.cpp index 5cc32657f2f..3d023b93dc2 100644 --- a/src/server/scripts/Kalimdor/desolace.cpp +++ b/src/server/scripts/Kalimdor/desolace.cpp @@ -186,10 +186,10 @@ class go_iruxos : public GameObjectScript public: go_iruxos() : GameObjectScript("go_iruxos") { } - bool OnGossipHello(Player* player, GameObject* /*go*/) + bool OnGossipHello(Player* player, GameObject* go) { - if (player->GetQuestStatus(5381) == QUEST_STATUS_INCOMPLETE) - player->SummonCreature(11876, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + if (player->GetQuestStatus(QUEST_HAND_IRUXOS) == QUEST_STATUS_INCOMPLETE) + player->SummonCreature(NPC_DEMON_SPIRIT, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); return true; } @@ -285,7 +285,7 @@ class go_demon_portal : public GameObjectScript { if (player->GetQuestStatus(QUEST_PORTAL_OF_THE_LEGION) == QUEST_STATUS_INCOMPLETE) { - if (Creature* guardian = player->SummonCreature(NPC_DEMON_GUARDIAN, GO->GetPositionX(), GO->GetPositionY(), GO->GetPositionZ(), 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0)) + if (Creature* guardian = player->SummonCreature(NPC_DEMON_GUARDIAN, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0)) guardian->AI()->AttackStart(player); } diff --git a/src/server/scripts/Outland/netherstorm.cpp b/src/server/scripts/Outland/netherstorm.cpp index f892169f7ae..e5ee8d19c59 100644 --- a/src/server/scripts/Outland/netherstorm.cpp +++ b/src/server/scripts/Outland/netherstorm.cpp @@ -1066,16 +1066,12 @@ class go_captain_tyralius_prison : public GameObjectScript { if (Creature* tyralius = go->FindNearestCreature(NPC_CAPTAIN_TYRALIUS, 1.0f)) { - if (tyralius) - { - go->UseDoorOrButton(); + go->UseDoorOrButton(); - if (player) - player->KilledMonsterCredit(NPC_CAPTAIN_TYRALIUS, 0); + player->KilledMonsterCredit(NPC_CAPTAIN_TYRALIUS, 0); - tyralius->AI()->Talk(SAY_FREE); - tyralius->ForcedDespawn(8000); - } + tyralius->AI()->Talk(SAY_FREE); + tyralius->ForcedDespawn(8000); } return true; } -- cgit v1.2.3 From dbcccbbb44cd331ab5ad31361b2fa4a6f12990bc Mon Sep 17 00:00:00 2001 From: Discover- Date: Sun, 25 Dec 2011 16:44:55 +0100 Subject: Core/Quests: Add script for quest The Thunderspike. Closes #4458. --- sql/updates/world/2011_12_25_03_world_misc.sql | 3 +++ .../scripts/Outland/blades_edge_mountains.cpp | 27 +++++++++++++++++++++- src/server/scripts/World/areatrigger_scripts.cpp | 4 ++-- 3 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 sql/updates/world/2011_12_25_03_world_misc.sql (limited to 'src/server/scripts/Outland') diff --git a/sql/updates/world/2011_12_25_03_world_misc.sql b/sql/updates/world/2011_12_25_03_world_misc.sql new file mode 100644 index 00000000000..2a2c26d1874 --- /dev/null +++ b/sql/updates/world/2011_12_25_03_world_misc.sql @@ -0,0 +1,3 @@ +-- The Thunderspike +UPDATE `gameobject_template` SET `AIName`='',`ScriptName`='go_thunderspike',`data3`=0 WHERE `entry`=184729; -- data3 was `event_scripts`.`id` +DELETE FROM `event_scripts` WHERE `id`=13685; diff --git a/src/server/scripts/Outland/blades_edge_mountains.cpp b/src/server/scripts/Outland/blades_edge_mountains.cpp index f94a7d2725c..f7c995d8f92 100644 --- a/src/server/scripts/Outland/blades_edge_mountains.cpp +++ b/src/server/scripts/Outland/blades_edge_mountains.cpp @@ -30,6 +30,7 @@ npc_daranelle npc_overseer_nuaar npc_saikkal_the_elder go_legion_obelisk +go_thunderspike EndContentData */ #include "ScriptPCH.h" @@ -537,9 +538,32 @@ public: }; /*###### -## AddSC +## go_thunderspike ######*/ +enum TheThunderspike +{ + NPC_GOR_GRIMGUT = 21319, + QUEST_THUNDERSPIKE = 10526, +}; + +class go_thunderspike : public GameObjectScript +{ + public: + go_thunderspike() : GameObjectScript("go_thunderspike") { } + + bool OnGossipHello(Player* player, GameObject* go) + { + if (player->GetQuestStatus(QUEST_THUNDERSPIKE) == QUEST_STATUS_INCOMPLETE) + { + if (Creature* gorGrimgut = go->SummonCreature(NPC_GOR_GRIMGUT, -2413.4f, 6914.48f, 25.01f, 3.67f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 300000)) + gorGrimgut->AI()->AttackStart(player); + } + + return true; + } +}; + void AddSC_blades_edge_mountains() { new mobs_bladespire_ogre(); @@ -550,4 +574,5 @@ void AddSC_blades_edge_mountains() new go_legion_obelisk(); new npc_bloodmaul_brutebane(); new npc_ogre_brute(); + new go_thunderspike(); } diff --git a/src/server/scripts/World/areatrigger_scripts.cpp b/src/server/scripts/World/areatrigger_scripts.cpp index e9ddfa43d6d..9e3e64f1860 100644 --- a/src/server/scripts/World/areatrigger_scripts.cpp +++ b/src/server/scripts/World/areatrigger_scripts.cpp @@ -402,11 +402,11 @@ class AreaTrigger_at_brewfest : public AreaTriggerScript { case AT_BREWFEST_DUROTAR: if (Creature* tapper = player->FindNearestCreature(NPC_TAPPER_SWINDLEKEG, 20.0f)) - tapper->AI()->Talk(SAY_WELCOME, player->GetGUID()); + tapper->AI()->Talk(SAY_WELCOME, player->GetGUID()); break; case AT_BREWFEST_DUN_MOROGH: if (Creature* ipfelkofer = player->FindNearestCreature(NPC_IPFELKOFER_IRONKEG, 20.0f)) - ipfelkofer->AI()->Talk(SAY_WELCOME, player->GetGUID()); + ipfelkofer->AI()->Talk(SAY_WELCOME, player->GetGUID()); break; default: break; -- cgit v1.2.3 From 9b8d18e7cd09625ba5b24355a3ca88b83125fd11 Mon Sep 17 00:00:00 2001 From: Discover- Date: Sun, 25 Dec 2011 17:17:28 +0100 Subject: Scripts/Quests: Add a double check in summoning for two of my previous scripts, as well as revert changing WDB data. --- sql/updates/world/2011_12_25_03_world_misc.sql | 2 +- src/server/scripts/Kalimdor/desolace.cpp | 4 ++-- src/server/scripts/Outland/blades_edge_mountains.cpp | 4 +--- 3 files changed, 4 insertions(+), 6 deletions(-) (limited to 'src/server/scripts/Outland') diff --git a/sql/updates/world/2011_12_25_03_world_misc.sql b/sql/updates/world/2011_12_25_03_world_misc.sql index 2a2c26d1874..a8967354a3d 100644 --- a/sql/updates/world/2011_12_25_03_world_misc.sql +++ b/sql/updates/world/2011_12_25_03_world_misc.sql @@ -1,3 +1,3 @@ -- The Thunderspike -UPDATE `gameobject_template` SET `AIName`='',`ScriptName`='go_thunderspike',`data3`=0 WHERE `entry`=184729; -- data3 was `event_scripts`.`id` +UPDATE `gameobject_template` SET `AIName`='',`ScriptName`='go_thunderspike' WHERE `entry`=184729; DELETE FROM `event_scripts` WHERE `id`=13685; diff --git a/src/server/scripts/Kalimdor/desolace.cpp b/src/server/scripts/Kalimdor/desolace.cpp index 3d023b93dc2..5badc7fe725 100644 --- a/src/server/scripts/Kalimdor/desolace.cpp +++ b/src/server/scripts/Kalimdor/desolace.cpp @@ -188,7 +188,7 @@ class go_iruxos : public GameObjectScript bool OnGossipHello(Player* player, GameObject* go) { - if (player->GetQuestStatus(QUEST_HAND_IRUXOS) == QUEST_STATUS_INCOMPLETE) + if (player->GetQuestStatus(QUEST_HAND_IRUXOS) == QUEST_STATUS_INCOMPLETE && !go->FindNearestCreature(NPC_DEMON_SPIRIT, 25.0f, true)) player->SummonCreature(NPC_DEMON_SPIRIT, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); return true; @@ -283,7 +283,7 @@ class go_demon_portal : public GameObjectScript bool OnGossipHello(Player* player, GameObject* go) { - if (player->GetQuestStatus(QUEST_PORTAL_OF_THE_LEGION) == QUEST_STATUS_INCOMPLETE) + if (player->GetQuestStatus(QUEST_PORTAL_OF_THE_LEGION) == QUEST_STATUS_INCOMPLETE && !go->FindNearestCreature(NPC_DEMON_GUARDIAN, 5.0f, true)) { if (Creature* guardian = player->SummonCreature(NPC_DEMON_GUARDIAN, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0)) guardian->AI()->AttackStart(player); diff --git a/src/server/scripts/Outland/blades_edge_mountains.cpp b/src/server/scripts/Outland/blades_edge_mountains.cpp index f7c995d8f92..87304a3f721 100644 --- a/src/server/scripts/Outland/blades_edge_mountains.cpp +++ b/src/server/scripts/Outland/blades_edge_mountains.cpp @@ -554,11 +554,9 @@ class go_thunderspike : public GameObjectScript bool OnGossipHello(Player* player, GameObject* go) { - if (player->GetQuestStatus(QUEST_THUNDERSPIKE) == QUEST_STATUS_INCOMPLETE) - { + if (player->GetQuestStatus(QUEST_THUNDERSPIKE) == QUEST_STATUS_INCOMPLETE && !go->FindNearestCreature(NPC_GOR_GRIMGUT, 25.0f, true)) if (Creature* gorGrimgut = go->SummonCreature(NPC_GOR_GRIMGUT, -2413.4f, 6914.48f, 25.01f, 3.67f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 300000)) gorGrimgut->AI()->AttackStart(player); - } return true; } -- cgit v1.2.3