mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 15:40:45 +01:00
Core/Scripts: Migrate Shadowmoon Valley NPC's to SAI (#17373)
* Migrate Flanis Swiftwing and Kagrosh to SAI and more.
This commit is contained in:
27
sql/updates/world/3.3.5/2016_06_14_99_world.sql
Normal file
27
sql/updates/world/3.3.5/2016_06_14_99_world.sql
Normal file
@@ -0,0 +1,27 @@
|
||||
-- Add sniffed gossip text to menu
|
||||
DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (8356, 8371);
|
||||
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
|
||||
(8356, 0, 0, 'Reclaim Flanis\'s pack.', 19326,1,1,0,0,0,0,'',0),
|
||||
(8371, 0, 0, 'Search the corpse for Kagrosh\'s pack.', 19400,1,1,0,0,0,0,'',0);
|
||||
|
||||
-- Migrate NPCs to use SmartAI / remove from C++ script
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` IN (21727, 21725, 22112);
|
||||
UPDATE `creature_template` SET `ScriptName` = '' WHERE `entry` = 23489;
|
||||
|
||||
-- Create SmartAI
|
||||
DELETE FROM `smart_scripts` WHERE (source_type = 0 AND entryorguid IN (21727, 21725, 22112));
|
||||
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
|
||||
(21727, 0, 0, 1, 62, 0, 100, 0, 8356, 0, 0, 0, 11, 37244, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Flanis Swiftwing - On Gossip Option 0 Selected - Cast Spell'),
|
||||
(21727, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Flanis Swiftwing - On Linked Action - Close Gossip'),
|
||||
(21725, 0, 0, 1, 62, 0, 100, 0, 8371, 0, 0, 0, 11, 37245, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Kagrosh - On Gossip Option 0 Selected - Cast Spell'),
|
||||
(21725, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Kagrosh - On Linked Action - Close Gossip'),
|
||||
(22112, 0, 0, 0, 19, 0, 100, 0, 10866, 0, 0, 0, 12, 11980, 1, 300000, 0, 0, 0, 8, 0, 0, 0, -4204.94, 316.397, 122.508, 1.309, 'Karynaku - On Quest Accepted - Summon Creature \'Zuluhed the Whacked\''),
|
||||
(22112, 0, 1, 0, 19, 0, 100, 0, 10870, 0, 0, 0, 52, 649, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Karynaku - On Quest Accepted - Activate Taxi Path 649');
|
||||
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 15 AND `SourceGroup` IN (8356, 8371, 8754);
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
|
||||
(15,8356,0,0,0,2,0,30658,1,0,1,0,'','Flanis Swiftwing - Show gossip option 0 if player does not have item 30658 in inventory'),
|
||||
(15,8356,0,0,0,9,0,10583,0,0,0,0,'','Flanis Swiftwing - Show gossip option 0 if player has accepted quest 10583'),
|
||||
(15,8371,0,0,0,2,0,30659,1,0,1,0,'','Kagrosh - Show gossip option 0 if player does not have item 30659 in inventory'),
|
||||
(15,8371,0,0,0,9,0,10601,0,0,0,0,'','Kagrosh - Show gossip option 0 if player has accepted quest 10601'),
|
||||
(15,8754,0,0,0,5,0,1015,128,0,0,0,'','Drake Dealer Hurlunk - Show gossip option 0 if player is exalted with faction 1015');
|
||||
@@ -19,7 +19,7 @@
|
||||
/* ScriptData
|
||||
SDName: Shadowmoon_Valley
|
||||
SD%Complete: 100
|
||||
SDComment: Quest support: 10583, 10601, 10804, 10854, 10458, 10481, 10480, 10781, 10451. Vendor Drake Dealer Hurlunk.
|
||||
SDComment: Quest support: 10804, 10854, 10458, 10481, 10480, 10781, 10451.
|
||||
SDCategory: Shadowmoon Valley
|
||||
EndScriptData */
|
||||
|
||||
@@ -28,9 +28,6 @@ npc_invis_infernal_caster
|
||||
npc_infernal_attacker
|
||||
npc_mature_netherwing_drake
|
||||
npc_enslaved_netherwing_drake
|
||||
npc_drake_dealer_hurlunk
|
||||
npcs_flanis_swiftwing_and_kagrosh
|
||||
npc_karynaku
|
||||
npc_earthmender_wilda
|
||||
npc_torloth_the_magnificent
|
||||
npc_illidari_spawn
|
||||
@@ -570,117 +567,6 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_drake_dealer_hurlunk
|
||||
######*/
|
||||
|
||||
class npc_drake_dealer_hurlunk : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_drake_dealer_hurlunk() : CreatureScript("npc_drake_dealer_hurlunk") { }
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
if (action == GOSSIP_ACTION_TRADE)
|
||||
player->GetSession()->SendListInventory(creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (creature->IsVendor() && player->GetReputationRank(1015) == REP_EXALTED)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
|
||||
|
||||
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_flanis_swiftwing_and_kagrosh
|
||||
######*/
|
||||
|
||||
#define GOSSIP_HSK1 "Take Flanis's Pack"
|
||||
#define GOSSIP_HSK2 "Take Kagrosh's Pack"
|
||||
|
||||
class npcs_flanis_swiftwing_and_kagrosh : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npcs_flanis_swiftwing_and_kagrosh() : CreatureScript("npcs_flanis_swiftwing_and_kagrosh") { }
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 action) override
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
if (action == GOSSIP_ACTION_INFO_DEF+1)
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 30658, 1, NULL);
|
||||
if (msg == EQUIP_ERR_OK)
|
||||
{
|
||||
player->StoreNewItem(dest, 30658, true);
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
}
|
||||
}
|
||||
if (action == GOSSIP_ACTION_INFO_DEF+2)
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 30659, 1, NULL);
|
||||
if (msg == EQUIP_ERR_OK)
|
||||
{
|
||||
player->StoreNewItem(dest, 30659, true);
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (player->GetQuestStatus(10583) == QUEST_STATUS_INCOMPLETE && !player->HasItemCount(30658, 1, true))
|
||||
player->ADD_GOSSIP_ITEM(0, GOSSIP_HSK1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
if (player->GetQuestStatus(10601) == QUEST_STATUS_INCOMPLETE && !player->HasItemCount(30659, 1, true))
|
||||
player->ADD_GOSSIP_ITEM(0, GOSSIP_HSK2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
|
||||
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
# npc_karynaku
|
||||
####*/
|
||||
|
||||
enum Karynaku
|
||||
{
|
||||
QUEST_ALLY_OF_NETHER = 10870,
|
||||
QUEST_ZUHULED_THE_WACK = 10866,
|
||||
|
||||
NPC_ZUHULED_THE_WACKED = 11980,
|
||||
|
||||
TAXI_PATH_ID = 649,
|
||||
};
|
||||
|
||||
class npc_karynaku : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_karynaku() : CreatureScript("npc_karynaku") { }
|
||||
|
||||
bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) override
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_ALLY_OF_NETHER)
|
||||
player->ActivateTaxiPathTo(TAXI_PATH_ID);
|
||||
|
||||
if (quest->GetQuestId() == QUEST_ZUHULED_THE_WACK)
|
||||
creature->SummonCreature(NPC_ZUHULED_THE_WACKED, -4204.94f, 316.397f, 122.508f, 1.309f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 300000);
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
/*####
|
||||
# npc_earthmender_wilda
|
||||
####*/
|
||||
@@ -1703,9 +1589,6 @@ void AddSC_shadowmoon_valley()
|
||||
new npc_mature_netherwing_drake();
|
||||
new npc_enslaved_netherwing_drake();
|
||||
new npc_dragonmaw_peon();
|
||||
new npc_drake_dealer_hurlunk();
|
||||
new npcs_flanis_swiftwing_and_kagrosh();
|
||||
new npc_karynaku();
|
||||
new npc_earthmender_wilda();
|
||||
new npc_lord_illidan_stormrage();
|
||||
new go_crystal_prison();
|
||||
|
||||
Reference in New Issue
Block a user