mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 15:40:45 +01:00
Scripting/Bloodmyst Isle: Moved Captured Sunhawk Agent gossip to db.
This commit is contained in:
26
sql/updates/world/2013_12_23_04_world_misc.sql
Normal file
26
sql/updates/world/2013_12_23_04_world_misc.sql
Normal file
@@ -0,0 +1,26 @@
|
||||
-- Captured Sunhawk Agent SAI
|
||||
SET @ENTRY := 17824;
|
||||
UPDATE `creature_template` SET `gossip_menu_id`=7531, `AIName`='SmartAI', `ScriptName`= '' WHERE `entry`=@ENTRY;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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`,`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
|
||||
(@ENTRY,0,0,1,62,0,100,0,7533,0,0,0,33,17974,0,0,0,0,0,7,0,0,0,0,0,0,0,"Captured Sunhawk Agent - On Gossip Option - Kill Credit"),
|
||||
(@ENTRY,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,"Captured Sunhawk Agent - On Gossip Option - Close Gossip");
|
||||
|
||||
-- Add missing gossip for Captured Sunhawk Agent
|
||||
DELETE FROM `gossip_menu` WHERE `entry` IN (7531,7533,7534,7535,7536,7537);
|
||||
INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES
|
||||
(7531,9134),(7531,9136),(7533,9141),(7534,9140),(7535,9139),(7536,9138),(7537,9137);
|
||||
DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (7531,7537,7536,7535,7534,7533);
|
||||
INSERT INTO `gossip_menu_option` (menu_id, id, option_icon, option_text, option_id, npc_option_npcflag, action_menu_id, action_poi_id, box_coded, box_money, box_text) VALUES
|
||||
(7531,0,0, 'I''m a prisoner, what does it look like? The draenei filth captured me as I exited the sun gate. They killed our portal controllers and destroyed the gate. The Sun King will be most displeased with this turn of events.',1,1,7537,0,0,0, ''),
|
||||
(7537,0,0, 'Ah yes, Sironas. I had nearly forgotten that Sironas was here. I served under Sironas back on Outland. I hadn''t heard of this abomination, though; those damnable draenei captured me before I even fully materialized on this world.',1,1,7536,0,0,0, ''),
|
||||
(7536,0,0, 'Incredible. How did Sironas accomplish such a thing?',1,1,7535,0,0,0, ''),
|
||||
(7535,0,0, 'Sironas is an eredar... I mean, yes, obviously.',1,1,7534,0,0,0, ''),
|
||||
(7534,0,0, 'The Vector Coil is massive. I hope we have more than one abomination guarding the numerous weak points.',1,1,7533,0,0,0, ''),
|
||||
(7533,0,0, 'I did and you believed me. Thank you for the information, blood elf. You have helped us more than you could know.',1,1,0,0,0,0, '');
|
||||
|
||||
-- Add Conditions for Captured Sunhawk Agent gossip option
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=7531;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||
(15,7531,0,0,0,9,0,9756,0,0,0,0,0, '', 'Gossip Option - Show Option if Quest 9756 is taken'),
|
||||
(15,7531,0,0,1,1,0,31609,0,0,0,0,0, '', 'Gossip Option - Show Option if player has aura 31609');
|
||||
@@ -19,18 +19,18 @@
|
||||
/* ScriptData
|
||||
SDName: Bloodmyst_Isle
|
||||
SD%Complete: 80
|
||||
SDComment: Quest support: 9670, 9756(gossip items text needed).
|
||||
SDComment: Quest support: 9670, 9667
|
||||
SDCategory: Bloodmyst Isle
|
||||
EndScriptData */
|
||||
|
||||
/* ContentData
|
||||
npc_webbed_creature
|
||||
npc_captured_sunhawk_agent
|
||||
npc_princess_stillpine
|
||||
go_princess_stillpines_cage
|
||||
EndContentData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "Player.h"
|
||||
|
||||
/*######
|
||||
@@ -40,6 +40,11 @@ EndContentData */
|
||||
//possible creatures to be spawned
|
||||
uint32 const possibleSpawns[32] = {17322, 17661, 17496, 17522, 17340, 17352, 17333, 17524, 17654, 17348, 17339, 17345, 17359, 17353, 17336, 17550, 17330, 17701, 17321, 17680, 17325, 17320, 17683, 17342, 17715, 17334, 17341, 17338, 17337, 17346, 17344, 17327};
|
||||
|
||||
enum WebbedCreature
|
||||
{
|
||||
NPC_EXPEDITION_RESEARCHER = 17681
|
||||
};
|
||||
|
||||
class npc_webbed_creature : public CreatureScript
|
||||
{
|
||||
public:
|
||||
@@ -65,9 +70,8 @@ public:
|
||||
switch (urand(0, 2))
|
||||
{
|
||||
case 0:
|
||||
spawnCreatureID = 17681;
|
||||
if (Player* player = killer->ToPlayer())
|
||||
player->KilledMonsterCredit(spawnCreatureID, 0);
|
||||
player->KilledMonsterCredit(NPC_EXPEDITION_RESEARCHER, 0);
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
@@ -82,72 +86,6 @@ public:
|
||||
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_captured_sunhawk_agent
|
||||
######*/
|
||||
|
||||
#define C_SUNHAWK_TRIGGER 17974
|
||||
|
||||
#define GOSSIP_HELLO_CSA "[PH] "
|
||||
#define GOSSIP_SELECT_CSA1 "[PH] "
|
||||
#define GOSSIP_SELECT_CSA2 "[PH] "
|
||||
#define GOSSIP_SELECT_CSA3 "[PH] "
|
||||
#define GOSSIP_SELECT_CSA4 "[PH] "
|
||||
#define GOSSIP_SELECT_CSA5 "[PH] "
|
||||
|
||||
class npc_captured_sunhawk_agent : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_captured_sunhawk_agent() : CreatureScript("npc_captured_sunhawk_agent") { }
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_CSA1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
player->SEND_GOSSIP_MENU(9137, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+2:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_CSA2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
|
||||
player->SEND_GOSSIP_MENU(9138, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+3:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_CSA3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4);
|
||||
player->SEND_GOSSIP_MENU(9139, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+4:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_CSA4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5);
|
||||
player->SEND_GOSSIP_MENU(9140, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+5:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_CSA5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6);
|
||||
player->SEND_GOSSIP_MENU(9141, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+6:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->TalkedToCreature(C_SUNHAWK_TRIGGER, creature->GetGUID());
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
|
||||
{
|
||||
if (player->HasAura(31609) && player->GetQuestStatus(9756) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO_CSA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
player->SEND_GOSSIP_MENU(9136, creature->GetGUID());
|
||||
}
|
||||
else
|
||||
player->SEND_GOSSIP_MENU(9134, creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/*######
|
||||
## Quest 9667: Saving Princess Stillpine
|
||||
######*/
|
||||
@@ -206,7 +144,6 @@ public:
|
||||
void AddSC_bloodmyst_isle()
|
||||
{
|
||||
new npc_webbed_creature();
|
||||
new npc_captured_sunhawk_agent();
|
||||
new npc_princess_stillpine();
|
||||
new go_princess_stillpines_cage();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user