From 70dd848785f5a0251f8b544addcc5cd85c0f99c2 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Thu, 8 May 2014 18:40:39 +0200 Subject: DB/Quest: The Bones of Nozronn By phoenixfight, closes #11985 --- sql/updates/world/2014_05_08_00_world_smart_scripts.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/2014_05_08_00_world_smart_scripts.sql (limited to 'sql') diff --git a/sql/updates/world/2014_05_08_00_world_smart_scripts.sql b/sql/updates/world/2014_05_08_00_world_smart_scripts.sql new file mode 100644 index 00000000000..ebf971d512d --- /dev/null +++ b/sql/updates/world/2014_05_08_00_world_smart_scripts.sql @@ -0,0 +1,2 @@ +-- +UPDATE `smart_scripts` SET `target_type`=1 WHERE `entryorguid`=28256 AND `source_type`=0; -- cgit v1.2.3 From 2c48938c6daf9c45a32ee325aab17eef8cb4bb53 Mon Sep 17 00:00:00 2001 From: Vincent-Michael Date: Thu, 8 May 2014 23:33:53 +0200 Subject: DB/Instance: Fix Ahn''Kahet exit (portal/areatrigger) --- sql/updates/world/2014_05_07_00_world_misc.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 sql/updates/world/2014_05_07_00_world_misc.sql (limited to 'sql') diff --git a/sql/updates/world/2014_05_07_00_world_misc.sql b/sql/updates/world/2014_05_07_00_world_misc.sql new file mode 100644 index 00000000000..8f4971f771f --- /dev/null +++ b/sql/updates/world/2014_05_07_00_world_misc.sql @@ -0,0 +1,11 @@ +SET @OGUID := 6100; + +DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+1; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(@OGUID+0, 191849, 619, 3, 1, 523.5123, -301.1218, 68.84955, -1.570796, -0.004628658, 0.003181458, -0.7086, 0.705588, 7200, 255, 1), -- 191849 (Area: 4627) +(@OGUID+1, 191848, 619, 3, 1, 523.4318, -300.7111, 68.82808, -1.575045, 0, 0, -0.7071066, 0.7071069, 7200, 255, 1); -- 191848 (Area: 4627) + + +DELETE FROM `areatrigger_teleport` WHERE `id`=5235; +INSERT INTO `areatrigger_teleport` (`id`, `name`, `target_map`, `target_position_x`, `target_position_y`, `target_position_z`, `target_orientation`) VALUES +(5235, 'Ahn''Kahet (exit)', 571, 3817.4,2032.82, 11.0133, 3.612832); -- cgit v1.2.3 From 33978774ffc5c47c1e08153e8b0d7b3b037089fb Mon Sep 17 00:00:00 2001 From: Vincent-Michael Date: Thu, 8 May 2014 23:35:36 +0200 Subject: SQL: Rename in correct name --- sql/updates/world/2014_05_07_00_world_misc.sql | 11 ----------- sql/updates/world/2014_05_09_00_world_misc.sql | 11 +++++++++++ 2 files changed, 11 insertions(+), 11 deletions(-) delete mode 100644 sql/updates/world/2014_05_07_00_world_misc.sql create mode 100644 sql/updates/world/2014_05_09_00_world_misc.sql (limited to 'sql') diff --git a/sql/updates/world/2014_05_07_00_world_misc.sql b/sql/updates/world/2014_05_07_00_world_misc.sql deleted file mode 100644 index 8f4971f771f..00000000000 --- a/sql/updates/world/2014_05_07_00_world_misc.sql +++ /dev/null @@ -1,11 +0,0 @@ -SET @OGUID := 6100; - -DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+1; -INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES -(@OGUID+0, 191849, 619, 3, 1, 523.5123, -301.1218, 68.84955, -1.570796, -0.004628658, 0.003181458, -0.7086, 0.705588, 7200, 255, 1), -- 191849 (Area: 4627) -(@OGUID+1, 191848, 619, 3, 1, 523.4318, -300.7111, 68.82808, -1.575045, 0, 0, -0.7071066, 0.7071069, 7200, 255, 1); -- 191848 (Area: 4627) - - -DELETE FROM `areatrigger_teleport` WHERE `id`=5235; -INSERT INTO `areatrigger_teleport` (`id`, `name`, `target_map`, `target_position_x`, `target_position_y`, `target_position_z`, `target_orientation`) VALUES -(5235, 'Ahn''Kahet (exit)', 571, 3817.4,2032.82, 11.0133, 3.612832); diff --git a/sql/updates/world/2014_05_09_00_world_misc.sql b/sql/updates/world/2014_05_09_00_world_misc.sql new file mode 100644 index 00000000000..8f4971f771f --- /dev/null +++ b/sql/updates/world/2014_05_09_00_world_misc.sql @@ -0,0 +1,11 @@ +SET @OGUID := 6100; + +DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+1; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(@OGUID+0, 191849, 619, 3, 1, 523.5123, -301.1218, 68.84955, -1.570796, -0.004628658, 0.003181458, -0.7086, 0.705588, 7200, 255, 1), -- 191849 (Area: 4627) +(@OGUID+1, 191848, 619, 3, 1, 523.4318, -300.7111, 68.82808, -1.575045, 0, 0, -0.7071066, 0.7071069, 7200, 255, 1); -- 191848 (Area: 4627) + + +DELETE FROM `areatrigger_teleport` WHERE `id`=5235; +INSERT INTO `areatrigger_teleport` (`id`, `name`, `target_map`, `target_position_x`, `target_position_y`, `target_position_z`, `target_orientation`) VALUES +(5235, 'Ahn''Kahet (exit)', 571, 3817.4,2032.82, 11.0133, 3.612832); -- cgit v1.2.3 From b6a9e56193eb07c0ef123a2a9c8f02567580b2c0 Mon Sep 17 00:00:00 2001 From: Vincent-Michael Date: Fri, 9 May 2014 03:19:37 +0200 Subject: DB/Gossip: Fix some gossip in dalaran --- sql/updates/world/2014_05_09_01_world_gossip.sql | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 sql/updates/world/2014_05_09_01_world_gossip.sql (limited to 'sql') diff --git a/sql/updates/world/2014_05_09_01_world_gossip.sql b/sql/updates/world/2014_05_09_01_world_gossip.sql new file mode 100644 index 00000000000..7e2a1b040fc --- /dev/null +++ b/sql/updates/world/2014_05_09_01_world_gossip.sql @@ -0,0 +1,15 @@ +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (10026,10025,10024); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15, 10026, 0, 0, 0, 8, 0, 13419, 0, 0, 0, 0, 0, '', 'Sky-Reaver Klum - Show Gossip if player Has rewarded Quest Preparations for War'), +(15, 10026, 1, 0, 0, 28, 0, 13419, 0, 0, 0, 0, 0, '', 'Sky-Reaver Klum - Show Gossip if player Has completed Quest Preparations for War'), +(15, 10025, 0, 0, 0, 8, 0, 13418, 0, 0, 0, 0, 0, '', 'Officer Van Rossem - Show Gossip if player Has rewarded Quest Preparations for War'), +(15, 10025, 1, 0, 0, 28, 0, 13418, 0, 0, 0, 0, 0, '', 'Officer Van Rossem - Show Gossip if player Has completed Quest Preparations for War'), +(15, 10024, 0, 0, 0, 8, 0, 12521, 0, 0, 0, 0, 0, '', 'Archmage Pentarus - Show Gossip if player Has rewarded Quest Where in the World is Hemet Nesingwary?'), +(15, 10024, 1, 0, 0, 28, 0, 12521, 0, 0, 0, 0, 0, '', 'Archmage Pentarus - Show Gossip if player Has completed Quest Where in the World is Hemet Nesingwary?'); + +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (10025,10024) AND `id` IN (0,1); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `OptionBroadcastTextID`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`, `BoxBroadcastTextID`) VALUES +(10025, 0, 0, 'Take me to the ship.', 31625, 1, 1, 0, 0, 0, 0, '', 0), +(10025, 1, 0, 'Take me to the ship.', 31625, 1, 1, 0, 0, 0, 0, '', 0), +(10024, 0, 0, 'I''m ready to fly to Sholazar Basin.', 31594, 1, 1, 0, 0, 0, 0, '', 0), +(10024, 1, 0, 'I''m ready to fly to Sholazar Basin.', 31594, 1, 1, 0, 0, 0, 0, '', 0); -- cgit v1.2.3 From eabec73d98d6885c24dbabc9fe10f64fdd290adc Mon Sep 17 00:00:00 2001 From: MitchesD Date: Thu, 8 May 2014 17:45:11 +0200 Subject: Scripts/Duskwood: prevention to spawn multiple Twilight Corrupter and fixed some issues there --- .../2014_05_09_02_world_creature_template.sql | 1 + .../scripts/EasternKingdoms/zone_duskwood.cpp | 56 +++++++++++----------- 2 files changed, 30 insertions(+), 27 deletions(-) create mode 100644 sql/updates/world/2014_05_09_02_world_creature_template.sql (limited to 'sql') diff --git a/sql/updates/world/2014_05_09_02_world_creature_template.sql b/sql/updates/world/2014_05_09_02_world_creature_template.sql new file mode 100644 index 00000000000..5520ca5d6f8 --- /dev/null +++ b/sql/updates/world/2014_05_09_02_world_creature_template.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `faction`=14 WHERE `entry`=15625; diff --git a/src/server/scripts/EasternKingdoms/zone_duskwood.cpp b/src/server/scripts/EasternKingdoms/zone_duskwood.cpp index 236455137dc..4eaf98d0a0e 100644 --- a/src/server/scripts/EasternKingdoms/zone_duskwood.cpp +++ b/src/server/scripts/EasternKingdoms/zone_duskwood.cpp @@ -29,18 +29,19 @@ EndScriptData */ enum TwilightCorrupter { - ITEM_FRAGMENT = 21149, NPC_TWILIGHT_CORRUPTER = 15625, - YELL_TWILIGHTCORRUPTOR_RESPAWN = 0, - YELL_TWILIGHTCORRUPTOR_AGGRO = 1, - YELL_TWILIGHTCORRUPTOR_KILL = 2, + YELL_TWILIGHT_CORRUPTOR_RESPAWN = 0, + YELL_TWILIGHT_CORRUPTOR_AGGRO = 1, + YELL_TWILIGHT_CORRUPTOR_KILL = 2, + SPELL_SOUL_CORRUPTION = 25805, SPELL_CREATURE_OF_NIGHTMARE = 25806, SPELL_LEVEL_UP = 24312, EVENT_SOUL_CORRUPTION = 1, EVENT_CREATURE_OF_NIGHTMARE = 2, - FACTION_HOSTILE = 14 + + QUEST_NIGHTMARES_CORRUPTION = 8735 }; /*###### @@ -58,12 +59,13 @@ public: void Reset() override { - KillCount = 0; + _events.Reset(); + KillCount = 0; } void EnterCombat(Unit* /*who*/) override { - Talk(YELL_TWILIGHTCORRUPTOR_AGGRO); + Talk(YELL_TWILIGHT_CORRUPTOR_AGGRO); _events.ScheduleEvent(EVENT_SOUL_CORRUPTION, 15000); _events.ScheduleEvent(EVENT_CREATURE_OF_NIGHTMARE, 30000); } @@ -73,7 +75,7 @@ public: if (victim->GetTypeId() == TYPEID_PLAYER) { ++KillCount; - Talk(YELL_TWILIGHTCORRUPTOR_KILL, victim); + Talk(YELL_TWILIGHT_CORRUPTOR_KILL, victim); if (KillCount == 3) { @@ -90,22 +92,27 @@ public: _events.Update(diff); + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + while (uint32 eventId = _events.ExecuteEvent()) { switch (eventId) { case EVENT_SOUL_CORRUPTION: - DoCastVictim(SPELL_SOUL_CORRUPTION); - _events.ScheduleEvent(EVENT_SOUL_CORRUPTION, rand()%4000+15000); + DoCastAOE(SPELL_SOUL_CORRUPTION); + _events.ScheduleEvent(EVENT_SOUL_CORRUPTION, urand(15000, 19000)); break; case EVENT_CREATURE_OF_NIGHTMARE: - DoCastVictim(SPELL_CREATURE_OF_NIGHTMARE); + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true)) + DoCast(target, SPELL_CREATURE_OF_NIGHTMARE); _events.ScheduleEvent(EVENT_CREATURE_OF_NIGHTMARE, 45000); break; default: break; } } + DoMeleeAttackIfReady(); } @@ -124,27 +131,22 @@ public: # at_twilight_grove ######*/ +Position const TwillightCorrupter = { -10328.16f, -489.57f, 49.95f, 0.0f }; + class at_twilight_grove : public AreaTriggerScript { -public: - at_twilight_grove() : AreaTriggerScript("at_twilight_grove") { } + public: + at_twilight_grove() : AreaTriggerScript("at_twilight_grove") { } - bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) override - { - if (player->HasQuestForItem(ITEM_FRAGMENT)) + bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) override { - if (Unit* corrupter = player->SummonCreature(NPC_TWILIGHT_CORRUPTER, -10328.16f, -489.57f, 49.95f, 0, TEMPSUMMON_MANUAL_DESPAWN, 60000)) - corrupter->setFaction(FACTION_HOSTILE); + if (player->GetQuestStatus(QUEST_NIGHTMARES_CORRUPTION) == QUEST_STATUS_INCOMPLETE) + if (!player->FindNearestCreature(NPC_TWILIGHT_CORRUPTER, 500.0f, true)) + if (Creature* corrupter = player->SummonCreature(NPC_TWILIGHT_CORRUPTER, TwillightCorrupter, TEMPSUMMON_MANUAL_DESPAWN, 60000)) + corrupter->AI()->Talk(YELL_TWILIGHT_CORRUPTOR_RESPAWN, player); - if (Creature* CorrupterSpeaker = player->SummonCreature(1, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ()-1, 0, TEMPSUMMON_TIMED_DESPAWN, 15000)) - { - CorrupterSpeaker->SetName("Twilight Corrupter"); - CorrupterSpeaker->SetVisible(true); - CorrupterSpeaker->AI()->Talk(YELL_TWILIGHTCORRUPTOR_RESPAWN, player); - } - } - return false; - }; + return false; + }; }; void AddSC_duskwood() -- cgit v1.2.3