mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
53
sql/updates/world/3.3.5/2020_05_21_02_world_335.sql
Normal file
53
sql/updates/world/3.3.5/2020_05_21_02_world_335.sql
Normal file
@@ -0,0 +1,53 @@
|
||||
--
|
||||
DELETE FROM `gossip_menu` WHERE `MenuID` = 6186 AND `TextID` = 7393;
|
||||
INSERT INTO `gossip_menu` (`MenuID`,`TextID`,`VerifiedBuild`) VALUES
|
||||
(6186,7393,0);
|
||||
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 14 AND `SourceGroup` = 6186;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
|
||||
(14,6186,7339,0,0,1,0,23770,0,0,1,0,0,"","Group 0: Show gossip text 7339 if player does not have aura 'Sayge's Carnie Buff'"),
|
||||
(14,6186,7393,0,0,1,0,23770,0,0,0,0,0,"","Group 0: Show gossip text 7393 if player does have aura 'Sayge's Carnie Buff'");
|
||||
|
||||
UPDATE `gossip_menu_option` SET `ActionMenuID` = 6208 WHERE `MenuID` = 6185 AND `OptionID` = 1;
|
||||
UPDATE `gossip_menu_option` SET `ActionMenuID` = 6209 WHERE `MenuID` = 6185 AND `OptionID` = 2;
|
||||
UPDATE `gossip_menu_option` SET `ActionMenuID` = 6210 WHERE `MenuID` = 6185 AND `OptionID` = 3;
|
||||
UPDATE `gossip_menu_option` SET `ActionMenuID` = 6211 WHERE `MenuID` IN (6187,6208,6209,6210);
|
||||
UPDATE `gossip_menu_option` SET `OptionBroadcastTextID` = 10087 WHERE `MenuID` = 6210 AND `OptionID` = 0;
|
||||
UPDATE `gossip_menu_option` SET `ActionMenuID` = 6212 WHERE `MenuID` = 6211;
|
||||
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 15 AND `SourceGroup` = 6186;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
|
||||
(15,6186,0,0,0,1,0,23770,0,0,1,0,0,"","Group 0: Show Gossip Option 0 if player does not have aura 'Sayge's Carnie Buff'");
|
||||
|
||||
-- Sayge SAI
|
||||
SET @ID := 14822;
|
||||
UPDATE `creature_template` SET `AIName` = "SmartAI", `ScriptName` = "" WHERE `entry` = @ID;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` = @ID 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
|
||||
(@ID,0,0,0,10,0,100,0,1,10,120000,120000,1,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,"Sayge - Within 0-10 Range Out of Combat LoS - Say Line 0"),
|
||||
|
||||
(@ID,0,1,14,62,0,100,0,6187,0,0,0,0,11,23768,0,0,0,0,0,7,0,0,0,0,0,0,0,0,"Sayge - On Gossip Option 0 Selected - Cast 'Sayge's Dark Fortune of Damage'"),
|
||||
(@ID,0,2,14,62,0,100,0,6187,1,0,0,0,11,23769,0,0,0,0,0,7,0,0,0,0,0,0,0,0,"Sayge - On Gossip Option 1 Selected - Cast 'Sayge's Dark Fortune of Resistance'"),
|
||||
(@ID,0,3,14,62,0,100,0,6187,2,0,0,0,11,23767,0,0,0,0,0,7,0,0,0,0,0,0,0,0,"Sayge - On Gossip Option 2 Selected - Cast 'Sayge's Dark Fortune of Armor'"),
|
||||
|
||||
(@ID,0,4,14,62,0,100,0,6208,0,0,0,0,11,23738,0,0,0,0,0,7,0,0,0,0,0,0,0,0,"Sayge - On Gossip Option 0 Selected - Cast 'Sayge's Dark Fortune of Spirit'"),
|
||||
(@ID,0,5,14,62,0,100,0,6208,1,0,0,0,11,23766,0,0,0,0,0,7,0,0,0,0,0,0,0,0,"Sayge - On Gossip Option 1 Selected - Cast 'Sayge's Dark Fortune of Intelligence'"),
|
||||
(@ID,0,6,14,62,0,100,0,6208,2,0,0,0,11,23769,0,0,0,0,0,7,0,0,0,0,0,0,0,0,"Sayge - On Gossip Option 2 Selected - Cast 'Sayge's Dark Fortune of Resistance'"),
|
||||
|
||||
(@ID,0,7,14,62,0,100,0,6209,0,0,0,0,11,23737,0,0,0,0,0,7,0,0,0,0,0,0,0,0,"Sayge - On Gossip Option 0 Selected - Cast 'Sayge's Dark Fortune of Stamina'"),
|
||||
(@ID,0,8,14,62,0,100,0,6209,1,0,0,0,11,23735,0,0,0,0,0,7,0,0,0,0,0,0,0,0,"Sayge - On Gossip Option 1 Selected - Cast 'Sayge's Dark Fortune of Strength'"),
|
||||
(@ID,0,9,14,62,0,100,0,6209,2,0,0,0,11,23736,0,0,0,0,0,7,0,0,0,0,0,0,0,0,"Sayge - On Gossip Option 2 Selected - Cast 'Sayge's Dark Fortune of Agility'"),
|
||||
|
||||
(@ID,0,10,14,62,0,100,0,6210,0,0,0,0,11,23766,0,0,0,0,0,7,0,0,0,0,0,0,0,0,"Sayge - On Gossip Option 0 Selected - Cast 'Sayge's Dark Fortune of Intelligence'"),
|
||||
(@ID,0,11,14,62,0,100,0,6210,1,0,0,0,11,23738,0,0,0,0,0,7,0,0,0,0,0,0,0,0,"Sayge - On Gossip Option 1 Selected - Cast 'Sayge's Dark Fortune of Spirit'"),
|
||||
(@ID,0,12,14,62,0,100,0,6210,2,0,0,0,11,23767,0,0,0,0,0,7,0,0,0,0,0,0,0,0,"Sayge - On Gossip Option 2 Selected - Cast 'Sayge's Dark Fortune of Armor'"),
|
||||
|
||||
(@ID,0,13,0,62,0,100,0,6211,0,0,0,0,11,23765,0,0,0,0,0,7,0,0,0,0,0,0,0,0,"Sayge - On Gossip Option 0 Selected - Cast 'Darkmoon Faire Fortune'"),
|
||||
(@ID,0,14,0,61,0,100,0,0,0,0,0,0,11,23770,0,0,0,0,0,7,0,0,0,0,0,0,0,0,"Sayge - On Link - Cast 'Sayge's Carnie Buff'");
|
||||
|
||||
DELETE FROM `creature_text` WHERE `CreatureID` = @ID;
|
||||
INSERT INTO `creature_text` (`CreatureID`,`GroupID`,`ID`,`Text`,`Type`,`Language`,`Probability`,`Emote`,`Duration`,`Sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES
|
||||
(@ID,0,0,"Come to me and see what the future holds for you!",12,0,100,0,0,0,10125,0,"Sayge"),
|
||||
(@ID,0,1,"Come speak with me, and what once was cloudy shall become crystal clear.",12,0,100,0,0,0,10126,0,"Sayge"),
|
||||
(@ID,0,2,"Fear not! All fortunes can be discerned for those who know the way.",12,0,100,0,0,0,10127,0,"Sayge"),
|
||||
(@ID,0,3,"The longer you wait, the less future you have for me to foretell.",12,0,100,0,0,0,10128,0,"Sayge");
|
||||
@@ -1147,186 +1147,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_sayge
|
||||
######*/
|
||||
|
||||
enum Sayge
|
||||
{
|
||||
GOSSIP_MENU_OPTION_ID_ANSWER_1 = 0,
|
||||
GOSSIP_MENU_OPTION_ID_ANSWER_2 = 1,
|
||||
GOSSIP_MENU_OPTION_ID_ANSWER_3 = 2,
|
||||
GOSSIP_MENU_OPTION_ID_ANSWER_4 = 3,
|
||||
GOSSIP_I_AM_READY_TO_DISCOVER = 6186,
|
||||
GOSSIP_MENU_OPTION_SAYGE1 = 6185,
|
||||
GOSSIP_MENU_OPTION_SAYGE2 = 6185,
|
||||
GOSSIP_MENU_OPTION_SAYGE3 = 6185,
|
||||
GOSSIP_MENU_OPTION_SAYGE4 = 6185,
|
||||
GOSSIP_MENU_OPTION_SAYGE5 = 6187,
|
||||
GOSSIP_MENU_OPTION_SAYGE6 = 6187,
|
||||
GOSSIP_MENU_OPTION_SAYGE7 = 6187,
|
||||
GOSSIP_MENU_OPTION_SAYGE8 = 6208,
|
||||
GOSSIP_MENU_OPTION_SAYGE9 = 6208,
|
||||
GOSSIP_MENU_OPTION_SAYGE10 = 6208,
|
||||
GOSSIP_MENU_OPTION_SAYGE11 = 6209,
|
||||
GOSSIP_MENU_OPTION_SAYGE12 = 6209,
|
||||
GOSSIP_MENU_OPTION_SAYGE13 = 6209,
|
||||
GOSSIP_MENU_OPTION_SAYGE14 = 6210,
|
||||
GOSSIP_MENU_OPTION_SAYGE15 = 6210,
|
||||
GOSSIP_MENU_OPTION_SAYGE16 = 6210,
|
||||
GOSSIP_MENU_OPTION_SAYGE17 = 6211,
|
||||
GOSSIP_MENU_I_HAVE_LONG_KNOWN = 7339,
|
||||
GOSSIP_MENU_YOU_HAVE_BEEN_TASKED = 7340,
|
||||
GOSSIP_MENU_SWORN_EXECUTIONER = 7341,
|
||||
GOSSIP_MENU_DIPLOMATIC_MISSION = 7361,
|
||||
GOSSIP_MENU_YOUR_BROTHER_SEEKS = 7362,
|
||||
GOSSIP_MENU_A_TERRIBLE_BEAST = 7363,
|
||||
GOSSIP_MENU_YOUR_FORTUNE_IS_CAST = 7364,
|
||||
GOSSIP_MENU_HERE_IS_YOUR_FORTUNE = 7365,
|
||||
GOSSIP_MENU_CANT_GIVE_YOU_YOUR = 7393,
|
||||
|
||||
SPELL_STRENGTH = 23735, // +10% Strength
|
||||
SPELL_AGILITY = 23736, // +10% Agility
|
||||
SPELL_STAMINA = 23737, // +10% Stamina
|
||||
SPELL_SPIRIT = 23738, // +10% Spirit
|
||||
SPELL_INTELLECT = 23766, // +10% Intellect
|
||||
SPELL_ARMOR = 23767, // +10% Armor
|
||||
SPELL_DAMAGE = 23768, // +10% Damage
|
||||
SPELL_RESISTANCE = 23769, // +25 Magic Resistance (All)
|
||||
SPELL_FORTUNE = 23765 // Darkmoon Faire Fortune
|
||||
};
|
||||
|
||||
class npc_sayge : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_sayge() : CreatureScript("npc_sayge") { }
|
||||
|
||||
struct npc_saygeAI : public ScriptedAI
|
||||
{
|
||||
npc_saygeAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if (me->IsQuestGiver())
|
||||
player->PrepareQuestMenu(me->GetGUID());
|
||||
|
||||
if (player->GetSpellHistory()->HasCooldown(SPELL_STRENGTH) ||
|
||||
player->GetSpellHistory()->HasCooldown(SPELL_AGILITY) ||
|
||||
player->GetSpellHistory()->HasCooldown(SPELL_STAMINA) ||
|
||||
player->GetSpellHistory()->HasCooldown(SPELL_SPIRIT) ||
|
||||
player->GetSpellHistory()->HasCooldown(SPELL_INTELLECT) ||
|
||||
player->GetSpellHistory()->HasCooldown(SPELL_ARMOR) ||
|
||||
player->GetSpellHistory()->HasCooldown(SPELL_DAMAGE) ||
|
||||
player->GetSpellHistory()->HasCooldown(SPELL_RESISTANCE))
|
||||
SendGossipMenuFor(player, GOSSIP_MENU_CANT_GIVE_YOU_YOUR, me->GetGUID());
|
||||
else
|
||||
{
|
||||
AddGossipItemFor(player, GOSSIP_I_AM_READY_TO_DISCOVER, GOSSIP_MENU_OPTION_ID_ANSWER_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
SendGossipMenuFor(player, GOSSIP_MENU_I_HAVE_LONG_KNOWN, me->GetGUID());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void SendAction(Player* player, uint32 action)
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
AddGossipItemFor(player, GOSSIP_MENU_OPTION_SAYGE1, GOSSIP_MENU_OPTION_ID_ANSWER_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
AddGossipItemFor(player, GOSSIP_MENU_OPTION_SAYGE2, GOSSIP_MENU_OPTION_ID_ANSWER_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
AddGossipItemFor(player, GOSSIP_MENU_OPTION_SAYGE3, GOSSIP_MENU_OPTION_ID_ANSWER_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
|
||||
AddGossipItemFor(player, GOSSIP_MENU_OPTION_SAYGE4, GOSSIP_MENU_OPTION_ID_ANSWER_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
|
||||
SendGossipMenuFor(player, GOSSIP_MENU_YOU_HAVE_BEEN_TASKED, me->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 2:
|
||||
AddGossipItemFor(player, GOSSIP_MENU_OPTION_SAYGE5, GOSSIP_MENU_OPTION_ID_ANSWER_1, GOSSIP_SENDER_MAIN + 1, GOSSIP_ACTION_INFO_DEF);
|
||||
AddGossipItemFor(player, GOSSIP_MENU_OPTION_SAYGE6, GOSSIP_MENU_OPTION_ID_ANSWER_2, GOSSIP_SENDER_MAIN + 2, GOSSIP_ACTION_INFO_DEF);
|
||||
AddGossipItemFor(player, GOSSIP_MENU_OPTION_SAYGE7, GOSSIP_MENU_OPTION_ID_ANSWER_3, GOSSIP_SENDER_MAIN + 3, GOSSIP_ACTION_INFO_DEF);
|
||||
SendGossipMenuFor(player, GOSSIP_MENU_SWORN_EXECUTIONER, me->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 3:
|
||||
AddGossipItemFor(player, GOSSIP_MENU_OPTION_SAYGE8, GOSSIP_MENU_OPTION_ID_ANSWER_1, GOSSIP_SENDER_MAIN + 4, GOSSIP_ACTION_INFO_DEF);
|
||||
AddGossipItemFor(player, GOSSIP_MENU_OPTION_SAYGE9, GOSSIP_MENU_OPTION_ID_ANSWER_2, GOSSIP_SENDER_MAIN + 5, GOSSIP_ACTION_INFO_DEF);
|
||||
AddGossipItemFor(player, GOSSIP_MENU_OPTION_SAYGE10, GOSSIP_MENU_OPTION_ID_ANSWER_3, GOSSIP_SENDER_MAIN + 2, GOSSIP_ACTION_INFO_DEF);
|
||||
SendGossipMenuFor(player, GOSSIP_MENU_DIPLOMATIC_MISSION, me->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 4:
|
||||
AddGossipItemFor(player, GOSSIP_MENU_OPTION_SAYGE11, GOSSIP_MENU_OPTION_ID_ANSWER_1, GOSSIP_SENDER_MAIN + 6, GOSSIP_ACTION_INFO_DEF);
|
||||
AddGossipItemFor(player, GOSSIP_MENU_OPTION_SAYGE12, GOSSIP_MENU_OPTION_ID_ANSWER_2, GOSSIP_SENDER_MAIN + 7, GOSSIP_ACTION_INFO_DEF);
|
||||
AddGossipItemFor(player, GOSSIP_MENU_OPTION_SAYGE13, GOSSIP_MENU_OPTION_ID_ANSWER_3, GOSSIP_SENDER_MAIN + 8, GOSSIP_ACTION_INFO_DEF);
|
||||
SendGossipMenuFor(player, GOSSIP_MENU_YOUR_BROTHER_SEEKS, me->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 5:
|
||||
AddGossipItemFor(player, GOSSIP_MENU_OPTION_SAYGE14, GOSSIP_MENU_OPTION_ID_ANSWER_1, GOSSIP_SENDER_MAIN + 5, GOSSIP_ACTION_INFO_DEF);
|
||||
AddGossipItemFor(player, GOSSIP_MENU_OPTION_SAYGE15, GOSSIP_MENU_OPTION_ID_ANSWER_2, GOSSIP_SENDER_MAIN + 4, GOSSIP_ACTION_INFO_DEF);
|
||||
AddGossipItemFor(player, GOSSIP_MENU_OPTION_SAYGE16, GOSSIP_MENU_OPTION_ID_ANSWER_3, GOSSIP_SENDER_MAIN + 3, GOSSIP_ACTION_INFO_DEF);
|
||||
SendGossipMenuFor(player, GOSSIP_MENU_A_TERRIBLE_BEAST, me->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF:
|
||||
AddGossipItemFor(player, GOSSIP_MENU_OPTION_SAYGE17, GOSSIP_MENU_OPTION_ID_ANSWER_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
|
||||
SendGossipMenuFor(player, GOSSIP_MENU_YOUR_FORTUNE_IS_CAST, me->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 6:
|
||||
DoCast(player, SPELL_FORTUNE, false);
|
||||
SendGossipMenuFor(player, GOSSIP_MENU_HERE_IS_YOUR_FORTUNE, me->GetGUID());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool GossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
|
||||
{
|
||||
uint32 const sender = player->PlayerTalkClass->GetGossipOptionSender(gossipListId);
|
||||
uint32 const action = player->PlayerTalkClass->GetGossipOptionAction(gossipListId);
|
||||
ClearGossipMenuFor(player);
|
||||
uint32 spellId = 0;
|
||||
switch (sender)
|
||||
{
|
||||
case GOSSIP_SENDER_MAIN:
|
||||
SendAction(player, action);
|
||||
break;
|
||||
case GOSSIP_SENDER_MAIN + 1:
|
||||
spellId = SPELL_DAMAGE;
|
||||
break;
|
||||
case GOSSIP_SENDER_MAIN + 2:
|
||||
spellId = SPELL_RESISTANCE;
|
||||
break;
|
||||
case GOSSIP_SENDER_MAIN + 3:
|
||||
spellId = SPELL_ARMOR;
|
||||
break;
|
||||
case GOSSIP_SENDER_MAIN + 4:
|
||||
spellId = SPELL_SPIRIT;
|
||||
break;
|
||||
case GOSSIP_SENDER_MAIN + 5:
|
||||
spellId = SPELL_INTELLECT;
|
||||
break;
|
||||
case GOSSIP_SENDER_MAIN + 6:
|
||||
spellId = SPELL_STAMINA;
|
||||
break;
|
||||
case GOSSIP_SENDER_MAIN + 7:
|
||||
spellId = SPELL_STRENGTH;
|
||||
break;
|
||||
case GOSSIP_SENDER_MAIN + 8:
|
||||
spellId = SPELL_AGILITY;
|
||||
break;
|
||||
}
|
||||
|
||||
if (spellId)
|
||||
{
|
||||
DoCast(player, spellId, false);
|
||||
player->GetSpellHistory()->AddCooldown(spellId, 0, std::chrono::hours(2));
|
||||
SendAction(player, action);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_saygeAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class npc_steam_tonk : public CreatureScript
|
||||
{
|
||||
public:
|
||||
@@ -2895,7 +2715,6 @@ void AddSC_npcs_special()
|
||||
new npc_injured_patient();
|
||||
new npc_garments_of_quests();
|
||||
new npc_guardian();
|
||||
new npc_sayge();
|
||||
new npc_steam_tonk();
|
||||
new npc_tonk_mine();
|
||||
new npc_tournament_mount();
|
||||
|
||||
Reference in New Issue
Block a user