summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWiZZy <bilucristian25@gmail.com>2021-01-19 23:04:49 +0200
committerGitHub <noreply@github.com>2021-01-19 22:04:49 +0100
commit42244612ff2409c59ac9e3505fb81aad5fc8c052 (patch)
treed26fa4e47bfcd2bd910e3cd4bf4f900d43a53843
parentc939de7aa8cd5721a2112176fb1fdf88f5b5484b (diff)
fix(DB/Creature): Gyromasts Revenge (#4115)
-rw-r--r--data/sql/updates/pending_db_world/rev_1609354039936904092.sql48
-rw-r--r--src/server/scripts/Kalimdor/zone_darkshore.cpp85
2 files changed, 48 insertions, 85 deletions
diff --git a/data/sql/updates/pending_db_world/rev_1609354039936904092.sql b/data/sql/updates/pending_db_world/rev_1609354039936904092.sql
new file mode 100644
index 0000000000..e9a25acd23
--- /dev/null
+++ b/data/sql/updates/pending_db_world/rev_1609354039936904092.sql
@@ -0,0 +1,48 @@
+INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1609354039936904092');
+
+DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 22) AND (`SourceGroup` IN (1,2)) AND (`SourceEntry` = 6669) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 9) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 2078) AND (`ConditionValue2` = 0) AND (`ConditionValue3` = 0);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(22, 1, 6669, 0, 0, 9, 0, 2078, 0, 0, 1, 0, 0, '', 'The Threshwackonator 4000 - Default Gossip'),
+(22, 2, 6669, 0, 0, 9, 0, 2078, 0, 0, 0, 0, 0, '', 'The Threshwackonator 4000 - Gossip when Quest ID: 2078 taken');
+
+DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 15) AND (`SourceGroup` = 21208) AND (`SourceEntry` = 0) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 9) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 2078) AND (`ConditionValue2` = 0) AND (`ConditionValue3` = 0);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(15, 21208, 0, 0, 0, 9, 0, 2078, 0, 0, 0, 0, 0, '', 'The Threshwackonator 4000 - Show gossip option only when Quest ID: 2078 taken.');
+
+DELETE FROM `gossip_menu` WHERE (`MenuID` = 21208) AND (`TextID` IN (758));
+INSERT INTO `gossip_menu` (`MenuID`, `TextID`) VALUES
+(21208, 758);
+
+DELETE FROM `gossip_menu_option` WHERE (`MenuID` = 21208) AND (`OptionID` IN (0));
+INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES
+(21208, 0, 0, 'Turn the key to start the machine.', 2703, 1, 1, 0, 0, 0, 0, '', 0, 0);
+
+UPDATE `creature_template` SET `gossip_menu_id` = 0, `unit_flags` = 512, `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 6669;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 6669);
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(6669, 0, 0, 0, 64, 0, 100, 0, 0, 0, 0, 0, 0, 98, 21208, 718, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'The Threshwackonator 4100 - On Gossip Hello - Send Gossip'),
+(6669, 0, 1, 0, 64, 0, 100, 0, 0, 0, 0, 0, 0, 98, 21208, 758, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'The Threshwackonator 4100 - On Gossip Hello - Send Gossip'),
+(6669, 0, 2, 3, 62, 0, 100, 0, 21208, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'The Threshwackonator 4100 - On Gossip Option 0 Selected - Store Targetlist'),
+(6669, 0, 3, 4, 61, 0, 100, 0, 21208, 0, 0, 0, 0, 80, 666900, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The Threshwackonator 4100 - On Gossip Option 0 Selected - Run Script'),
+(6669, 0, 4, 0, 61, 0, 100, 0, 21208, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The Threshwackonator 4100 - On Gossip Option 0 Selected - Set Event Phase 1'),
+(6669, 0, 5, 6, 75, 1, 100, 1, 36625, 0, 10, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'The Threshwackonator 4100 - On Distance To Creature - Stop Follow (Phase 1) (No Repeat)'),
+(6669, 0, 6, 7, 61, 1, 100, 1, 36625, 0, 10, 0, 0, 80, 666901, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The Threshwackonator 4100 - On Distance To Creature - Run Script (Phase 1) (No Repeat)'),
+(6669, 0, 7, 8, 61, 1, 100, 1, 36625, 0, 10, 0, 0, 101, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The Threshwackonator 4100 - On Distance To Creature - Set Home Position (Phase 1) (No Repeat)'),
+(6669, 0, 8, 0, 61, 1, 100, 1, 36625, 0, 10, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The Threshwackonator 4100 - On Distance To Creature - Set Event Phase 2 (Phase 1) (No Repeat)'),
+(6669, 0, 9, 10, 1, 2, 100, 0, 30000, 30000, 30000, 30000, 0, 101, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The Threshwackonator 4100 - Out of Combat - Set Home Position (Phase 2)'),
+(6669, 0, 10, 11, 61, 2, 100, 0, 30000, 30000, 30000, 30000, 0, 82, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The Threshwackonator 4100 - Out of Combat - Add Npc Flags Gossip (Phase 2)'),
+(6669, 0, 11, 12, 61, 2, 100, 0, 30000, 30000, 30000, 30000, 0, 2, 35, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The Threshwackonator 4100 - Out of Combat - Set Faction 35 (Phase 2)'),
+(6669, 0, 12, 13, 61, 2, 100, 0, 30000, 30000, 30000, 30000, 0, 24, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The Threshwackonator 4100 - Out of Combat - Evade (Phase 2)'),
+(6669, 0, 13, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The Threshwackonator 4100 - Out of Combat - Set Event Phase 0 (Phase 2)');
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` IN (666900, 666901));
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(666900, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'The Threshwackonator 4100 - Actionlist - Close Gossip'),
+(666900, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The Threshwackonator 4100 - Actionlist - Remove Npc Flags Gossip'),
+(666900, 9, 2, 0, 0, 0, 100, 0, 500, 500, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The Threshwackonator 4100 - Actionlist - Say Line 0'),
+(666900, 9, 3, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 29, 2, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'The Threshwackonator 4100 - Actionlist - Start Follow [unsupported target type]'),
+(666901, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 10, 36625, 6667, 0, 0, 0, 0, 0, 0, 'The Threshwackonator 4100 - Actionlist - Say Line 0'),
+(666901, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 2, 14, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The Threshwackonator 4100 - Actionlist - Set Faction 14'),
+(666901, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'The Threshwackonator 4100 - Actionlist - Start Attacking');
+
diff --git a/src/server/scripts/Kalimdor/zone_darkshore.cpp b/src/server/scripts/Kalimdor/zone_darkshore.cpp
index 504efd28db..bf1e03853e 100644
--- a/src/server/scripts/Kalimdor/zone_darkshore.cpp
+++ b/src/server/scripts/Kalimdor/zone_darkshore.cpp
@@ -14,7 +14,6 @@ EndScriptData */
/* ContentData
npc_kerlonian
npc_prospector_remtravel
-npc_threshwackonator
EndContentData */
#include "ScriptMgr.h"
@@ -414,89 +413,6 @@ public:
}
};
-/*####
-# npc_threshwackonator
-####*/
-
-enum Threshwackonator
-{
- EMOTE_START = 0,
- SAY_AT_CLOSE = 1,
- QUEST_GYROMAST_REV = 2078,
- NPC_GELKAK = 6667,
- FACTION_HOSTILE = 14
-};
-
-#define GOSSIP_ITEM_INSERT_KEY "[PH] Insert key"
-
-class npc_threshwackonator : public CreatureScript
-{
-public:
- npc_threshwackonator() : CreatureScript("npc_threshwackonator") { }
-
- struct npc_threshwackonatorAI : public FollowerAI
- {
- npc_threshwackonatorAI(Creature* creature) : FollowerAI(creature) { }
-
- void Reset() override { }
-
- void MoveInLineOfSight(Unit* who) override
- {
- FollowerAI::MoveInLineOfSight(who);
-
- if (!me->GetVictim() && !HasFollowState(STATE_FOLLOW_COMPLETE) && who->GetEntry() == NPC_GELKAK)
- {
- if (me->IsWithinDistInMap(who, 10.0f))
- {
- Talk(SAY_AT_CLOSE, who);
- DoAtEnd();
- }
- }
- }
-
- void DoAtEnd()
- {
- me->setFaction(FACTION_HOSTILE);
-
- if (Player* pHolder = GetLeaderForFollower())
- AttackStart(pHolder);
-
- SetFollowComplete(true);
- }
- };
-
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
- {
- ClearGossipMenuFor(player);
- if (action == GOSSIP_ACTION_INFO_DEF + 1)
- {
- CloseGossipMenuFor(player);
-
- if (npc_threshwackonatorAI* pThreshAI = CAST_AI(npc_threshwackonator::npc_threshwackonatorAI, creature->AI()))
- {
- creature->AI()->Talk(EMOTE_START);
- pThreshAI->StartFollow(player);
- }
- }
-
- return true;
- }
-
- bool OnGossipHello(Player* player, Creature* creature) override
- {
- if (player->GetQuestStatus(QUEST_GYROMAST_REV) == QUEST_STATUS_INCOMPLETE)
- AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_INSERT_KEY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
-
- SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
- return true;
- }
-
- CreatureAI* GetAI(Creature* creature) const override
- {
- return new npc_threshwackonatorAI(creature);
- }
-};
-
void AddSC_darkshore()
{
// Ours
@@ -505,5 +421,4 @@ void AddSC_darkshore()
// Theirs
new npc_kerlonian();
new npc_prospector_remtravel();
- new npc_threshwackonator();
}