diff options
author | Andrew Letson <velinath@users.noreply.github.com> | 2017-11-08 12:04:31 -0500 |
---|---|---|
committer | Aokromes <Aokromes@users.noreply.github.com> | 2017-11-08 18:04:31 +0100 |
commit | a627b73c9303571535892fced0218f9814a3704d (patch) | |
tree | 690aa99f554c6f5a08e6da4aad108cc00cca6212 | |
parent | 440dc8110e958aabe714e2d47bfdd67bb743983b (diff) |
Scripts/EasternKingdoms: Ragged John
3 files changed, 25 insertions, 96 deletions
diff --git a/sql/updates/world/3.3.5/2017_11_08_02_world.sql b/sql/updates/world/3.3.5/2017_11_08_02_world.sql new file mode 100644 index 00000000000..36dd32ca56a --- /dev/null +++ b/sql/updates/world/3.3.5/2017_11_08_02_world.sql @@ -0,0 +1,25 @@ +-- Ragged John +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 9563; + +-- Create new gossip menu +DELETE FROM `gossip_menu` WHERE MenuID = 2062; +INSERT INTO `gossip_menu` (`MenuID`, `TextID`, `VerifiedBuild`) VALUES +(2062, 3496, 0); + +DELETE FROM `gossip_menu_option` WHERE `MenuID` IN (2061, 2062) AND `OptionID` = 0; +INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES +(2061, 0, 0, 'Milk me, John.', 5833, 1, 1, 2062, 0, 0, 0, '', 0, 0), +(2062, 0, 0, 'Do it... Do it now.', 5835, 1, 1, 0, 0, 0, 0, '', 0, 0); + +-- Smart scripts +DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryorguid` = 9563; +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(9563, 0, 0, 1, 62, 0, 100, 0, 2062, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Ragged John - On Gossip Option 0 Selected - Close Gossip'), +(9563, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 11, 16472, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Ragged John - On Gossip Option 0 Selected - Cast \'Wicked Milking\''), +(9563, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 15, 4866, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Ragged John - On Gossip Option 0 Selected - Quest Credit \'Mother\'s Milk\''); + +-- Conditions +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 15 AND `SourceGroup` = 2061 AND `SourceEntry` = 0 AND `SourceId` = 0; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15, 2061, 0, 0, 0, 1, 0, 16468, 0, 0, 0, 0, 0, '', 'Show gossip menu 2061 option id 0 if target has aura Mother\'s Milk (effect 0).'), +(15, 2061, 0, 0, 0, 9, 0, 4866, 0, 0, 0, 0, 0, '', 'Show gossip menu 2061 option id 0 if quest Mother\'s Milk has been taken.'); diff --git a/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp b/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp index b094e4a63d2..047467d0338 100644 --- a/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp +++ b/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp @@ -175,7 +175,6 @@ void AddSC_instance_zulgurub(); //void AddSC_alterac_mountains(); void AddSC_arathi_highlands(); void AddSC_blasted_lands(); -void AddSC_burning_steppes(); void AddSC_duskwood(); //void AddSC_eastern_plaguelands(); void AddSC_ghostlands(); @@ -352,7 +351,6 @@ void AddEasternKingdomsScripts() //AddSC_alterac_mountains(); AddSC_arathi_highlands(); AddSC_blasted_lands(); - AddSC_burning_steppes(); AddSC_duskwood(); //AddSC_eastern_plaguelands(); AddSC_ghostlands(); diff --git a/src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp b/src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp deleted file mode 100644 index e6170d0e65e..00000000000 --- a/src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (C) 2008-2017 TrinityCore <http://www.trinitycore.org/> - * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -/* ScriptData -SDName: Burning_Steppes -SD%Complete: 100 -SDComment: Quest support: 4866 -SDCategory: Burning Steppes -EndScriptData */ - -/* ContentData -npc_ragged_john -EndContentData */ - -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "ScriptedGossip.h" -#include "Player.h" - -/*###### -## npc_ragged_john -######*/ - -enum RaggedJohn -{ - QUEST_MOTHERS_MILK = 4866, - SPELL_MOTHERS_MILK = 16468, - SPELL_WICKED_MILKING = 16472 -}; - -class npc_ragged_john : public CreatureScript -{ - public: - npc_ragged_john() : CreatureScript("npc_ragged_john") { } - - struct npc_ragged_johnAI : public ScriptedAI - { - npc_ragged_johnAI(Creature* creature) : ScriptedAI(creature) { } - - void Reset() override { } - - void MoveInLineOfSight(Unit* who) override - { - if (who->HasAura(SPELL_MOTHERS_MILK)) - { - if (who->GetTypeId() == TYPEID_PLAYER && me->IsWithinDistInMap(who, 15) && who->isInAccessiblePlaceFor(me)) - { - DoCast(who, SPELL_WICKED_MILKING); - if (Player* player = who->ToPlayer()) - player->AreaExploredOrEventHappens(QUEST_MOTHERS_MILK); - } - } - - ScriptedAI::MoveInLineOfSight(who); - } - - void EnterCombat(Unit* /*who*/) override { } - - bool GossipHello(Player* player) override - { - if (me->IsQuestGiver()) - { - player->PrepareQuestMenu(me->GetGUID()); - SendGossipMenuFor(player, player->GetGossipTextId(me), me->GetGUID()); - } - return true; - } - }; - - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_ragged_johnAI(creature); - } -}; - -void AddSC_burning_steppes() -{ - new npc_ragged_john(); -} |