aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2012_01_16_01_world_sai.sql17
-rw-r--r--sql/updates/world/2012_01_16_02_world_sai.sql11
-rw-r--r--sql/updates/world/2012_01_16_03_world_sai.sql16
-rw-r--r--sql/updates/world/2012_01_16_04_world_sai.sql11
-rw-r--r--sql/updates/world/2012_01_16_05_world_sai.sql15
-rw-r--r--sql/updates/world/2012_01_16_06_world_sai.sql14
-rw-r--r--sql/updates/world/2012_01_16_07_world_sai.sql33
-rw-r--r--sql/updates/world/2012_01_16_08_world_sai.sql12
-rw-r--r--sql/updates/world/2012_01_16_09_world_sai.sql10
-rw-r--r--sql/updates/world/2012_01_17_00_world_misc.sql27
-rw-r--r--sql/updates/world/2012_01_17_01_world_conditions.sql12
-rwxr-xr-xsrc/server/game/Conditions/ConditionMgr.cpp2
-rwxr-xr-xsrc/server/game/DungeonFinding/LFGMgr.cpp2
-rwxr-xr-xsrc/server/game/Entities/Player/Player.cpp25
-rwxr-xr-xsrc/server/game/Entities/Player/Player.h6
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.cpp6
-rwxr-xr-xsrc/server/game/Groups/Group.cpp4
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp16
-rwxr-xr-xsrc/server/game/Spells/Auras/SpellAuras.cpp14
-rwxr-xr-xsrc/server/game/Spells/Auras/SpellAuras.h3
-rw-r--r--src/server/scripts/Commands/cs_npc.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/stormwind_city.cpp74
-rw-r--r--src/server/scripts/Northrend/dalaran.cpp13
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp78
24 files changed, 325 insertions, 100 deletions
diff --git a/sql/updates/world/2012_01_16_01_world_sai.sql b/sql/updates/world/2012_01_16_01_world_sai.sql
new file mode 100644
index 00000000000..5914e053f59
--- /dev/null
+++ b/sql/updates/world/2012_01_16_01_world_sai.sql
@@ -0,0 +1,17 @@
+-- [Q] [A] Report to Goldshire
+-- Also moved the emote to creature_text
+-- Doesn't work because it's auto-accept..
+-- Marshal McBride SAI
+SET @ENTRY := 197;
+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;
+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
+DELETE FROM `db_script_string` WHERE `entry`=2000000059;
+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,"You are dismissed, $N.",12,0,100,113,0,0,"Marshal McBride");
diff --git a/sql/updates/world/2012_01_16_02_world_sai.sql b/sql/updates/world/2012_01_16_02_world_sai.sql
new file mode 100644
index 00000000000..a34b38db099
--- /dev/null
+++ b/sql/updates/world/2012_01_16_02_world_sai.sql
@@ -0,0 +1,11 @@
+-- [Q] [A/H] The Completed Orb of Noh'Orahil
+-- Menara Voidrender SAI
+SET @ENTRY := 6266;
+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);
+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
diff --git a/sql/updates/world/2012_01_16_03_world_sai.sql b/sql/updates/world/2012_01_16_03_world_sai.sql
new file mode 100644
index 00000000000..fb84a8b99be
--- /dev/null
+++ b/sql/updates/world/2012_01_16_03_world_sai.sql
@@ -0,0 +1,16 @@
+-- [Q] [A/H] Proving Allegiance
+-- Also moved the emote to creature_text
+-- Gunther Arcanus SAI
+SET @ENTRY := 1497;
+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;
+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
+DELETE FROM `db_script_string` WHERE `entry`=2000000085;
+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,"Take a Candle of Beckoning from this crate, $N.",12,0,100,25,0,0,"Gunther Arcanus");
diff --git a/sql/updates/world/2012_01_16_04_world_sai.sql b/sql/updates/world/2012_01_16_04_world_sai.sql
new file mode 100644
index 00000000000..630c9748c0a
--- /dev/null
+++ b/sql/updates/world/2012_01_16_04_world_sai.sql
@@ -0,0 +1,11 @@
+-- [Q] [A/H] Hope Within the Emerald Nightmare
+-- This NPC already had SAI so we're only adding additional lines
+-- Keeper Remulos SAI
+SET @ENTRY := 11832;
+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;
+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");
diff --git a/sql/updates/world/2012_01_16_05_world_sai.sql b/sql/updates/world/2012_01_16_05_world_sai.sql
new file mode 100644
index 00000000000..9f89e03acd8
--- /dev/null
+++ b/sql/updates/world/2012_01_16_05_world_sai.sql
@@ -0,0 +1,15 @@
+-- [Q] [A] A Humble Task
+-- Greatmother Hawkwind SAI
+SET @ENTRY := 2991;
+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;
+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
+DELETE FROM `db_script_string` WHERE `entry`=2000000077;
+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,"%s gestures to the pitcher of water sitting on the edge of the well.",16,0,100,0,0,0,"Greatmother Hawkwind");
diff --git a/sql/updates/world/2012_01_16_06_world_sai.sql b/sql/updates/world/2012_01_16_06_world_sai.sql
new file mode 100644
index 00000000000..a6f2667772f
--- /dev/null
+++ b/sql/updates/world/2012_01_16_06_world_sai.sql
@@ -0,0 +1,14 @@
+-- [Q] [A/H] The Boon of A'dal
+-- A'dal SAI
+SET @ENTRY := 18481;
+SET @QUEST := 13082;
+SET @SPELL_BLESSING := 35076;
+SET @SPELL_TP_DALARAN := 53141;
+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;
+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");
diff --git a/sql/updates/world/2012_01_16_07_world_sai.sql b/sql/updates/world/2012_01_16_07_world_sai.sql
new file mode 100644
index 00000000000..63db0cda7a0
--- /dev/null
+++ b/sql/updates/world/2012_01_16_07_world_sai.sql
@@ -0,0 +1,33 @@
+-- [Q] [A] The Missing Diplomat
+-- Dashel Stonefist SAI
+SET @ENTRY := 4961;
+SET @QUEST := 1447;
+SET @SPELL_PUMMEL := 12555;
+UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry`=@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);
+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"),
+(@ENTRY*100+1,9,2,0,0,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Dashel Stonefist - On Script - Evade"),
+(@ENTRY*100+1,9,3,0,0,0,100,0,0,0,0,0,2,84,0,0,0,0,0,1,0,0,0,0,0,0,0,"Dashel Stonefist - On Script - Set Faction Back"),
+(@ENTRY*100+1,9,4,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Dashel Stonefist - On Script - Say Line 1"),
+(@ENTRY*100+1,9,5,0,0,0,100,0,6000,6000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Dashel Stonefist - On Script - Say Line 2");
+-- Texts
+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,"Now you're going to get it good!",12,0,100,0,0,0,"Dashel Stonefist"),
+(@ENTRY,1,0,"Okay, okay! Enough fighting. No one else needs to get hurt.",12,0,100,0,0,0,"Dashel Stonefist"),
+(@ENTRY,2,0,"It's okay, boys. Back off. You've done enough. I'll meet up with you later.",12,0,100,0,0,0,"Dashel Stonefist");
diff --git a/sql/updates/world/2012_01_16_08_world_sai.sql b/sql/updates/world/2012_01_16_08_world_sai.sql
new file mode 100644
index 00000000000..50bce9d5a9f
--- /dev/null
+++ b/sql/updates/world/2012_01_16_08_world_sai.sql
@@ -0,0 +1,12 @@
+-- [Q] [A/H] In Service Of The Lich King
+-- The Lich King SAI
+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;
+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
diff --git a/sql/updates/world/2012_01_16_09_world_sai.sql b/sql/updates/world/2012_01_16_09_world_sai.sql
new file mode 100644
index 00000000000..d82fc341ff0
--- /dev/null
+++ b/sql/updates/world/2012_01_16_09_world_sai.sql
@@ -0,0 +1,10 @@
+-- [Q] [A] The Legend of Stalvan
+-- Sealed Crate SAI
+SET @ENTRY := 1561;
+SET @QUEST := 74;
+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,12,2044,1,30000,0,0,0,8,0,0,0,-10953.3,988.509,98.984,5.349,"Sealed Crate - On Quest Accept - Summon Forlorn Spirit"); -- What's wrong with those stupid co-ords? ..
diff --git a/sql/updates/world/2012_01_17_00_world_misc.sql b/sql/updates/world/2012_01_17_00_world_misc.sql
new file mode 100644
index 00000000000..300d239bd43
--- /dev/null
+++ b/sql/updates/world/2012_01_17_00_world_misc.sql
@@ -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);
diff --git a/sql/updates/world/2012_01_17_01_world_conditions.sql b/sql/updates/world/2012_01_17_01_world_conditions.sql
new file mode 100644
index 00000000000..1dacd35dd4f
--- /dev/null
+++ b/sql/updates/world/2012_01_17_01_world_conditions.sql
@@ -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 7594 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');
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp
index 0bcd1a7864b..49b5d4cba65 100755
--- a/src/server/game/Conditions/ConditionMgr.cpp
+++ b/src/server/game/Conditions/ConditionMgr.cpp
@@ -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:
diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp
index 0f146598a6e..ac7343e8f23 100755
--- a/src/server/game/DungeonFinding/LFGMgr.cpp
+++ b/src/server/game/DungeonFinding/LFGMgr.cpp
@@ -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();
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index bed3c0cb1a7..ce80d7a7af3 100755
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -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);
diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h
index 7a455590506..fccd380bd29 100755
--- a/src/server/game/Entities/Player/Player.h
+++ b/src/server/game/Entities/Player/Player.h
@@ -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; }
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 63aa7771063..7b51840b49f 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -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
diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp
index 19bc1ab7dea..b31b632e963 100755
--- a/src/server/game/Groups/Group.cpp
+++ b/src/server/game/Groups/Group.cpp
@@ -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;
}
diff --git a/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp b/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp
index aaafb09115d..59eefb9fa77 100755
--- a/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp
@@ -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);
}
diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp
index 5577422919f..b32e346757f 100755
--- a/src/server/game/Spells/Auras/SpellAuras.cpp
+++ b/src/server/game/Spells/Auras/SpellAuras.cpp
@@ -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())
diff --git a/src/server/game/Spells/Auras/SpellAuras.h b/src/server/game/Spells/Auras/SpellAuras.h
index 8c9cde37c15..de743eb2991 100755
--- a/src/server/game/Spells/Auras/SpellAuras.h
+++ b/src/server/game/Spells/Auras/SpellAuras.h
@@ -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; }
diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp
index 1b6a6c6fdcf..57932ef56c6 100644
--- a/src/server/scripts/Commands/cs_npc.cpp
+++ b/src/server/scripts/Commands/cs_npc.cpp
@@ -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);
diff --git a/src/server/scripts/EasternKingdoms/stormwind_city.cpp b/src/server/scripts/EasternKingdoms/stormwind_city.cpp
index 4d43e4adefe..a4eca1950f8 100644
--- a/src/server/scripts/EasternKingdoms/stormwind_city.cpp
+++ b/src/server/scripts/EasternKingdoms/stormwind_city.cpp
@@ -26,7 +26,6 @@ EndScriptData */
/* ContentData
npc_archmage_malin
npc_bartleby
-npc_dashel_stonefist
npc_lady_katrana_prestor
npc_tyrion
npc_tyrion_spybot
@@ -148,78 +147,6 @@ public:
};
/*######
-## npc_dashel_stonefist
-######*/
-
-enum eDashel
-{
- QUEST_MISSING_DIPLO_PT8 = 1447,
- FACTION_HOSTILE = 168
-};
-
-class npc_dashel_stonefist : public CreatureScript
-{
-public:
- npc_dashel_stonefist() : CreatureScript("npc_dashel_stonefist") { }
-
- bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest)
- {
- if (quest->GetQuestId() == QUEST_MISSING_DIPLO_PT8)
- {
- creature->setFaction(FACTION_HOSTILE);
- CAST_AI(npc_dashel_stonefist::npc_dashel_stonefistAI, creature->AI())->AttackStart(player);
- }
- return true;
- }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new npc_dashel_stonefistAI(creature);
- }
-
- struct npc_dashel_stonefistAI : public ScriptedAI
- {
- npc_dashel_stonefistAI(Creature* c) : ScriptedAI(c)
- {
- m_uiNormalFaction = c->getFaction();
- }
-
- uint32 m_uiNormalFaction;
-
- void Reset()
- {
- if (me->getFaction() != m_uiNormalFaction)
- me->setFaction(m_uiNormalFaction);
- }
-
- void AttackedBy(Unit* pAttacker)
- {
- if (me->getVictim())
- return;
-
- if (me->IsFriendlyTo(pAttacker))
- return;
-
- AttackStart(pAttacker);
- }
-
- void DamageTaken(Unit* pDoneBy, uint32 &uiDamage)
- {
- if (uiDamage > me->GetHealth() || me->HealthBelowPctDamaged(15, uiDamage))
- {
- uiDamage = 0;
-
- if (pDoneBy->GetTypeId() == TYPEID_PLAYER)
- CAST_PLR(pDoneBy)->AreaExploredOrEventHappens(QUEST_MISSING_DIPLO_PT8);
-
- EnterEvadeMode();
- }
- }
- };
-
-};
-
-/*######
## npc_lady_katrana_prestor
######*/
@@ -716,7 +643,6 @@ void AddSC_stormwind_city()
{
new npc_archmage_malin();
new npc_bartleby();
- new npc_dashel_stonefist();
new npc_lady_katrana_prestor();
new npc_tyrion();
new npc_tyrion_spybot();
diff --git a/src/server/scripts/Northrend/dalaran.cpp b/src/server/scripts/Northrend/dalaran.cpp
index 57007a93fa7..cd3cbf29d0d 100644
--- a/src/server/scripts/Northrend/dalaran.cpp
+++ b/src/server/scripts/Northrend/dalaran.cpp
@@ -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())
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index 3fb2c4f3319..2b31a50510d 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -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");
}