Merge remote-tracking branch 'velinath/sai-migrations-2' into 3.3.5-base

This commit is contained in:
treeston
2016-01-05 23:36:57 +01:00
2 changed files with 21 additions and 9 deletions

View File

@@ -0,0 +1,21 @@
-- Add gossip texts to menu
DELETE FROM `gossip_menu_option` WHERE `menu_id` = 8719;
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
(8719,0,0,'Absolutely! Send me to the Skyguard Outpost.',21553,1,1,0,0,0,0,'',0);
-- This was already here but I think rather enumerate from 0 than 1 in gossip_menu_option
-- Migrate NPC to use SmartAI
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 23415;
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14, 15) AND `SourceGroup` = 8719;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(14,8719,10980,0,0,5,0,1031,224,0,1,0,'','Skyguard Handler Deesak - Show gossip menu text below Honored reputation with faction 1031'),
(14,8719,10979,0,0,5,0,1031,224,0,0,0,'','Skyguard Handler Deesak - Show gossip menu text above Honored reputation with faction 1031'),
(15,8719,0,0,0,5,0,1031,224,0,0,0,'','Skyguard Handler Deesak - Show gossip option 0 if player has reputation Honored or above with faction 1031');
-- Not sure if the missing condition is necessary, but it makes things a lot clearer when looking at the table.
-- Create SmartAI for Skyguard Handler Deesak
DELETE FROM `smart_scripts` WHERE (source_type = 0 AND entryorguid = 23415);
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
(23415,0,0,1,62,0,100,0,8719,0,0,0,11,41279,0,0,0,0,0,7,0,0,0,0,0,0,0,'Skyguard Handler Deesak - On Gossip Option 0 Selected - Cast Spell 41279'),
(23415,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,'Skyguard Handler Deesak - On Linked Actions - Close Gossip');

View File

@@ -36,7 +36,6 @@ EndScriptData
#define GOSSIP_DABIREE1 "Fly me to Murketh and Shaadraz Gateways"
#define GOSSIP_DABIREE2 "Fly me to Shatter Point"
#define GOSSIP_VERONIA "Fly me to Manaforge Coruu please"
#define GOSSIP_DEESAK "Fly me to Ogri'la please"
#define GOSSIP_CRIMSONWING "<Ride the gryphons to Survey Alcaz Island>"
class npc_taxi : public CreatureScript
@@ -76,10 +75,6 @@ public:
if (player->GetQuestStatus(10652) != QUEST_STATUS_REWARDED)
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_VERONIA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 15);
break;
case 23415: // Terokkar Forest - Skyguard Handler Deesak
if (player->GetReputationRank(1031) >= REP_HONORED)
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_DEESAK, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 16);
break;
case 23704: // Dustwallow Marsh - Cassa Crimsonwing
if (player->GetQuestStatus(11142) == QUEST_STATUS_INCOMPLETE)
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_CRIMSONWING, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+25);
@@ -125,10 +120,6 @@ public:
player->CLOSE_GOSSIP_MENU();
player->CastSpell(player, 34905, true); //TaxiPath 606
break;
case GOSSIP_ACTION_INFO_DEF + 16:
player->CLOSE_GOSSIP_MENU();
player->CastSpell(player, 41279, true); //TaxiPath 705 (Taxi - Skettis to Skyguard Outpost)
break;
case GOSSIP_ACTION_INFO_DEF + 25:
player->CLOSE_GOSSIP_MENU();
player->CastSpell(player, 42295, true);