mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-25 06:36:24 +00:00
refactor(DB/Quest): move 4866 and 4224 from cpp to DB (#1415)
This commit is contained in:
committed by
Francesco Borzì
parent
dc72de9fce
commit
275dbec76d
@@ -0,0 +1,36 @@
|
||||
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1549338391766716500');
|
||||
|
||||
UPDATE `creature_template` SET `ScriptName`='', `AIName`='SmartAI' WHERE `entry`=9563;
|
||||
|
||||
DELETE FROM `gossip_menu_option` WHERE `MenuID` IN (2061, 2062, 2714, 2715, 2716, 2717, 2718, 2719, 2720, 2721, 2722, 2723, 2725);
|
||||
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),
|
||||
(2061,1,0,"Official buisness, John. I need some information about Marsha Windsor. Tell me about the last time you saw him.",0,1,1,2714,0,0,0,"",0,0),
|
||||
(2714,0,0,"So what did you do?",0,1,1,2715,0,0,0,"",0,0),
|
||||
(2715,0,0,"Start making sense, dwarf. I don't want to have anything to do with your cracker, your pappy, or any sort of 'discreditin'.",0,1,1,2716,0,0,0,"",0,0),
|
||||
(2716,0,0,"Ironfoe?",0,1,1,2717,0,0,0,"",0,0),
|
||||
(2717,0,0,"Interesting... continue John.",0,1,1,2718,0,0,0,"",0,0),
|
||||
(2718,0,0,"So that's how Windsor died…",0,1,1,2719,0,0,0,"",0,0),
|
||||
(2719,0,0,"So how did he die?",0,1,1,2720,0,0,0,"",0,0),
|
||||
(2720,0,0,"Ok so where the hell is he? Wait a minute! Are you drunk?",0,1,1,2721,0,0,0,"",0,0),
|
||||
(2721,0,0,"WHY is he in Blackrock Depths?",0,1,1,2722,0,0,0,"",0,0),
|
||||
(2722,0,0,"300? So the Dark Irons killed him and dragged him into the Depths?",0,1,1,2723,0,0,0,"",0,0),
|
||||
(2723,0,0,"Ahh... Ironfoe",0,1,1,2725,0,0,0,"",0,0),
|
||||
(2725,0,0,"Thanks, Ragged John. Your story was very uplifting and informative",0,1,1,0,0,0,0,"",0,0);
|
||||
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=9563 AND `source_type`=0;
|
||||
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
|
||||
(9563,0,0,1,62,0,100,0,2062,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,"Ragged John - On Gossip 2062 Option 0 Selected - Close Gossip"),
|
||||
(9563,0,1,2,61,0,100,0,0,0,0,0,0,11,16472,0,0,0,0,0,7,0,0,0,0,0,0,0,0,"Ragged John - On link - Cast Wicked Milking"),
|
||||
(9563,0,2,0,61,0,100,0,0,0,0,0,0,15,4866,0,0,0,0,0,7,0,0,0,0,0,0,0,0,"Ragged John - On link - Give credit quest(4866)"),
|
||||
(9563,0,3,4,62,0,100,0,2725,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,"Ragged John - On Gossip 2725 Option 0 Selected - Close Gossip"),
|
||||
(9563,0,4,0,61,0,100,0,0,0,0,0,0,15,4224,0,0,0,0,0,7,0,0,0,0,0,0,0,0,"Ragged John - On link - Give credit quest(4224)");
|
||||
|
||||
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=2061;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||
(15,2061,0,0,1,9,0,4866,0,0,0,0,0,"","Show gossip 2061 option 0 if player does have quest 4866 taken"),
|
||||
(15,2061,0,0,1,1,0,16468,0,0,0,0,0,"","Show Gossip 2061 option 0 only if player has aura 16468"),
|
||||
(15,2061,1,0,2,9,0,4224,0,0,0,0,0,"","Show gossip 2061 option 1 if player does have quest 4224 taken");
|
||||
@@ -3,153 +3,3 @@
|
||||
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Burning_Steppes
|
||||
SD%Complete: 100
|
||||
SDComment: Quest support: 4224, 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
|
||||
######*/
|
||||
|
||||
#define GOSSIP_HELLO "Official buisness, John. I need some information about Marsha Windsor. Tell me about the last time you saw him."
|
||||
#define GOSSIP_SELECT1 "So what did you do?"
|
||||
#define GOSSIP_SELECT2 "Start making sense, dwarf. I don't want to have anything to do with your cracker, your pappy, or any sort of 'discreditin'."
|
||||
#define GOSSIP_SELECT3 "Ironfoe?"
|
||||
#define GOSSIP_SELECT4 "Interesting... continue John."
|
||||
#define GOSSIP_SELECT5 "So that's how Windsor died..."
|
||||
#define GOSSIP_SELECT6 "So how did he die?"
|
||||
#define GOSSIP_SELECT7 "Ok so where the hell is he? Wait a minute! Are you drunk?"
|
||||
#define GOSSIP_SELECT8 "WHY is he in Blackrock Depths?"
|
||||
#define GOSSIP_SELECT9 "300? So the Dark Irons killed him and dragged him into the Depths?"
|
||||
#define GOSSIP_SELECT10 "Ahh... Ironfoe"
|
||||
#define GOSSIP_SELECT11 "Thanks, Ragged John. Your story was very uplifting and informative"
|
||||
|
||||
enum RaggedJohn
|
||||
{
|
||||
QUEST_THE_TRUE_MASTERS = 4224,
|
||||
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() { }
|
||||
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
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*/) { }
|
||||
};
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
player->SEND_GOSSIP_MENU(2714, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
player->SEND_GOSSIP_MENU(2715, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+2:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
player->SEND_GOSSIP_MENU(2716, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+3:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
|
||||
player->SEND_GOSSIP_MENU(2717, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+4:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
|
||||
player->SEND_GOSSIP_MENU(2718, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+5:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
|
||||
player->SEND_GOSSIP_MENU(2719, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+6:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
|
||||
player->SEND_GOSSIP_MENU(2720, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+7:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT8, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8);
|
||||
player->SEND_GOSSIP_MENU(2721, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+8:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT9, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9);
|
||||
player->SEND_GOSSIP_MENU(2722, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+9:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT10, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10);
|
||||
player->SEND_GOSSIP_MENU(2723, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+10:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT11, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
|
||||
player->SEND_GOSSIP_MENU(2725, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+11:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->AreaExploredOrEventHappens(QUEST_THE_TRUE_MASTERS);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
{
|
||||
if (creature->IsQuestGiver())
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
|
||||
if (player->GetQuestStatus(QUEST_THE_TRUE_MASTERS) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
|
||||
player->SEND_GOSSIP_MENU(2713, creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_ragged_johnAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_burning_steppes()
|
||||
{
|
||||
new npc_ragged_john();
|
||||
}
|
||||
|
||||
@@ -203,7 +203,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_eversong_woods();
|
||||
@@ -791,7 +790,6 @@ void AddEasternKingdomsScripts()
|
||||
//AddSC_alterac_mountains();
|
||||
AddSC_arathi_highlands();
|
||||
AddSC_blasted_lands();
|
||||
AddSC_burning_steppes();
|
||||
AddSC_duskwood();
|
||||
AddSC_eastern_plaguelands();
|
||||
AddSC_eversong_woods();
|
||||
|
||||
Reference in New Issue
Block a user