This commit is contained in:
Subv2112
2012-01-22 08:04:39 -05:00
62 changed files with 859 additions and 393 deletions
+24
View File
@@ -1945,6 +1945,30 @@ LOCK TABLES `lag_reports` WRITE;
/*!40000 ALTER TABLE `lag_reports` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `lfg_data`
--
DROP TABLE IF EXISTS `lfg_data`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `lfg_data` (
`guid` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier',
`dungeon` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`state` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (`guid`)
) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT='LFG Data';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `lfg_data`
--
LOCK TABLES `lfg_data` WRITE;
/*!40000 ALTER TABLE `lfg_data` DISABLE KEYS */;
/*!40000 ALTER TABLE `lfg_data` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `mail`
--
File diff suppressed because it is too large Load Diff
@@ -7,7 +7,7 @@ SET @QUEST := 54;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `id`=@QUEST;
DELETE FROM `quest_start_scripts` WHERE `id`=@QUEST;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@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,0,19,0,100,0,@QUEST,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Marshal McBride - On Quest Accept - Say Line 0");
-- Text
@@ -5,7 +5,8 @@ SET @QUEST := 4975;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `id`=@QUEST;
DELETE FROM `quest_start_scripts` WHERE `id`=@QUEST;
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY,@ENTRY*100);
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY*100 AND `source_type`=9;
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,0,19,0,100,0,@QUEST,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Menara Voidrender - On Quest Accept - Run Script"),
(@ENTRY*100,9,0,0,0,0,100,0,10000,10000,0,0,15,@QUEST,0,0,0,0,0,7,0,0,0,0,0,0,0,"Menara Voidrender - On Script - Quest Credit"); -- After ten seconds
@@ -6,7 +6,7 @@ SET @QUEST := 409;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `id`=@QUEST;
DELETE FROM `quest_start_scripts` WHERE `id`=@QUEST;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@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,0,19,0,100,0,@QUEST,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gunther Arcanus - On Quest Accept - Say Line 0");
-- Text
@@ -6,6 +6,6 @@ SET @QUEST := 13074;
SET @SPELL_FITFUL_DREAM := 57413;
UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `id`=@QUEST;
DELETE FROM `quest_start_scripts` WHERE `id`=@QUEST;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `id`=4;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0 AND `id`=4;
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,4,0,19,0,100,0,@QUEST,0,0,0,11,@SPELL_FITFUL_DREAM,0,0,0,0,0,7,0,0,0,0,0,0,0,"Keeper Remulos - On Quest Accept - Cast Fitful Dream");
@@ -5,7 +5,7 @@ SET @QUEST := 753;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `id`=@QUEST;
DELETE FROM `quest_start_scripts` WHERE `id`=@QUEST;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@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,0,19,0,100,0,@QUEST,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Greatmother Hawkwind - On Script - Emote Line 0");
-- Texts
@@ -8,7 +8,7 @@ UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `id`=@QUEST;
DELETE FROM `quest_start_scripts` WHERE `id`=@QUEST;
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@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,0,1,0,100,0,0,0,0,0,11,@SPELL_BLESSING,0,0,0,0,0,1,0,0,0,0,0,0,0,"A'dal - Out of Combat - Cast Blessing of A'dal"), -- From EAI
(@ENTRY,0,1,0,19,0,100,0,@QUEST,0,0,0,11,@SPELL_TP_DALARAN,0,0,0,0,0,7,0,0,0,0,0,0,0,"A'dal - On Quest Accept - Cast Teleport Dalaran");
@@ -7,17 +7,16 @@ UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry`=
UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0,`EmoteOnComplete`=11 WHERE `id`=@QUEST; -- ONESHOT_LAUGH
UPDATE `quest_template` SET `EmoteOnComplete`=14 WHERE `id`=1246; -- Previous version should make him rude against player
DELETE FROM `quest_start_scripts` WHERE `id`=@QUEST;
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY,@ENTRY*100,@ENTRY*100+1);
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY*100,@ENTRY*100+1) AND `source_type`=9;
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,0,13,0,100,0,6000,21000,0,0,11,@SPELL_PUMMEL,0,0,0,0,0,1,0,0,0,0,0,0,0,"Dashel Stonefist - Player Casting - Cast Pummel"),
(@ENTRY,0,1,0,19,0,100,0,@QUEST,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Dashel Stonefist - On Quest Accept - Run Script"),
(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Dashel Stonefist - On Script - Say Line 0"),
(@ENTRY*100,9,1,0,0,0,100,0,0,0,0,0,2,168,0,0,0,0,0,1,0,0,0,0,0,0,0,"Dashel Stonefist - On Script - Set Faction Hostile"),
(@ENTRY*100,9,2,0,0,0,100,0,0,0,0,0,49,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Dashel Stonefist - On Script - Attack Player"),
(@ENTRY*100,9,3,0,0,0,100,0,2000,2000,0,0,12,4969,1,300000,0,0,0,8,0,0,0,-8678.246094,440.952606,99.620926,4.364815,"Dashel Stonefist - On Script - Summon Old Town Thug"),
(@ENTRY*100,9,4,0,0,0,100,0,0,0,0,0,12,4969,1,300000,0,0,0,8,0,0,0,-8682.465820,441.471161,99.531319,4.871392,"Dashel Stonefist - On Script - Summon Old Town Thug"),
(@ENTRY,0,2,0,2,0,100,0,0,15,0,0,80,@ENTRY*100+1,0,2,0,0,0,1,0,0,0,0,0,0,0,"Dashel Stonefist - On 15% HP - Run Script"),
(@ENTRY*100+1,9,0,0,0,0,100,0,0,0,0,0,15,@QUEST,0,0,0,0,0,7,0,0,0,0,0,0,0,"Dashel Stonefist - On Script - Quest Credit"), -- We are putting this before evade else we lose our target
(@ENTRY*100+1,9,1,0,0,0,100,0,0,0,0,0,20,9,0,0,0,0,0,1,0,0,0,0,0,0,0,"Dashel Stonefist - On Script - Stop Attacking"),
@@ -3,10 +3,10 @@
SET @ENTRY := 25462;
SET @QUEST := 12593;
SET @SPELL_EXLOSION := 58024;
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY,@ENTRY*100);
UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `id`=@QUEST;
DELETE FROM `quest_start_scripts` WHERE `id`=@QUEST;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY*100 AND `source_type`=9;
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,0,19,0,100,0,@QUEST,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"The Lich King - On Quest Accept - Run Script"),
(@ENTRY*100,9,0,0,0,0,100,0,3000,3000,0,0,11,@SPELL_EXLOSION,0,0,0,0,0,7,0,0,0,0,0,0,0,"The Lich King - On Script - Cast 'Icecrown Airship - A - Attack - 02b Cannon Explosion, Shield'"); -- After three seconds
@@ -0,0 +1,27 @@
DELETE FROM `spell_script_names` WHERE `spell_id` IN (69672,69673);
INSERT INTO `spell_script_names`(`spell_id`,`ScriptName`) VALUES
(69672,'spell_gen_sunreaver_disguise'),
(69673,'spell_gen_silver_covenant_disguise');
-- Update spells used on script. Now they are always casting the female spell,
-- since the spell script is fixed we should cast now the correct spell.
UPDATE `smart_scripts` SET `action_param1`=69672 WHERE `entryorguid`=36669 AND `action_type`=11 AND `action_param1`=70973;
UPDATE `smart_scripts` SET `action_param1`=69673 WHERE `entryorguid`=36670 AND `action_type`=11 AND `action_param1`=70971;
-- Set correct gossip menus ids for renewing the disguise
UPDATE `smart_scripts` SET `event_param1`=10858 WHERE `entryorguid`=36669 AND `event_param1`=10857;
UPDATE `smart_scripts` SET `event_param1`=10857 WHERE `entryorguid`=36670 AND `event_param1`=10858;
-- Gossip options were crossed. They should offer to cast the oposing faction disguise,instead of his own faction disguise.
UPDATE `gossip_menu_option` SET `option_text`="Would you renew my Covenant disguise?" WHERE `menu_id`=10857 AND `id`=1;
UPDATE `gossip_menu_option` SET `option_text`="Would you renew my Sunreaver disguise?" WHERE `menu_id`=10858 AND `id`=1;
-- Correct quest ids on conditios for showing the renew disguise option.
-- Also add a check for male disguise aura.
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (10857,10858) AND `SourceEntry`=1;
INSERT INTO `conditions`(`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(15,10858,1,0,11,70973,0,0,0,'',NULL),
(15,10858,1,0,11,70974,0,0,0,'',NULL),
(15,10858,1,0,9,20439,0,0,0,'',NULL),
(15,10857,1,0,11,70971,0,0,0,'',NULL),
(15,10857,1,0,11,70972,0,0,0,'',NULL),
(15,10857,1,0,9,24451,0,0,0,'',NULL);
@@ -0,0 +1,12 @@
-- Condition update to flags
DELETE FROM `conditions` WHERE `ConditionTypeOrReference`=5;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(19,0,13846,0,5,1106,127,0,0,'','Quest Contributin'' To The Cause - Requires Argent Crusade hated thru revered'),
(20,0,13846,0,5,1106,127,0,0,'','Quest Contributin'' To The Cause - Requires Argent Crusade hated thru revered'),
(14,21258,7594,0,5,270,120,0,0,'','Only show text_id 7594 if player is neutral thru revered with Zandalar Tribe (270)'),
(14,21258,7595,0,5,270,128,0,0,'','Only show text_id 7595 if player is exalted with Zandalar Tribe (270)'),
(15,21258,0,0,5,270,128,0,0,'','Only show gossip option if player is exalted with Zandalar Tribe (270)'),
(15,21259,0,0,5,270,128,0,0,'','Only show gossip option if player is exalted with Zandalar Tribe (270)'),
(15,21260,0,0,5,270,128,0,0,'','Only show gossip option if player is exalted with Zandalar Tribe (270)'),
(1,23342,32726,0,5,1015,240,0,0,'','Murkblood Escape Plans - when Netherwing friendly thru exalted'),
(1,23286,32726,0,5,1015,240,0,0,'','Murkblood Escape Plans - when Netherwing friendly thru exalted');
@@ -0,0 +1,17 @@
-- Non sword wielders quests
UPDATE `quest_template` SET `RequiredClasses`=`RequiredClasses`
|16 -- Priest
|64 -- Shaman
|1024 -- Druid
WHERE `Id` IN (24795,24798,24798);
-- Sword wielders quests
UPDATE `quest_template` SET `RequiredClasses`=`RequiredClasses`
|1 -- Warrior
|2 -- Paladin
|4 -- Hunter
|8 -- Rouge
|32 -- Death Kinght
|128 -- Mage
|256 -- Warlock
WHERE `Id` IN (24796,24800,24801);
@@ -0,0 +1,25 @@
-- [Q] Mounting Hodir's Helm
-- Hodir's Helm KC Bunny SAI
SET @ENTRY := 30210;
SET @SPELL_READ_PRONOUNCEMENT := 56278;
UPDATE `creature_template` SET `AIName`='SmartAI' 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,8,0,100,0,@SPELL_READ_PRONOUNCEMENT,0,0,0,33,@ENTRY,0,0,0,0,0,1,0,0,0,0,0,0,0,"Hodir's Helm KC Bunny - On Spellhit - Quest Credit"),
(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Hodir's Helm KC Bunny - On Spellhit - Say Line 0"),
(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,50,192080,30000,0,0,0,0,8,0,0,0,7390.143066,-2725.382080,874.256104,2.973291,"Hodir's Helm KC Bunny - On Spellhit - Summon Hodir's Helm");
-- Text
DELETE FROM `creature_text` WHERE `entry`=@ENTRY;
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
(@ENTRY,0,0,"Sons of Hodir! I humbly present to you... The Helm of Hodir!",42,0,100,0,0,0,"Hodir's Helm KC Bunny");
-- Update from sniff
UPDATE `gameobject_template` SET `flags`=`flags`|36 WHERE `entry`=192080;
-- Conditions for Read Pronouncement
DELETE FROM `conditions` WHERE `SourceEntry`=@SPELL_READ_PRONOUNCEMENT AND `ConditionValue2`=@ENTRY;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`Comment`) VALUES
(13,0,@SPELL_READ_PRONOUNCEMENT,18,1,@ENTRY,"Read Pronouncement targets Hodir's Helm KC Bunny");
-- Spawn a helm bunny
SET @GUID := 40266; -- gap
DELETE FROM `creature` WHERE `id`=@ENTRY;
INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES
(@GUID,@ENTRY,571,1,1,0,0,7390.14,-2725.38,874.256,2.90103,300,0,0,42,0,0,0,0,0);
@@ -0,0 +1 @@
UPDATE `quest_template` SET `SpecialFlags`=0 WHERE `id`=9545;
@@ -0,0 +1,19 @@
-- [Q] [A] The Escape
-- William Pestle SAI
SET @ENTRY := 253;
SET @QUEST := 114;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `id`=@QUEST;
DELETE FROM `quest_start_scripts` WHERE `id`=@QUEST;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY*100 AND `source_type`=9;
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,0,19,0,100,0,@QUEST,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"William Pestle - On Quest Accept - Run Script"),
(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"William Pestle - On Script - Say Line 0"),
(@ENTRY*100,9,1,0,0,0,100,0,5000,5000,0,0,1,1,0,0,0,0,0,7,0,0,0,0,0,0,0,"William Pestle - On Script - Say Line 1");
-- Text
DELETE FROM `db_script_string` WHERE `entry` IN (2000000080,2000000081);
DELETE FROM `creature_text` WHERE `entry`=@ENTRY;
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
(@ENTRY,0,0,"This shouldn't take long...",12,0,100,432,0,0,"William Pestle"),
(@ENTRY,1,0,"The invisibility liquer is ready for you, $N.",12,0,100,0,0,0,"William Pestle");
@@ -0,0 +1,14 @@
-- [Q] [A/H] This Is Going to Be Hard
-- Lotwil Veriatus SAI
SET @ENTRY := 2921;
SET @QUEST := 778;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `id`=@QUEST;
DELETE FROM `quest_start_scripts` WHERE `id`=@QUEST;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY*100 AND `source_type`=9;
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,0,19,0,100,0,@QUEST,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Lotwil Veriatus - On Quest Accept - Run Script"),
(@ENTRY*100,9,0,0,0,0,100,0,4000,4000,0,0,11,5001,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lotwil Veriatus - On Script - Cast Lotwil's Summoning"),
(@ENTRY*100,9,1,0,0,0,100,0,1000,1000,0,0,12,2919,1,240000,0,0,0,8,0,0,0,-6666.27,-2728.12,243.136,6.28,"Lotwil Veriatus - On Script - Summon Fam'retor Guardian"),
(@ENTRY*100,9,2,0,0,0,100,0,0,0,0,0,11,5002,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lotwil Veriatus - On Script - Cast Lotwil's Summon Complete");
@@ -0,0 +1,10 @@
-- [Q] [A] The Dormant Shade
-- Lillith's Dinner Table SAI
SET @ENTRY := 1557;
SET @QUEST := 410;
UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=@ENTRY;
UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `id`=@QUEST;
DELETE FROM `quest_end_scripts` WHERE `id`=@QUEST;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=1;
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,1,0,0,20,0,100,0,@QUEST,0,0,0,12,1946,1,180000,0,0,0,8,0,0,0,2468.28,15.26,23.89,0.37,"Lillith's Dinner Table - On Quest Complete - Summon Lillith Nefara");
@@ -0,0 +1,10 @@
-- [Q] [A/H] Ledger from Tanaris
-- Wooden Outhouse SAI
SET @ENTRY := 173265;
SET @QUEST := 4450;
UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=@ENTRY;
UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `id`=@QUEST;
DELETE FROM `quest_start_scripts` WHERE `id`=@QUEST;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=1;
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,1,0,0,19,0,100,0,@QUEST,0,0,0,70,0,0,0,0,0,0,14,47578,173266,0,0,0,0,0,"Wooden Outhouse - On Quest Accept - Respawn Goodsteel Ledger (GO)");
@@ -0,0 +1,20 @@
-- [Q] [A/H] Making Sense of It
-- J.D. Collie SAI
SET @ENTRY := 9117;
SET @QUEST := 4321;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `id`=@QUEST;
DELETE FROM `quest_start_scripts` WHERE `id`=@QUEST;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY*100 AND `source_type`=9;
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,0,19,0,100,0,@QUEST,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"J.D. Collie - On Quest Accept - Run Script"),
(@ENTRY*100,9,0,0,0,0,100,0,6000,6000,0,0,5,6,0,0,0,0,0,1,0,0,0,0,0,0,0,"J.D. Collie - On Script - Emote ONESHOT_QUESTION"),
(@ENTRY*100,9,1,0,0,0,100,0,4000,4000,0,0,5,22,0,0,0,0,0,1,0,0,0,0,0,0,0,"J.D. Collie - On Script - Emote ONESHOT_SHOUT"),
(@ENTRY*100,9,2,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"J.D. Collie - On Script - Say Line 0"),
(@ENTRY*100,9,3,0,0,0,100,0,10000,10000,0,0,15,@QUEST,0,0,0,0,7,0,0,0,0,0,0,0,0,"J.D. Collie - On Script - Quest Credit");
-- Text
DELETE FROM `db_script_string` WHERE `entry`=2000000030;
DELETE FROM `creature_text` WHERE `entry`=@ENTRY;
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
(@ENTRY,0,0,"This makes sense!",12,0,100,0,0,0,"J.D. Collie");
@@ -0,0 +1,94 @@
-- [QUEST] A Rough Ride (12536)
-- NPC entry 28298 (Captive Crocolisk)
SET @ENTRY := 28298;
SET @GOSSIP := 9674;
SET @TEXT_ID := 13120;
UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP,`npcflag`=npcflag|1,`VehicleId`=0 WHERE `entry`=@ENTRY;
DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP;
INSERT INTO `gossip_menu` (`entry`,`text_id`)
VALUES (@GOSSIP,@TEXT_ID);
-- Added condition so player can only select it once he has the quest
SET @GOSSIP_ENTRY := 9674;
SET @QUEST := 12536;
DELETE FROM `conditions` WHERE `SourceGroup`=@GOSSIP_ENTRY AND `SourceTypeOrReferenceId`=15;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(15,@GOSSIP_ENTRY,0,0,9,@QUEST,0,0,0,0, 'Only show gossip 9674 when quest 12536 is added');
-- Add missing gossip
SET @GOSSIP := 9674;
DELETE FROM `gossip_menu_option` WHERE `menu_id`=9674 AND `id`=0;
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
(@GOSSIP,0,0,"You look safe enough... let's do this.",1,1,0,0,0,0, '');
-- [SAI] On gossip select - mount and waypoint
SET @ENTRY := 28298;
SET @GOSSIP := 9674;
SET @SPELL := 51258;
SET @ENTRY_MOUNT := 28308;
SET @MODELID_MOUNT := 25107;
SET @QUEST := 12536;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (@ENTRY,@ENTRY_MOUNT);
UPDATE `creature_template` SET `VehicleId`=115 WHERE `entry`=@ENTRY_MOUNT;
UPDATE `creature_template` SET `InhabitType`=3 WHERE `entry`=@ENTRY_MOUNT;
UPDATE `creature_template` SET `unit_flags`=`unit_flags`|512|256 WHERE `entry`=@ENTRY_MOUNT;
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY,@ENTRY_MOUNT) AND `source_type`=0;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY_MOUNT*100 AND `source_type`=9;
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,0,62,0,100,0,@GOSSIP,0,0,0,11,@SPELL,0,0,0,0,0,7,0,0,0,0,0,0,0, 'On gossip select - cast spell 51258 - Captive Crocolisk'),
(@ENTRY_MOUNT,0,1,0,54,0,100,0,0,0,0,0,80,@ENTRY_MOUNT*100,0,2,0,0,0,1,0,0,0,0,0,0,0, 'On summon - run script - Captive Crocolisk'),
(@ENTRY_MOUNT*100,9,1,0,0,0,100,0,0,0,0,0,53,1,@ENTRY_MOUNT,0,@QUEST,0,1,1,0,0,0,0,0,0,0, 'Start wp - Captive Crocolisk'),
(@ENTRY_MOUNT,0,2,3,58,0,100,0,47,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'on wp end - despawn - Captive Crocolisk'),
(@ENTRY_MOUNT,0,3,0,61,0,100,0,@ENTRY_MOUNT,0,0,0,15,@QUEST,0,0,0,0,0,7,0,0,0,0,0,0,0, 'on despawn - call area explored of event happens');
-- Waypoints
DELETE FROM `waypoints` WHERE `entry`=@ENTRY_MOUNT;
INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES
(@ENTRY_MOUNT,1,5268.226,4425.439,-95.55899, 'Captive Crocolisk'),
(@ENTRY_MOUNT,2,5249.557,4405.892,-96.04365, 'Captive Crocolisk'),
(@ENTRY_MOUNT,3,5266.678,4365.464,-98.19455, 'Captive Crocolisk'),
(@ENTRY_MOUNT,4,5289.138,4366.553,-102.234, 'Captive Crocolisk'),
(@ENTRY_MOUNT,5,5330.018,4363.27,-121.0311, 'Captive Crocolisk'),
(@ENTRY_MOUNT,6,5349.229,4341.059,-134.0126, 'Captive Crocolisk'),
(@ENTRY_MOUNT,7,5268.226,4425.439,-95.55899, 'Captive Crocolisk'),
(@ENTRY_MOUNT,8,5249.557,4405.892,-96.04365, 'Captive Crocolisk'),
(@ENTRY_MOUNT,9,5266.678,4365.464,-98.19455, 'Captive Crocolisk'),
(@ENTRY_MOUNT,10,5289.138,4366.553,-102.234, 'Captive Crocolisk'),
(@ENTRY_MOUNT,11,5330.018,4363.27,-121.0311, 'Captive Crocolisk'),
(@ENTRY_MOUNT,12,5349.229,4341.059,-134.0126, 'Captive Crocolisk'),
(@ENTRY_MOUNT,13,5365.038,4333.716,-141.5817, 'Captive Crocolisk'),
(@ENTRY_MOUNT,14,5405.443,4307.841,-142.03, 'Captive Crocolisk'),
(@ENTRY_MOUNT,15,5434.999,4305.659,-136.4706, 'Captive Crocolisk'),
(@ENTRY_MOUNT,16,5464.708,4302.066,-133.1981, 'Captive Crocolisk'),
(@ENTRY_MOUNT,17,5490.555,4294.395,-127.5203, 'Captive Crocolisk'),
(@ENTRY_MOUNT,18,5503.808,4269.717,-110.3168, 'Captive Crocolisk'),
(@ENTRY_MOUNT,19,5518.324,4255.308,-103.0638, 'Captive Crocolisk'),
(@ENTRY_MOUNT,20,5540.53,4259.77,-102.3979, 'Captive Crocolisk'),
(@ENTRY_MOUNT,21,5564.194,4263.45,-102.7574, 'Captive Crocolisk'),
(@ENTRY_MOUNT,22,5585.45,4261.137,-99.54807, 'Captive Crocolisk'),
(@ENTRY_MOUNT,23,5609.614,4259.657,-98.87333, 'Captive Crocolisk'),
(@ENTRY_MOUNT,24,5633.434,4259.228,-98.53442, 'Captive Crocolisk'),
(@ENTRY_MOUNT,25,5681.639,4266.31,-99.26748, 'Captive Crocolisk'),
(@ENTRY_MOUNT,26,5708.126,4273.348,-102.9183, 'Captive Crocolisk'),
(@ENTRY_MOUNT,27,5748.732,4284.135,-112.0557, 'Captive Crocolisk'),
(@ENTRY_MOUNT,28,5839.82,4368.61,-112.0805, 'Captive Crocolisk'),
(@ENTRY_MOUNT,29,5865.922,4371.208,-105.5544, 'Captive Crocolisk'),
(@ENTRY_MOUNT,30,5897.276,4408.44,-95.25065, 'Captive Crocolisk'),
(@ENTRY_MOUNT,31,5925.311,4440.624,-94.77592, 'Captive Crocolisk'),
(@ENTRY_MOUNT,32,5953.005,4476.29,-94.3763, 'Captive Crocolisk'),
(@ENTRY_MOUNT,33,5964.229,4503.729,-92.81553, 'Captive Crocolisk'),
(@ENTRY_MOUNT,34,5960.583,4546.558,-95.65462, 'Captive Crocolisk'),
(@ENTRY_MOUNT,35,5965.167,4579.141,-97.39779, 'Captive Crocolisk'),
(@ENTRY_MOUNT,36,5969.295,4613.739,-98.05751, 'Captive Crocolisk'),
(@ENTRY_MOUNT,37,5975.809,4659.289,-99.27143, 'Captive Crocolisk'),
(@ENTRY_MOUNT,38,5992.961,4699.554,-99.30317, 'Captive Crocolisk'),
(@ENTRY_MOUNT,39,6015.139,4743.752,-97.52377, 'Captive Crocolisk'),
(@ENTRY_MOUNT,40,6035.183,4788.787,-94.66938, 'Captive Crocolisk'),
(@ENTRY_MOUNT,41,6064.951,4827.502,-94.54885, 'Captive Crocolisk'),
(@ENTRY_MOUNT,42,6065.57,4870.553,-94.47726, 'Captive Crocolisk'),
(@ENTRY_MOUNT,43,6096.612,4885.741,-94.44479, 'Captive Crocolisk'),
(@ENTRY_MOUNT,44,6120.387,4902.048,-95.06882, 'Captive Crocolisk'),
(@ENTRY_MOUNT,45,6139.616,4913.349,-94.8635, 'Captive Crocolisk'),
(@ENTRY_MOUNT,46,6139.616,4913.349,-94.93861, 'Captive Crocolisk'),
(@ENTRY_MOUNT,47,6139.616,4913.349,-94.93861, 'Captive Crocolisk');
-- Spawn Zepik
SET @GUID := 40267;
DELETE FROM `creature` WHERE `id`=28216;
INSERT INTO `creature` VALUES
(@GUID,28216,571,1,1,0,0,6147.37,4917.29,-94.094,3.42155,300,0,0,42,0,0,0,0,0);
@@ -0,0 +1,8 @@
-- Spawns from sniff
SET @GUID := 40279; -- set value
DELETE FROM `creature` WHERE `id`=27791;
INSERT IGNORE INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`MovementType`) VALUES
(@GUID+0,27791,571,1,1,0,0,3653.64233,-1204.21200,102.420319,4.04458666,120,0,0),
(@GUID+1,27791,571,1,1,0,0,3673.77515,-1213.68188,102.420319,4.08126450,120,0,0),
(@GUID+2,27791,571,1,1,0,0,3674.53735,-1175.28369,102.420288,1.78801400,120,0,0),
(@GUID+3,27791,571,1,1,0,0,3684.37158,-1180.27942,102.420288,1.22173047,120,0,0);
@@ -0,0 +1,11 @@
-- 7th Legion Rifleman SAI (replaces EAI)
SET @ENTRY := 27791; -- NPC entry
SET @SPELL1 := 62312; -- Cast Net
SET @SPELL2 := 50092; -- Cast Shoot
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
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,0,4,0,100,0,0,0,0,0,11,@SPELL1,0,0,0,0,0,2,0,0,0,0,0,0,0,"7th Legion Rifleman - On Aggro - Cast Net"),
(@ENTRY,0,1,0,0,0,100,0,500,3500,5000,6000,11,@SPELL2,0,0,0,0,0,2,0,0,0,0,0,0,0,"7th Legion Rifleman - In Combat - Cast Shoot"),
(@ENTRY,0,2,0,2,0,100,1,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"7th Legion Rifleman - At 15% HP - Flee");
@@ -0,0 +1,6 @@
-- Remove old one that still required reputation even after you bought it
DELETE FROM `npc_vendor` WHERE `entry`=32538 and`item`=50367 and`ExtendedCost`=0;
-- Commit for new one
DELETE FROM `npc_vendor` WHERE `entry`=32538 and`item`=44149 and`ExtendedCost`=0;
INSERT INTO `npc_vendor` (`entry`,`slot`,`item`,`maxcount`,`incrtime`,`ExtendedCost`) VALUES (32538,0,44149,0,0,0);
@@ -0,0 +1,5 @@
DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (1237,1240,1241);
INSERT INTO `achievement_criteria_data` (`criteria_id`, `type`, `value1`, `value2`, `ScriptName`) VALUES
(1237, 0, 0, 0, ''), -- Achievement: Let's Get This Done
(1240, 0, 0, 0, ''), -- Achievement: Flurry
(1241, 0, 0, 0, ''); -- Achievement: The Alterac Blitz
@@ -0,0 +1 @@
UPDATE `command` SET `name`='reload waypoint_data',`help`='Syntax: .reload waypoint_data will reload waypoint_data table.' WHERE `name`='reload wp_data';
@@ -0,0 +1 @@
UPDATE `conditions` SET `SourceGroup`=23324 WHERE `SourceTypeOrReferenceId`=1 AND `SourceGroup`=23342;
+1 -1
View File
@@ -46,7 +46,7 @@ SmartAI::SmartAI(Creature* c) : CreatureAI(c)
// spawn in run mode
me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
mRun = true;
mRun = false;
me->GetPosition(&mLastOOCPos);
@@ -282,6 +282,7 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e)
case SMART_TARGET_HOSTILE_RANDOM:
case SMART_TARGET_HOSTILE_RANDOM_NOT_TOP:
case SMART_TARGET_ACTION_INVOKER:
case SMART_TARGET_INVOKER_PARTY:
case SMART_TARGET_POSITION:
case SMART_TARGET_NONE:
case SMART_TARGET_ACTION_INVOKER_VEHICLE:
@@ -202,6 +202,9 @@ void BattlegroundAB::StartingEventOpenDoors()
}
DoorOpen(BG_AB_OBJECT_GATE_A);
DoorOpen(BG_AB_OBJECT_GATE_H);
// Achievement: Let's Get This Done
StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, AB_EVENT_START_BATTLE);
}
void BattlegroundAB::AddPlayer(Player* player)
@@ -181,6 +181,8 @@ enum BG_AB_Objectives
#define BG_AB_NotABBGWeekendReputationTicks 200
#define BG_AB_ABBGWeekendReputationTicks 150
#define AB_EVENT_START_BATTLE 9158 // Achievement: Let's Get This Done
// x, y, z, o
const float BG_AB_NodePositions[BG_AB_DYNAMIC_NODES_COUNT][4] = {
{1166.785f, 1200.132f, -56.70859f, 0.9075713f}, // stables
@@ -420,6 +420,9 @@ void BattlegroundAV::StartingEventOpenDoors()
DoorOpen(BG_AV_OBJECT_DOOR_H);
DoorOpen(BG_AV_OBJECT_DOOR_A);
// Achievement: The Alterac Blitz
StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, AV_EVENT_START_BATTLE);
}
void BattlegroundAV::AddPlayer(Player* player)
@@ -50,6 +50,8 @@ class Battleground;
#define BG_AV_KILL_SURVIVING_CAPTAIN 2
#define BG_AV_REP_SURVIVING_CAPTAIN 125
#define AV_EVENT_START_BATTLE 9166 // Achievement: The Alterac Blitz
enum BG_AV_Sounds
{ //TODO: get out if there comes a sound when neutral team captures mine
@@ -120,6 +120,9 @@ void BattlegroundEY::StartingEventOpenDoors()
uint8 buff = urand(0, 2);
SpawnBGObject(BG_EY_OBJECT_SPEEDBUFF_FEL_REAVER + buff + i * 3, RESPAWN_IMMEDIATELY);
}
// Achievement: Flurry
StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, EY_EVENT_START_BATTLE);
}
void BattlegroundEY::AddPoints(uint32 Team, uint32 Points)
@@ -220,6 +220,8 @@ enum EYBattlegroundObjectTypes
#define BG_EY_NotEYWeekendHonorTicks 330
#define BG_EY_EYWeekendHonorTicks 200
#define EY_EVENT_START_BATTLE 13180 // Achievement: Flurry
enum BG_EY_Score
{
BG_EY_WARNING_NEAR_VICTORY_SCORE = 1400,
+1 -1
View File
@@ -63,7 +63,7 @@ bool Condition::Meets(Player* player, Unit* invoker)
case CONDITION_REPUTATION_RANK:
{
if (FactionEntry const* faction = sFactionStore.LookupEntry(mConditionValue1))
condMeets = uint32(player->GetReputationMgr().GetRank(faction)) == mConditionValue2;
condMeets = (mConditionValue2 & (1 << player->GetReputationMgr().GetRank(faction)));
break;
}
case CONDITION_ACHIEVEMENT:
+1 -1
View File
@@ -483,7 +483,7 @@ void LFGMgr::InitializeLockedDungeons(Player* player)
void LFGMgr::Join(Player* player, uint8 roles, const LfgDungeonSet& selectedDungeons, const std::string& comment)
{
if (!player || !player->GetSession() || selectedDungeons.empty())
return;
return;
Group* grp = player->GetGroup();
uint64 guid = player->GetGUID();
+21 -4
View File
@@ -296,15 +296,24 @@ Item* TradeData::GetItem(TradeSlots slot) const
return m_items[slot] ? m_player->GetItemByGuid(m_items[slot]) : NULL;
}
bool TradeData::HasItem(uint64 item_guid) const
bool TradeData::HasItem(uint64 itemGuid) const
{
for (uint8 i = 0; i < TRADE_SLOT_COUNT; ++i)
if (m_items[i] == item_guid)
if (m_items[i] == itemGuid)
return true;
return false;
}
TradeSlots const TradeData::GetTradeSlotForItem(uint64 itemGuid)
{
for (uint8 i = 0; i < TRADE_SLOT_COUNT; ++i)
if (m_items[i] == itemGuid)
return TradeSlots(i);
return TRADE_SLOT_INVALID;
}
Item* TradeData::GetSpellCastItem() const
{
return m_spellCastItem ? m_player->GetItemByGuid(m_spellCastItem) : NULL;
@@ -12805,6 +12814,14 @@ void Player::SplitItem(uint16 src, uint16 dst, uint32 count)
return;
}
//! If trading
if (TradeData* tradeData = GetTradeData())
{
//! If current item is in trade window (only possible with packet spoofing - silent return)
if (tradeData->GetTradeSlotForItem(pSrcItem->GetGUID()) != TRADE_SLOT_INVALID)
return;
}
sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: SplitItem bag = %u, slot = %u, item = %u, count = %u", dstbag, dstslot, pSrcItem->GetEntry(), count);
Item* pNewItem = pSrcItem->CloneItem(count, this);
if (!pNewItem)
@@ -12833,7 +12850,7 @@ void Player::SplitItem(uint16 src, uint16 dst, uint32 count)
pSrcItem->SetState(ITEM_CHANGED, this);
StoreItem(dest, pNewItem, true);
}
else if (IsBankPos (dst))
else if (IsBankPos(dst))
{
// change item amount before check (for unique max count check)
pSrcItem->SetCount(pSrcItem->GetCount() - count);
@@ -12853,7 +12870,7 @@ void Player::SplitItem(uint16 src, uint16 dst, uint32 count)
pSrcItem->SetState(ITEM_CHANGED, this);
BankItem(dest, pNewItem, true);
}
else if (IsEquipmentPos (dst))
else if (IsEquipmentPos(dst))
{
// change item amount before check (for unique max count check), provide space for splitted items
pSrcItem->SetCount(pSrcItem->GetCount() - count);
+4 -2
View File
@@ -686,7 +686,8 @@ enum TradeSlots
{
TRADE_SLOT_COUNT = 7,
TRADE_SLOT_TRADED_COUNT = 6,
TRADE_SLOT_NONTRADED = 6
TRADE_SLOT_NONTRADED = 6,
TRADE_SLOT_INVALID = -1,
};
enum TransferAbortReason
@@ -1001,7 +1002,8 @@ class TradeData
TradeData* GetTraderData() const;
Item* GetItem(TradeSlots slot) const;
bool HasItem(uint64 item_guid) const;
bool HasItem(uint64 itemGuid) const;
TradeSlots const GetTradeSlotForItem(uint64 itemGuid);
void SetItem(TradeSlots slot, Item* item);
uint32 GetSpell() const { return m_spell; }
+6 -2
View File
@@ -2114,12 +2114,12 @@ void Unit::SendMeleeAttackStart(Unit* victim)
void Unit::SendMeleeAttackStop(Unit* victim)
{
WorldPacket data(SMSG_ATTACKSTOP, (8+8+4)); // we guess size
WorldPacket data(SMSG_ATTACKSTOP, (8+8+4));
data.append(GetPackGUID());
data.append(victim ? victim->GetPackGUID() : 0); // can be 0x00...
data << uint32(0); // can be 0x1
SendMessageToSet(&data, true);
sLog->outStaticDebug("WORLD: Sent SMSG_ATTACKSTART");
sLog->outStaticDebug("WORLD: Sent SMSG_ATTACKSTOP");
if (victim)
sLog->outDetail("%s %u stopped attacking %s %u", (GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), GetGUIDLow(), (victim->GetTypeId() == TYPEID_PLAYER ? "player" : "creature"), victim->GetGUIDLow());
@@ -7068,6 +7068,8 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
return false;
basepoints0 = CalculatePctN(int32(damage), triggerAmount);
triggered_spell_id = 58879;
// Cast on spirit wolf
CastCustomSpell(this, triggered_spell_id, &basepoints0, NULL, NULL, true, NULL, triggeredByAura);
break;
}
// Shaman T8 Elemental 4P Bonus
@@ -15847,6 +15849,7 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* au
case CHARM_TYPE_VEHICLE:
SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED);
charmer->ToPlayer()->SetClientControl(this, 1);
charmer->ToPlayer()->SetMover(this);
charmer->ToPlayer()->SetViewpoint(this, true);
charmer->ToPlayer()->VehicleSpellInitialize();
break;
@@ -15855,6 +15858,7 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* au
SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED);
charmer->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);
charmer->ToPlayer()->SetClientControl(this, 1);
charmer->ToPlayer()->SetMover(this);
charmer->ToPlayer()->SetViewpoint(this, true);
charmer->ToPlayer()->PossessSpellInitialize();
break;
@@ -359,7 +359,6 @@ bool Vehicle::AddPassenger(Unit* unit, int8 seatId)
{
if (!_me->SetCharmedBy(unit, CHARM_TYPE_VEHICLE))
ASSERT(false);
unit->ToPlayer()->SetMover(this->GetBase());
}
if (_me->IsInWorld())
@@ -411,10 +410,7 @@ void Vehicle::RemovePassenger(Unit* unit)
unit->ClearUnitState(UNIT_STAT_ONVEHICLE);
if (_me->GetTypeId() == TYPEID_UNIT && unit->GetTypeId() == TYPEID_PLAYER && seat->first == 0 && seat->second.SeatInfo->m_flags & VEHICLE_SEAT_FLAG_CAN_CONTROL)
{
_me->RemoveCharmedBy(unit);
unit->ToPlayer()->SetMover(unit->ToPlayer());
}
if (_me->IsInWorld())
{
+3 -1
View File
@@ -203,7 +203,9 @@ void Group::LoadMemberFromDB(uint32 guidLow, uint8 memberFlags, uint8 subgroup,
// skip non-existed member
if (!sObjectMgr->GetPlayerNameByGUID(member.guid, member.name))
{
CharacterDatabase.PQuery("DELETE FROM group_member WHERE memberGuid=%u", guidLow);
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GROUP_MEMBER);
stmt->setUInt32(0, guidLow);
CharacterDatabase.Execute(stmt);
return;
}
+6 -3
View File
@@ -307,7 +307,7 @@ void MotionMaster::MoveLand(uint32 id, Position const& pos, float speed)
init.SetVelocity(speed);
init.SetAnimation(Movement::ToGround);
init.Launch();
Mutate(new EffectMovementGenerator(id), MOTION_SLOT_CONTROLLED);
Mutate(new EffectMovementGenerator(id), MOTION_SLOT_ACTIVE);
}
void MotionMaster::MoveTakeoff(uint32 id, Position const& pos, float speed)
@@ -322,7 +322,7 @@ void MotionMaster::MoveTakeoff(uint32 id, Position const& pos, float speed)
init.SetVelocity(speed);
init.SetAnimation(Movement::ToFly);
init.Launch();
Mutate(new EffectMovementGenerator(id), MOTION_SLOT_CONTROLLED);
Mutate(new EffectMovementGenerator(id), MOTION_SLOT_ACTIVE);
}
void MotionMaster::MoveKnockbackFrom(float srcX, float srcY, float speedXY, float speedZ)
@@ -365,7 +365,10 @@ void MotionMaster::MoveJump(float x, float y, float z, float speedXY, float spee
init.SetParabolic(max_height,0);
init.SetVelocity(speedXY);
init.Launch();
Mutate(new EffectMovementGenerator(id), MOTION_SLOT_CONTROLLED);
if (i_owner->GetTypeId() == TYPEID_PLAYER)
Mutate(new EffectMovementGenerator(id), MOTION_SLOT_CONTROLLED);
else
Mutate(new EffectMovementGenerator(id), MOTION_SLOT_ACTIVE);
}
void MotionMaster::MoveFall(uint32 id/*=0*/)
@@ -211,6 +211,19 @@ void ChaseMovementGenerator<T>::Reset(T &owner)
Initialize(owner);
}
template<class T>
void ChaseMovementGenerator<T>::MovementInform(T & /*unit*/)
{
}
template<>
void ChaseMovementGenerator<Creature>::MovementInform(Creature &unit)
{
// Pass back the GUIDLow of the target. If it is pet's owner then PetAI will handle
if (unit.AI())
unit.AI()->MovementInform(CHASE_MOTION_TYPE, i_target.getTarget()->GetGUIDLow());
}
//-----------------------------------------------//
template<>
bool FollowMovementGenerator<Creature>::EnableWalking() const
@@ -300,6 +313,7 @@ template void ChaseMovementGenerator<Player>::Finalize(Player &);
template void ChaseMovementGenerator<Creature>::Finalize(Creature &);
template void ChaseMovementGenerator<Player>::Reset(Player &);
template void ChaseMovementGenerator<Creature>::Reset(Creature &);
template void ChaseMovementGenerator<Player>::MovementInform(Player &unit);
template void FollowMovementGenerator<Player>::Finalize(Player &);
template void FollowMovementGenerator<Creature>::Finalize(Creature &);
@@ -76,7 +76,7 @@ class ChaseMovementGenerator : public TargetedMovementGeneratorMedium<T, ChaseMo
void Initialize(T &);
void Finalize(T &);
void Reset(T &);
void MovementInform(T &){}
void MovementInform(T &);
static void _clearUnitStateMove(T &u) { u.ClearUnitState(UNIT_STAT_CHASE_MOVE); }
static void _addUnitStateMove(T &u) { u.AddUnitState(UNIT_STAT_CHASE_MOVE); }
@@ -84,6 +84,7 @@ void WaypointMovementGenerator<Creature>::OnArrived(Creature& creature)
// Inform script
MovementInform(creature);
creature.UpdateWaypointID(i_currentNode);
Stop(i_path->at(i_currentNode)->delay);
}
@@ -94,13 +95,11 @@ bool WaypointMovementGenerator<Creature>::StartMove(Creature &creature)
if (Stopped())
return true;
const WaypointData *node = i_path->at(i_currentNode);
if (m_isArrivalDone)
{
if ((i_currentNode == i_path->size() - 1) && !repeating) // If that's our last waypoint
{
creature.SetHomePosition(node->x, node->y, node->z, creature.GetOrientation());
creature.SetHomePosition(i_path->at(i_currentNode)->x, i_path->at(i_currentNode)->y, i_path->at(i_currentNode)->z, creature.GetOrientation());
creature.GetMotionMaster()->Initialize();
return false;
}
@@ -108,6 +107,8 @@ bool WaypointMovementGenerator<Creature>::StartMove(Creature &creature)
i_currentNode = (i_currentNode+1) % i_path->size();
}
const WaypointData *node = i_path->at(i_currentNode);
m_isArrivalDone = false;
creature.AddUnitState(UNIT_STAT_ROAMING_MOVE);
@@ -101,14 +101,14 @@ void WorldSession::SendAuctionBidderNotification(uint32 location, uint32 auction
//this void causes on client to display: "Your auction sold"
void WorldSession::SendAuctionOwnerNotification(AuctionEntry* auction)
{
WorldPacket data(SMSG_AUCTION_OWNER_NOTIFICATION, (7*4));
data << auction->Id;
data << auction->bid;
data << (uint32) 0; //unk
data << (uint32) 0; //unk
data << (uint32) 0; //unk
data << auction->item_template;
data << (uint32) 0; //unk
WorldPacket data(SMSG_AUCTION_OWNER_NOTIFICATION, (8*4));
data << uint32(auction->Id);
data << uint32(auction->bid);
data << uint32(0); //unk
data << uint64(0); //unk (bidder guid?)
data << uint32(auction->item_template);
data << uint32(0); //unk
data << float(0); //unk (time?)
SendPacket(&data);
}
@@ -3096,17 +3096,9 @@ void AuraEffect::HandleModPossess(AuraApplication const* aurApp, uint8 mode, boo
}
if (apply)
{
if (target->SetCharmedBy(caster, CHARM_TYPE_POSSESS, aurApp))
caster->ToPlayer()->SetMover(target);
}
target->SetCharmedBy(caster, CHARM_TYPE_POSSESS, aurApp);
else
{
target->RemoveCharmedBy(caster);
caster->ToPlayer()->SetMover(caster);
if (target->GetTypeId() == TYPEID_PLAYER)
target->ToPlayer()->SetMover(target);
}
}
// only one spell has this aura
@@ -3134,13 +3126,11 @@ void AuraEffect::HandleModPossessPet(AuraApplication const* aurApp, uint8 mode,
if (caster->ToPlayer()->GetPet() != pet)
return;
if (pet->SetCharmedBy(caster, CHARM_TYPE_POSSESS, aurApp))
caster->ToPlayer()->SetMover(pet);
pet->SetCharmedBy(caster, CHARM_TYPE_POSSESS, aurApp);
}
else
{
pet->RemoveCharmedBy(caster);
caster->ToPlayer()->SetMover(caster);
if (!pet->IsWithinDistInMap(caster, pet->GetMap()->GetVisibilityRange()))
pet->Remove(PET_SAVE_NOT_IN_SLOT, true);
+12 -2
View File
@@ -1963,6 +1963,13 @@ bool Aura::IsProcTriggeredOnEvent(AuraApplication* aurApp, ProcEventInfo& eventI
if (!sSpellMgr->CanSpellTriggerProcOnEvent(*procEntry, eventInfo))
return false;
// TODO:
// - do checks using conditions table for eventInfo->GetActor() and eventInfo->GetActionTarget()
// - add DoCheckProc() AuraScript hook
// to allow additional requirements for procs
// this is needed because this is the last moment in which you can prevent aura charge drop on proc
// and possibly a way to prevent default checks (if there're going to be any)
// Check if current equipment meets aura requirements
// do that only for passive spells
// TODO: this needs to be unified for all kinds of auras
@@ -2023,11 +2030,14 @@ float Aura::CalcProcChance(SpellProcEntry const& procEntry, ProcEventInfo& event
void Aura::TriggerProcOnEvent(AuraApplication* aurApp, ProcEventInfo& eventInfo)
{
// TODO: script hooks here (allowing prevention of selected effects)
// TODO: OnProc hook here
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
if (aurApp->HasEffect(i))
// TODO: OnEffectProc hook here (allowing prevention of selected effects)
GetEffect(i)->HandleProc(aurApp, eventInfo);
// TODO: script hooks here
// TODO: AfterEffectProc hook here
// TODO: AfterProc hook here
// Remove aura if we've used last charge to proc
if (IsUsingCharges() && !GetCharges())
@@ -186,6 +186,9 @@ class Aura
bool CanStackWith(Aura const* existingAura) const;
// Proc system
// this subsystem is not yet in use - the core of it is functional, but still some research has to be done
// and some dependant problems fixed before it can replace old proc system (for example cooldown handling)
// currently proc system functionality is implemented in Unit::ProcDamageAndSpell
bool IsProcOnCooldown() const;
void AddProcCooldown(uint32 msec);
bool IsUsingCharges() const { return m_isUsingCharges; }
+2 -2
View File
@@ -130,7 +130,7 @@ public:
{
uint32 tguid = chr->GetTransport()->AddNPCPassenger(0, id, chr->GetTransOffsetX(), chr->GetTransOffsetY(), chr->GetTransOffsetZ(), chr->GetTransOffsetO());
if (tguid > 0)
WorldDatabase.PQuery("INSERT INTO creature_transport (guid, npc_entry, transport_entry, TransOffsetX, TransOffsetY, TransOffsetZ, TransOffsetO) values (%u, %u, %f, %f, %f, %f, %u)", tguid, id, chr->GetTransport()->GetEntry(), chr->GetTransOffsetX(), chr->GetTransOffsetY(), chr->GetTransOffsetZ(), chr->GetTransOffsetO());
WorldDatabase.PExecute("INSERT INTO creature_transport (guid, npc_entry, transport_entry, TransOffsetX, TransOffsetY, TransOffsetZ, TransOffsetO) values (%u, %u, %f, %f, %f, %f, %u)", tguid, id, chr->GetTransport()->GetEntry(), chr->GetTransOffsetX(), chr->GetTransOffsetY(), chr->GetTransOffsetZ(), chr->GetTransOffsetO());
return true;
}
@@ -679,7 +679,7 @@ public:
if (target->GetTransport())
if (target->GetGUIDTransport())
WorldDatabase.PQuery("UPDATE creature_transport SET emote=%u WHERE transport_entry=%u AND guid=%u", emote, target->GetTransport()->GetEntry(), target->GetGUIDTransport());
WorldDatabase.PExecute("UPDATE creature_transport SET emote=%u WHERE transport_entry=%u AND guid=%u", emote, target->GetTransport()->GetEntry(), target->GetGUIDTransport());
target->SetUInt32Value(UNIT_NPC_EMOTESTATE, emote);
+107 -104
View File
@@ -404,113 +404,116 @@ public:
if (!*args)
return false;
uint32 entry = (uint32) atoi((char*)args);
QueryResult result = WorldDatabase.PQuery("SELECT difficulty_entry_1, difficulty_entry_2, difficulty_entry_3, KillCredit1, KillCredit2, modelid1, modelid2, modelid3, modelid4, name, subname, IconName, gossip_menu_id, minlevel, maxlevel, exp, faction_A, faction_H, npcflag, speed_walk, speed_run, scale, rank, mindmg, maxdmg, dmgschool, attackpower, dmg_multiplier, baseattacktime, rangeattacktime, unit_class, unit_flags, dynamicflags, family, trainer_type, trainer_spell, trainer_class, trainer_race, minrangedmg, maxrangedmg, rangedattackpower, type, type_flags, lootid, pickpocketloot, skinloot, resistance1, resistance2, resistance3, resistance4, resistance5, resistance6, spell1, spell2, spell3, spell4, spell5, spell6, spell7, spell8, PetSpellDataId, VehicleId, mingold, maxgold, AIName, MovementType, InhabitType, Health_mod, Mana_mod, Armor_mod, RacialLeader, questItem1, questItem2, questItem3, questItem4, questItem5, questItem6, movementId, RegenHealth, equipment_id, mechanic_immune_mask, flags_extra, ScriptName FROM creature_template WHERE entry = %u", entry);
if (!result)
Tokens entries(std::string(args), ' ');
for (Tokens::const_iterator itr = entries.begin(); itr != entries.end(); ++itr)
{
handler->PSendSysMessage(LANG_COMMAND_CREATURETEMPLATE_NOTFOUND, entry);
handler->SetSentErrorMessage(true);
return false;
uint32 entry = uint32(atoi(*itr));
QueryResult result = WorldDatabase.PQuery("SELECT difficulty_entry_1, difficulty_entry_2, difficulty_entry_3, KillCredit1, KillCredit2, modelid1, modelid2, modelid3, modelid4, name, subname, IconName, gossip_menu_id, minlevel, maxlevel, exp, faction_A, faction_H, npcflag, speed_walk, speed_run, scale, rank, mindmg, maxdmg, dmgschool, attackpower, dmg_multiplier, baseattacktime, rangeattacktime, unit_class, unit_flags, dynamicflags, family, trainer_type, trainer_spell, trainer_class, trainer_race, minrangedmg, maxrangedmg, rangedattackpower, type, type_flags, lootid, pickpocketloot, skinloot, resistance1, resistance2, resistance3, resistance4, resistance5, resistance6, spell1, spell2, spell3, spell4, spell5, spell6, spell7, spell8, PetSpellDataId, VehicleId, mingold, maxgold, AIName, MovementType, InhabitType, Health_mod, Mana_mod, Armor_mod, RacialLeader, questItem1, questItem2, questItem3, questItem4, questItem5, questItem6, movementId, RegenHealth, equipment_id, mechanic_immune_mask, flags_extra, ScriptName FROM creature_template WHERE entry = %u", entry);
if (!result)
{
handler->PSendSysMessage(LANG_COMMAND_CREATURETEMPLATE_NOTFOUND, entry);
continue;
}
CreatureTemplate const* cInfo = sObjectMgr->GetCreatureTemplate(entry);
if (!cInfo)
{
handler->PSendSysMessage(LANG_COMMAND_CREATURESTORAGE_NOTFOUND, entry);
continue;
}
sLog->outString("Reloading creature template entry %u", entry);
Field* fields = result->Fetch();
const_cast<CreatureTemplate*>(cInfo)->DifficultyEntry[0] = fields[0].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->DifficultyEntry[1] = fields[1].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->DifficultyEntry[2] = fields[2].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->KillCredit[0] = fields[3].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->KillCredit[1] = fields[4].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->Modelid1 = fields[5].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->Modelid2 = fields[6].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->Modelid3 = fields[7].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->Modelid4 = fields[8].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->Name = fields[9].GetString();
const_cast<CreatureTemplate*>(cInfo)->SubName = fields[10].GetString();
const_cast<CreatureTemplate*>(cInfo)->IconName = fields[11].GetString();
const_cast<CreatureTemplate*>(cInfo)->GossipMenuId = fields[12].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->minlevel = fields[13].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->maxlevel = fields[14].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->expansion = fields[15].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->faction_A = fields[16].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->faction_H = fields[17].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->npcflag = fields[18].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->speed_walk = fields[19].GetFloat();
const_cast<CreatureTemplate*>(cInfo)->speed_run = fields[20].GetFloat();
const_cast<CreatureTemplate*>(cInfo)->scale = fields[21].GetFloat();
const_cast<CreatureTemplate*>(cInfo)->rank = fields[22].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->mindmg = fields[23].GetFloat();
const_cast<CreatureTemplate*>(cInfo)->maxdmg = fields[24].GetFloat();
const_cast<CreatureTemplate*>(cInfo)->dmgschool = fields[25].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->attackpower = fields[26].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->dmg_multiplier = fields[27].GetFloat();
const_cast<CreatureTemplate*>(cInfo)->baseattacktime = fields[28].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->rangeattacktime = fields[29].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->unit_class = fields[30].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->unit_flags = fields[31].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->dynamicflags = fields[32].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->family = fields[33].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->trainer_type = fields[34].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->trainer_spell = fields[35].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->trainer_class = fields[36].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->trainer_race = fields[37].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->minrangedmg = fields[38].GetFloat();
const_cast<CreatureTemplate*>(cInfo)->maxrangedmg = fields[39].GetFloat();
const_cast<CreatureTemplate*>(cInfo)->rangedattackpower = fields[40].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->type = fields[41].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->type_flags = fields[42].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->lootid = fields[43].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->pickpocketLootId = fields[44].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->SkinLootId = fields[45].GetUInt32();
for (uint8 i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; ++i)
{
const_cast<CreatureTemplate*>(cInfo)->resistance[i] = fields[46 + i -1].GetUInt32();
}
const_cast<CreatureTemplate*>(cInfo)->spells[0] = fields[52].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->spells[1] = fields[53].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->spells[2] = fields[54].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->spells[3] = fields[55].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->spells[4] = fields[56].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->spells[5] = fields[57].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->spells[6] = fields[58].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->spells[7] = fields[59].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->PetSpellDataId = fields[60].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->VehicleId = fields[61].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->mingold = fields[62].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->maxgold = fields[63].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->AIName = fields[64].GetString();
const_cast<CreatureTemplate*>(cInfo)->MovementType = fields[65].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->InhabitType = fields[66].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->ModHealth = fields[67].GetFloat();
const_cast<CreatureTemplate*>(cInfo)->ModMana = fields[68].GetFloat();
const_cast<CreatureTemplate*>(cInfo)->ModArmor = fields[69].GetFloat();
const_cast<CreatureTemplate*>(cInfo)->RacialLeader = fields[70].GetBool();
const_cast<CreatureTemplate*>(cInfo)->questItems[0] = fields[71].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->questItems[1] = fields[72].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->questItems[2] = fields[73].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->questItems[3] = fields[74].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->questItems[4] = fields[75].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->questItems[5] = fields[76].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->movementId = fields[77].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->RegenHealth = fields[78].GetBool();
const_cast<CreatureTemplate*>(cInfo)->equipmentId = fields[79].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->MechanicImmuneMask = fields[80].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->flags_extra = fields[81].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->ScriptID = sObjectMgr->GetScriptId(fields[82].GetCString());
sObjectMgr->CheckCreatureTemplate(cInfo);
}
CreatureTemplate const* cInfo = sObjectMgr->GetCreatureTemplate(entry);
if (!cInfo)
{
handler->PSendSysMessage(LANG_COMMAND_CREATURESTORAGE_NOTFOUND, entry);
handler->SetSentErrorMessage(true);
return false;
}
sLog->outString("Reloading creature template entry %u", entry);
Field* fields = result->Fetch();
const_cast<CreatureTemplate*>(cInfo)->DifficultyEntry[0] = fields[0].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->DifficultyEntry[1] = fields[1].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->DifficultyEntry[2] = fields[2].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->KillCredit[0] = fields[3].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->KillCredit[1] = fields[4].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->Modelid1 = fields[5].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->Modelid2 = fields[6].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->Modelid3 = fields[7].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->Modelid4 = fields[8].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->Name = fields[9].GetString();
const_cast<CreatureTemplate*>(cInfo)->SubName = fields[10].GetString();
const_cast<CreatureTemplate*>(cInfo)->IconName = fields[11].GetString();
const_cast<CreatureTemplate*>(cInfo)->GossipMenuId = fields[12].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->minlevel = fields[13].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->maxlevel = fields[14].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->expansion = fields[15].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->faction_A = fields[16].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->faction_H = fields[17].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->npcflag = fields[18].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->speed_walk = fields[19].GetFloat();
const_cast<CreatureTemplate*>(cInfo)->speed_run = fields[20].GetFloat();
const_cast<CreatureTemplate*>(cInfo)->scale = fields[21].GetFloat();
const_cast<CreatureTemplate*>(cInfo)->rank = fields[22].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->mindmg = fields[23].GetFloat();
const_cast<CreatureTemplate*>(cInfo)->maxdmg = fields[24].GetFloat();
const_cast<CreatureTemplate*>(cInfo)->dmgschool = fields[25].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->attackpower = fields[26].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->dmg_multiplier = fields[27].GetFloat();
const_cast<CreatureTemplate*>(cInfo)->baseattacktime = fields[28].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->rangeattacktime = fields[29].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->unit_class = fields[30].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->unit_flags = fields[31].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->dynamicflags = fields[32].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->family = fields[33].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->trainer_type = fields[34].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->trainer_spell = fields[35].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->trainer_class = fields[36].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->trainer_race = fields[37].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->minrangedmg = fields[38].GetFloat();
const_cast<CreatureTemplate*>(cInfo)->maxrangedmg = fields[39].GetFloat();
const_cast<CreatureTemplate*>(cInfo)->rangedattackpower = fields[40].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->type = fields[41].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->type_flags = fields[42].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->lootid = fields[43].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->pickpocketLootId = fields[44].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->SkinLootId = fields[45].GetUInt32();
for (uint8 i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; ++i)
{
const_cast<CreatureTemplate*>(cInfo)->resistance[i] = fields[46 + i -1].GetUInt32();
}
const_cast<CreatureTemplate*>(cInfo)->spells[0] = fields[52].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->spells[1] = fields[53].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->spells[2] = fields[54].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->spells[3] = fields[55].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->spells[4] = fields[56].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->spells[5] = fields[57].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->spells[6] = fields[58].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->spells[7] = fields[59].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->PetSpellDataId = fields[60].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->VehicleId = fields[61].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->mingold = fields[62].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->maxgold = fields[63].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->AIName = fields[64].GetString();
const_cast<CreatureTemplate*>(cInfo)->MovementType = fields[65].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->InhabitType = fields[66].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->ModHealth = fields[67].GetFloat();
const_cast<CreatureTemplate*>(cInfo)->ModMana = fields[68].GetFloat();
const_cast<CreatureTemplate*>(cInfo)->ModArmor = fields[69].GetFloat();
const_cast<CreatureTemplate*>(cInfo)->RacialLeader = fields[70].GetBool();
const_cast<CreatureTemplate*>(cInfo)->questItems[0] = fields[71].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->questItems[1] = fields[72].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->questItems[2] = fields[73].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->questItems[3] = fields[74].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->questItems[4] = fields[75].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->questItems[5] = fields[76].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->movementId = fields[77].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->RegenHealth = fields[78].GetBool();
const_cast<CreatureTemplate*>(cInfo)->equipmentId = fields[79].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->MechanicImmuneMask = fields[80].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->flags_extra = fields[81].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->ScriptID = sObjectMgr->GetScriptId(fields[82].GetCString());
sObjectMgr->CheckCreatureTemplate(cInfo);
handler->SendGlobalGMSysMessage("Creature template reloaded.");
return true;
}
@@ -67,6 +67,7 @@ class boss_bronjahm : public CreatureScript
{
boss_bronjahmAI(Creature* creature) : BossAI(creature, DATA_BRONJAHM)
{
DoCast(me, SPELL_SOULSTORM_CHANNEL, true);
}
void InitializeAI()
@@ -82,14 +83,17 @@ class boss_bronjahm : public CreatureScript
events.Reset();
events.SetPhase(PHASE_1);
events.ScheduleEvent(EVENT_SHADOW_BOLT, 2000);
events.ScheduleEvent(EVENT_MAGIC_BANE, urand(8000, 15000));
events.ScheduleEvent(EVENT_MAGIC_BANE, urand(8000, 20000));
events.ScheduleEvent(EVENT_CORRUPT_SOUL, urand(25000, 35000), 0, PHASE_1);
me->CastSpell(me, SPELL_SOULSTORM_CHANNEL, true);
instance->SetBossState(DATA_BRONJAHM, NOT_STARTED);
}
void JustReachedHome()
{
DoCast(me, SPELL_SOULSTORM_CHANNEL, true);
}
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_AGGRO, me);
@@ -118,7 +122,7 @@ class boss_bronjahm : public CreatureScript
events.SetPhase(PHASE_2);
DoCast(me, SPELL_TELEPORT);
events.ScheduleEvent(EVENT_FEAR, urand(12000, 16000), 0, PHASE_2);
events.ScheduleEvent(EVENT_SOULSTORM, 700, 0, PHASE_2);
events.ScheduleEvent(EVENT_SOULSTORM, 100, 0, PHASE_2);
}
}
@@ -147,7 +151,7 @@ class boss_bronjahm : public CreatureScript
{
case EVENT_MAGIC_BANE:
DoCastVictim(SPELL_MAGIC_S_BANE);
events.ScheduleEvent(EVENT_MAGIC_BANE, urand(8000, 15000));
events.ScheduleEvent(EVENT_MAGIC_BANE, urand(8000, 20000));
break;
case EVENT_SHADOW_BOLT:
if (!me->IsWithinMeleeRange(me->getVictim()))
@@ -306,6 +306,7 @@ class boss_devourer_of_souls : public CreatureScript
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
me->SetOrientation(me->GetAngle(target));
me->SendMovementFlagUpdate();
DoCast(me, SPELL_WAILING_SOULS_BEAM);
}
@@ -332,6 +333,7 @@ class boss_devourer_of_souls : public CreatureScript
case EVENT_WAILING_SOULS_TICK:
beamAngle += beamAngleDiff;
me->SetOrientation(beamAngle);
me->SendMovementFlagUpdate();
me->StopMoving();
DoCast(me, SPELL_WAILING_SOULS);
@@ -18,7 +18,7 @@
/* ScriptData
SDName: Boss_Ingvar_The_Plunderer
SD%Complete: 95
SDComment: Some Problems with Annhylde Movement, Blizzlike Timers
SDComment: Some Problems with Annhylde Movement, Blizzlike Timers (just shadow axe summon needs a new timer)
SDCategory: Udgarde Keep
EndScriptData */
@@ -45,16 +45,32 @@ enum Creatures
MOB_INGVAR_UNDEAD = 23980,
};
enum Events
{
EVENT_CLEAVE = 1,
EVENT_SMASH,
EVENT_STAGGERING_ROAR,
EVENT_ENRAGE,
EVENT_DARK_SMASH,
EVENT_DREADFUL_ROAR,
EVENT_WOE_STRIKE,
EVENT_SHADOW_AXE
};
enum Phases
{
PHASE_HUMAN = 1,
PHASE_UNDEAD,
};
enum Spells
{
//Ingvar Spells human form
SPELL_CLEAVE = 42724,
SPELL_SMASH = 42669,
H_SPELL_SMASH = 59706,
SPELL_STAGGERING_ROAR = 42708,
H_SPELL_STAGGERING_ROAR = 59708,
SPELL_ENRAGE = 42705,
H_SPELL_ENRAGE = 59707,
SPELL_INGVAR_FEIGN_DEATH = 42795,
SPELL_SUMMON_BANSHEE = 42912,
@@ -63,9 +79,7 @@ enum Spells
//Ingvar Spells undead form
SPELL_DARK_SMASH = 42723,
SPELL_DREADFUL_ROAR = 42729,
H_SPELL_DREADFUL_ROAR = 59734,
SPELL_WOE_STRIKE = 42730,
H_SPELL_WOE_STRIKE = 59735,
ENTRY_THROW_TARGET = 23996,
SPELL_SHADOW_AXE_SUMMON = 42749
@@ -83,9 +97,9 @@ public:
struct boss_ingvar_the_plundererAI : public ScriptedAI
{
boss_ingvar_the_plundererAI(Creature* c) : ScriptedAI(c)
boss_ingvar_the_plundererAI(Creature* creature) : ScriptedAI(creature)
{
instance = c->GetInstanceScript();
instance = creature->GetInstanceScript();
}
InstanceScript* instance;
@@ -93,10 +107,6 @@ public:
bool bIsUndead;
bool bEventInProgress;
uint32 uiCleaveTimer;
uint32 uiSmashTimer;
uint32 uiEnrageTimer;
uint32 uiRoarTimer;
uint32 uiSpawnResTimer;
void Reset()
@@ -110,10 +120,18 @@ public:
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
me->SetStandState(UNIT_STAND_STATE_STAND);
uiCleaveTimer = 2000;
uiSmashTimer = 5000;
uiEnrageTimer = 10000;
uiRoarTimer = 15000;
events.Reset();
events.SetPhase(PHASE_HUMAN);
events.ScheduleEvent(EVENT_CLEAVE, urand(6,12)*IN_MILLISECONDS, 0, PHASE_HUMAN);
events.ScheduleEvent(EVENT_STAGGERING_ROAR, urand(18,21)*IN_MILLISECONDS, 0, PHASE_HUMAN);
events.ScheduleEvent(EVENT_ENRAGE, urand(7,14)*IN_MILLISECONDS, 0, PHASE_HUMAN);
events.ScheduleEvent(EVENT_SMASH, urand(12,17)*IN_MILLISECONDS, 0, PHASE_HUMAN);
events.ScheduleEvent(EVENT_DARK_SMASH, urand(14,22)*IN_MILLISECONDS, 0, PHASE_UNDEAD);
events.ScheduleEvent(EVENT_DREADFUL_ROAR, urand(18,21)*IN_MILLISECONDS, 0, PHASE_UNDEAD);
events.ScheduleEvent(EVENT_WOE_STRIKE, urand(10,14)*IN_MILLISECONDS, 0, PHASE_UNDEAD);
events.ScheduleEvent(EVENT_SHADOW_AXE, 30*IN_MILLISECONDS, 0, PHASE_UNDEAD);
uiSpawnResTimer = 3000;
@@ -138,6 +156,7 @@ public:
bEventInProgress = true;
bIsUndead = true;
events.SetPhase(PHASE_UNDEAD);
DoScriptText(YELL_DEAD_1, me);
}
@@ -208,70 +227,60 @@ public:
return;
}
if (uiCleaveTimer <= diff)
{
if (!me->HasUnitState(UNIT_STAT_CASTING))
{
if (bIsUndead)
DoCast(me->getVictim(), SPELL_WOE_STRIKE);
else
DoCast(me->getVictim(), SPELL_CLEAVE);
uiCleaveTimer = rand()%5000 + 2000;
}
} else uiCleaveTimer -= diff;
events.Update(diff);
if (uiSmashTimer <= diff)
{
if (!me->HasUnitState(UNIT_STAT_CASTING))
{
if (bIsUndead)
DoCast(me->getVictim(), SPELL_DARK_SMASH);
else
DoCast(me->getVictim(), SPELL_SMASH);
uiSmashTimer = 10000;
}
} else uiSmashTimer -= diff;
if (me->HasUnitState(UNIT_STAT_CASTING))
return;
if (!bIsUndead)
while (uint32 eventId = events.ExecuteEvent())
{
if (uiEnrageTimer <= diff)
switch (eventId)
{
DoCast(me, SPELL_ENRAGE);
uiEnrageTimer = 10000;
} else uiEnrageTimer -= diff;
} else // In Undead form used to summon weapon
{
if (uiEnrageTimer <= diff)
{
if (!me->HasUnitState(UNIT_STAT_CASTING))
{
// Spawn target for Axe
Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO, 1);
if (target)
// PHASE ONE
case EVENT_CLEAVE:
DoCastVictim(SPELL_CLEAVE);
events.ScheduleEvent(EVENT_CLEAVE, urand(6,12)*IN_MILLISECONDS, 0, PHASE_HUMAN);
break;
case EVENT_STAGGERING_ROAR:
DoCast(me, SPELL_STAGGERING_ROAR);
events.ScheduleEvent(EVENT_STAGGERING_ROAR, urand(18,21)*IN_MILLISECONDS, 0, PHASE_HUMAN);
break;
case EVENT_ENRAGE:
DoCast(me, SPELL_ENRAGE);
events.ScheduleEvent(EVENT_ENRAGE, urand(7,14)*IN_MILLISECONDS, 0, PHASE_HUMAN);
break;
case EVENT_SMASH:
DoCastVictim(SPELL_SMASH);
events.ScheduleEvent(EVENT_SMASH, urand(12,17)*IN_MILLISECONDS, 0, PHASE_HUMAN);
break;
// PHASE TWO
case EVENT_DARK_SMASH:
DoCastVictim(SPELL_DARK_SMASH);
events.ScheduleEvent(EVENT_DARK_SMASH, urand(14,22)*IN_MILLISECONDS, 0, PHASE_UNDEAD);
break;
case EVENT_DREADFUL_ROAR:
DoCast(me, SPELL_DREADFUL_ROAR);
events.ScheduleEvent(EVENT_DREADFUL_ROAR, urand(18,21)*IN_MILLISECONDS, 0, PHASE_UNDEAD);
break;
case EVENT_WOE_STRIKE:
DoCastVictim(SPELL_WOE_STRIKE);
events.ScheduleEvent(EVENT_WOE_STRIKE, urand(10,14)*IN_MILLISECONDS, 0, PHASE_UNDEAD);
break;
case EVENT_SHADOW_AXE:
if (Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO, 1))
{
me->SummonCreature(ENTRY_THROW_TARGET, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 2000);
DoCast(me, SPELL_SHADOW_AXE_SUMMON);
}
uiEnrageTimer = 30000;
}
} else uiEnrageTimer -= diff;
}
if (uiRoarTimer <= diff)
{
if (!me->HasUnitState(UNIT_STAT_CASTING))
{
if (bIsUndead)
DoCast(me, SPELL_DREADFUL_ROAR);
else
DoCast(me, SPELL_STAGGERING_ROAR);
uiRoarTimer = 10000;
events.ScheduleEvent(EVENT_SHADOW_AXE, 30*IN_MILLISECONDS, 0, PHASE_UNDEAD);
break;
}
} else uiRoarTimer -= diff;
}
DoMeleeAttackIfReady();
}
private:
EventMap events;
};
};
+10 -3
View File
@@ -32,7 +32,12 @@ Script Data End */
enum Spells
{
SPELL_TRESPASSER_A = 54028,
SPELL_TRESPASSER_H = 54029
SPELL_TRESPASSER_H = 54029,
SPELL_SUNREAVER_DISGUISE_FEMALE = 70973,
SPELL_SUNREAVER_DISGUISE_MALE = 70974,
SPELL_SILVER_COVENANT_DISGUISE_FEMALE = 70971,
SPELL_SILVER_COVENANT_DISGUISE_MALE = 70972,
};
enum NPCs // All outdoor guards are within 35.0f of these NPCs
@@ -71,8 +76,10 @@ public:
Player* player = who->GetCharmerOrOwnerPlayerOrPlayerItself();
// If player has Disguise aura for quest A Meeting With The Magister or An Audience With The Arcanist, do not teleport it away but let it pass
if (!player || player->isGameMaster() || player->IsBeingTeleported() || player->HasAura(70973) || player->HasAura(70971))
if (!player || player->isGameMaster() || player->IsBeingTeleported() ||
// If player has Disguise aura for quest A Meeting With The Magister or An Audience With The Arcanist, do not teleport it away but let it pass
player->HasAura(SPELL_SUNREAVER_DISGUISE_FEMALE) || player->HasAura(SPELL_SUNREAVER_DISGUISE_MALE) ||
player->HasAura(SPELL_SILVER_COVENANT_DISGUISE_FEMALE) || player->HasAura(SPELL_SILVER_COVENANT_DISGUISE_MALE))
return;
switch (me->GetEntry())
@@ -1481,6 +1481,82 @@ class spell_gen_luck_of_the_draw : public SpellScriptLoader
}
};
enum DalaranDisguiseSpells
{
SPELL_SUNREAVER_DISGUISE_TRIGGER = 69672,
SPELL_SUNREAVER_DISGUISE_FEMALE = 70973,
SPELL_SUNREAVER_DISGUISE_MALE = 70974,
SPELL_SILVER_COVENANT_DISGUISE_TRIGGER = 69673,
SPELL_SILVER_COVENANT_DISGUISE_FEMALE = 70971,
SPELL_SILVER_COVENANT_DISGUISE_MALE = 70972,
};
class spell_gen_dalaran_disguise : public SpellScriptLoader
{
public:
spell_gen_dalaran_disguise(const char* name) : SpellScriptLoader(name) {}
class spell_gen_dalaran_disguise_SpellScript : public SpellScript
{
PrepareSpellScript(spell_gen_dalaran_disguise_SpellScript);
bool Validate(SpellInfo const* spellEntry)
{
switch (spellEntry->Id)
{
case SPELL_SUNREAVER_DISGUISE_TRIGGER:
if (!sSpellMgr->GetSpellInfo(SPELL_SUNREAVER_DISGUISE_FEMALE))
return false;
if (!sSpellMgr->GetSpellInfo(SPELL_SUNREAVER_DISGUISE_MALE))
return false;
break;
case SPELL_SILVER_COVENANT_DISGUISE_TRIGGER:
if (!sSpellMgr->GetSpellInfo(SPELL_SILVER_COVENANT_DISGUISE_FEMALE))
return false;
if (!sSpellMgr->GetSpellInfo(SPELL_SILVER_COVENANT_DISGUISE_MALE))
return false;
break;
}
return true;
}
void HandleScript(SpellEffIndex /*effIndex*/)
{
if (Player* player = GetHitPlayer())
{
uint8 gender = player->getGender();
uint32 spellId = GetSpellInfo()->Id;
switch (spellId)
{
case SPELL_SUNREAVER_DISGUISE_TRIGGER:
spellId = gender ? SPELL_SUNREAVER_DISGUISE_FEMALE : SPELL_SUNREAVER_DISGUISE_MALE;
break;
case SPELL_SILVER_COVENANT_DISGUISE_TRIGGER:
spellId = gender ? SPELL_SILVER_COVENANT_DISGUISE_FEMALE : SPELL_SILVER_COVENANT_DISGUISE_MALE;
break;
default:
break;
}
GetCaster()->CastSpell(player, spellId, true);
}
}
void Register()
{
OnEffectHitTarget += SpellEffectFn(spell_gen_dalaran_disguise_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const
{
return new spell_gen_dalaran_disguise_SpellScript();
}
};
void AddSC_generic_spell_scripts()
{
new spell_gen_absorb0_hitlimit1();
@@ -1514,4 +1590,6 @@ void AddSC_generic_spell_scripts()
new spell_gen_oracle_wolvar_reputation();
new spell_gen_damage_reduction_aura();
new spell_gen_luck_of_the_draw();
new spell_gen_dalaran_disguise("spell_gen_sunreaver_disguise");
new spell_gen_dalaran_disguise("spell_gen_silver_covenant_disguise");
}