aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmake/macros/FindMySQL.cmake45
-rw-r--r--sql/updates/world/2012_01_30_03_world_creature_loot_template.sql2
-rw-r--r--sql/updates/world/2012_01_30_04_world_gameobject_loot_template.sql14
-rw-r--r--sql/updates/world/2012_01_30_05_world_gameobject_loot_template.sql94
-rw-r--r--sql/updates/world/2012_01_31_00_world_gameobject_loot_template.sql136
-rw-r--r--sql/updates/world/2012_01_31_01_world_misc.sql8
-rw-r--r--sql/updates/world/2012_02_01_00_world_misc.sql5
-rwxr-xr-xsrc/server/game/Achievements/AchievementMgr.cpp3
-rwxr-xr-xsrc/server/game/Battlegrounds/ArenaTeam.cpp12
-rwxr-xr-xsrc/server/game/Battlegrounds/ArenaTeam.h2
-rwxr-xr-xsrc/server/game/Battlegrounds/Battleground.cpp2
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundEY.cpp1
-rwxr-xr-xsrc/server/game/Conditions/ConditionMgr.cpp10
-rwxr-xr-xsrc/server/game/Conditions/ConditionMgr.h6
-rwxr-xr-xsrc/server/game/Entities/Player/Player.cpp13
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.cpp5
-rwxr-xr-xsrc/server/game/Spells/Spell.cpp3
-rwxr-xr-xsrc/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp1
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp426
-rwxr-xr-xsrc/server/scripts/World/achievement_scripts.cpp19
20 files changed, 540 insertions, 267 deletions
diff --git a/cmake/macros/FindMySQL.cmake b/cmake/macros/FindMySQL.cmake
index d42dc5caf74..036b8302c75 100644
--- a/cmake/macros/FindMySQL.cmake
+++ b/cmake/macros/FindMySQL.cmake
@@ -72,19 +72,20 @@ find_path(MYSQL_INCLUDE_DIR
/usr/local/include
/usr/local/include/mysql
/usr/local/mysql/include
- "C:/Program Files/MySQL/include"
- "C:/Program Files/MySQL/MySQL Server 5.0/include"
- "C:/Program Files/MySQL/MySQL Server 5.1/include"
"C:/Program Files/MySQL/MySQL Server 5.6/include"
+ "C:/Program Files/MySQL/MySQL Server 5.5/include"
+ "C:/Program Files/MySQL/MySQL Server 5.1/include"
+ "C:/Program Files/MySQL/MySQL Server 5.0/include"
+ "C:/Program Files/MySQL/include"
"C:/MySQL/include"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.0;Location]/include"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.1;Location]/include"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.5;Location]/include"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.6;Location]/include"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.0;Location]/include"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.1;Location]/include"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.5;Location]/include"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.5;Location]/include"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.1;Location]/include"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.0;Location]/include"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.6;Location]/include"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.5;Location]/include"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.1;Location]/include"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.0;Location]/include"
"$ENV{ProgramFiles}/MySQL/*/include"
"$ENV{SystemDrive}/MySQL/*/include"
"c:/msys/local/include"
@@ -115,20 +116,28 @@ if( WIN32 )
libmysql
PATHS
${MYSQL_ADD_LIBRARIES_PATH}
- "C:/Program Files/MySQL/lib"
- "C:/Program Files/MySQL/MySQL Server 5.0/lib/opt"
- "C:/Program Files/MySQL/MySQL Server 5.1/lib/opt"
"C:/Program Files/MySQL/MySQL Server 5.6/lib/opt"
+ "C:/Program Files/MySQL/MySQL Server 5.5/lib/opt"
+ "C:/Program Files/MySQL/MySQL Server 5.1/lib/opt"
+ "C:/Program Files/MySQL/MySQL Server 5.0/lib/opt"
+ "C:/Program Files/MySQL/lib"
"C:/MySQL/lib/debug"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.0;Location]/lib/opt"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.1;Location]/lib/opt"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.6;Location]/lib"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.6;Location]/lib/opt"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.5;Location]/lib"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.6;Location]/lib"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.0;Location]/lib/opt"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.1;Location]/lib/opt"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.5;Location]/lib"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.5;Location]/lib/opt"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.1;Location]/lib"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.1;Location]/lib/opt"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.0;Location]/lib"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.0;Location]/lib/opt"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.6;Location]/lib"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.6;Location]/lib/opt"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.5;Location]/lib"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.5;Location]/lib/opt"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.1;Location]/lib"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.1;Location]/lib/opt"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.0;Location]/lib"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.0;Location]/lib/opt"
"$ENV{ProgramFiles}/MySQL/*/lib/opt"
"$ENV{SystemDrive}/MySQL/*/lib/opt"
"c:/msys/local/include"
diff --git a/sql/updates/world/2012_01_30_03_world_creature_loot_template.sql b/sql/updates/world/2012_01_30_03_world_creature_loot_template.sql
new file mode 100644
index 00000000000..531c472c263
--- /dev/null
+++ b/sql/updates/world/2012_01_30_03_world_creature_loot_template.sql
@@ -0,0 +1,2 @@
+-- Set 25 Heroic loot to 68%
+UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=68 WHERE `entry`=38586 AND `item`= 50274;
diff --git a/sql/updates/world/2012_01_30_04_world_gameobject_loot_template.sql b/sql/updates/world/2012_01_30_04_world_gameobject_loot_template.sql
new file mode 100644
index 00000000000..3ef39fe43d2
--- /dev/null
+++ b/sql/updates/world/2012_01_30_04_world_gameobject_loot_template.sql
@@ -0,0 +1,14 @@
+SET @ITEM :=50274;
+DELETE FROM `gameobject_loot_template` WHERE `entry` IN (28074,28088,28082,28096) AND `item`=@ITEM;
+INSERT INTO `gameobject_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+(28074,@ITEM,-38,1,0,1,1), -- Deathbringer Cache 25 Normal
+(28088,@ITEM,-68,1,0,1,1), -- Deathbringer Cache 25 Heroic
+(28082,@ITEM,-38,1,0,1,1), -- Cache of the Dreamwalker 25 Normal
+(28096,@ITEM,-68,1,0,1,1); -- Cache of the Dreamwalker 25 Heroic
+-- only drop if someone is on the quest (negative ChanceOrQuestChance)
+UPDATE `creature_loot_template` SET `ChanceOrQuestChance`= -(ABS(`ChanceOrQuestChance`)) WHERE `item`=50274;
+UPDATE `gameobject_loot_template` SET `ChanceOrQuestChance`= -(ABS(`ChanceOrQuestChance`)) WHERE `item`=50274;
+
+-- Dreamwalker and Council should drop 3 items
+UPDATE `gameobject_loot_template` SET `maxcount`=3 WHERE `entry`IN (28052,28082,28064,28096) AND `item`=1;
+UPDATE `creature_loot_template` SET `maxcount`=3 WHERE `entry` IN (37970,38401,38784,38785) AND `item`=1;
diff --git a/sql/updates/world/2012_01_30_05_world_gameobject_loot_template.sql b/sql/updates/world/2012_01_30_05_world_gameobject_loot_template.sql
new file mode 100644
index 00000000000..8196663eebe
--- /dev/null
+++ b/sql/updates/world/2012_01_30_05_world_gameobject_loot_template.sql
@@ -0,0 +1,94 @@
+SET @ThoriumGems = 12900;
+DELETE FROM `reference_loot_template` WHERE `entry` IN (@ThoriumGems,12901,12902,12903,12904,12905,12906,12907,12908);
+INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+-- ThoriumGems
+(@ThoriumGems,12363,40,1,1,1,1), -- Arcane Crystal
+(@ThoriumGems, 7910,12,1,1,1,1), -- Star Ruby
+(@ThoriumGems,12800,12,1,1,1,1), -- Azerothian Diamond
+(@ThoriumGems,12361,12,1,1,1,1), -- Blue Sapphire
+(@ThoriumGems,12364,12,1,1,1,1), -- Huge Emerald
+(@ThoriumGems,12799,12,1,1,1,1); -- Large Opal
+
+SET @Copper := 1502;
+SET @Tin := 1503;
+SET @Silver := 1504;
+SET @Iron := 1505;
+SET @Gold :=1506;
+SET @Mithril :=1742;
+SET @Truesilver := 5045;
+SET @SmallThorium := 9597;
+SET @RichThorium := 12883;
+
+DELETE FROM `gameobject_loot_template` WHERE `entry` IN (@Copper,@Tin,@Silver,@Iron,@Gold,@Mithril,@Truesilver,@SmallThorium,@RichThorium,17938,13960,17241);
+INSERT INTO `gameobject_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+-- Copper Vein
+(@Copper,2770,100,1,0,1,9), -- Copper Ore
+(@Copper,2835, 25,1,0,1,11), -- Rough Stone
+(@Copper,774 ,5,1,1,1,1), -- Malachite
+(@Copper,1210,5,1,1,1,1), -- Shadowgem
+(@Copper,818 ,5,1,1,1,1), -- Tigerseye
+(@Copper,22634,-100,1,0,1,2), -- Underlight Ore (only on quest)
+-- Tin Vein
+(@Tin,2771,100,1,0,1,9), -- Tin Ore
+(@Tin,2836,25,1,0,1,13), -- Coarse Stone
+(@Tin,1206,5,1,1,1,1), -- Moss Agate
+(@Tin,1705,5,1,1,1,1), -- Lesser Moonstone
+(@Tin,1210,5,1,1,1,1), -- Shadowgem
+(@Tin,1529,5,1,1,1,1), -- Jade
+(@Tin,2798,-100,1,0,1,2), -- Rethban Ore (only on quest)
+(@Tin,22634,-100,1,0,1,2), -- Underlight Ore (only on quest)
+-- Silver Vein
+(@Silver,2775,100,1,0,2,8), -- Silver Ore
+(@Silver,1206,5,1,1,1,1), -- Moss Agate
+(@Silver,1705,5,1,1,1,1), -- Lesser Moonstone
+(@Silver,1210,5,1,1,1,1), -- Shadowgem
+-- Iron Deposit
+(@Iron,2772,100,1,0,2,9), -- Iron Ore
+(@Iron,2838,100,1,0,2,10), -- Heavy Stone
+(@Iron,1529,5,1,1,1,1), -- Jade
+(@Iron,3864,5,1,1,1,1), -- Citrine
+(@Iron,1705,5,1,1,1,1), -- Lesser Moonstone
+(@Iron,7909,5,1,1,1,1), -- Aquamarine
+-- Gold Vein
+(@Gold,2776,100,1,0,2,8), -- Gold Ore
+(@Gold,3864,5,1,1,1,1), -- Citrine
+(@Gold,1705,5,1,1,1,1), -- Lesser Moonstone
+(@Gold,7909,5,1,1,1,1), -- Aquamarine
+-- Mithril Deposit
+(@Mithril,3858,100,1,0,1,9), -- Mithril Ore
+(@Mithril,7912,80,1,0,1,13), -- Solid Stone
+(@Mithril,7909,5,1,1,1,1), -- Aquamarine
+(@Mithril,3864,5,1,1,1,1), -- Citrine
+(@Mithril,7910,5,1,1,1,1), -- Star Ruby
+(@Mithril,9262,5,1,1,1,1), -- Black Vitriol
+-- Truesilver Deposit
+(@Truesilver,7911,100,1,0,2,8), -- Truesilver Ore
+(@Truesilver,7909,5,1,1,1,1), -- Aquamarine
+(@Truesilver,3864,5,1,1,1,1), -- Citrine
+(@Truesilver,7910,5,1,1,1,1), -- Star Ruby
+-- Small Thorium Vein
+(@SmallThorium,10620,100,1,0,1,8), -- Thorium Ore
+(@SmallThorium,12365,100,1,0,1,10), -- Dense Stone
+(@SmallThorium,1,15,1,0,-@ThoriumGems,1), -- One From Gems
+-- Rich Thorium Vein
+(@RichThorium,10620,100,1,0,3,10), -- Thorium Ore
+(@RichThorium,12365,100,1,0,4,12), -- Dense Stone
+(@RichThorium,1,25,1,0,-@ThoriumGems,1), -- One From Gems
+-- Special Cases:
+-- Truesilver Vein+Tainted Vitriol
+(17938,7911,100,1,0,2,8), -- Truesilver Ore
+(17938,7909,5,1,1,1,1), -- Aquamarine
+(17938,3864,5,1,1,1,1), -- Citrine
+(17938,7910,5,1,1,1,1), -- Star Ruby
+(17938,11513,50,1,0,1,1), -- Tainted Vitriol
+-- Small Thorium Vein+Tainted Vitriol
+(13960,10620,100,1,0,1,8), -- Thorium Ore
+(13960,12365,100,1,0,1,10), -- Dense Stone
+(13960,1,15,1,0,-@ThoriumGems,1), -- One From Gems
+(13960,11513,50,1,0,1,1), -- Tainted Vitriol
+-- Hakkari Thorium Vein
+(17241,10620,100,1,0,1,8), -- Thorium Ore
+(17241,12365,100,1,0,1,10), -- Dense Stone
+(17241,1,15,1,0,-@ThoriumGems,1), -- One From Gems
+(17241,19774,40,1,0,5,10); -- Souldarite
+
diff --git a/sql/updates/world/2012_01_31_00_world_gameobject_loot_template.sql b/sql/updates/world/2012_01_31_00_world_gameobject_loot_template.sql
new file mode 100644
index 00000000000..91f26990488
--- /dev/null
+++ b/sql/updates/world/2012_01_31_00_world_gameobject_loot_template.sql
@@ -0,0 +1,136 @@
+-- Change all Copper Ore Nodes in the Underlight Mines to be other id
+UPDATE `gameobject` SET `id`=181248 WHERE `guid` IN (75024,75051,75090,75099,75105) AND `id`=1731;
+-- Same for the Tin Nodes in the Underlight Mines
+UPDATE `gameobject` SET `id`=181249 WHERE `guid` IN (75025,75052,75091,75100,75106) AND `id`=1732;
+
+-- Change all Copper Ore Nodes in Beal Modan to match the other id
+UPDATE `gameobject` SET `id`=103713 WHERE `guid` IN (5096,13067,120336) AND `id` IN (1731,3763);
+
+-- fix wrongly increased counts (aka cata guildperk changed data)
+-- Copper
+UPDATE `gameobject_loot_template` SET `maxcount`=5 WHERE `entry`=1502 AND `item`=2770;
+UPDATE `gameobject_loot_template` SET `maxcount`=6 WHERE `entry`=1502 AND `item`=2835;
+-- Tin
+UPDATE `gameobject_loot_template` SET `maxcount`=5 WHERE `entry`=1503 AND `item`=2771;
+UPDATE `gameobject_loot_template` SET `maxcount`=7 WHERE `entry`=1503 AND `item`=2836;
+-- Silver
+UPDATE `gameobject_loot_template` SET `mincountOrRef`=1 WHERE `entry`=1504 AND `item`=2775;
+UPDATE `gameobject_loot_template` SET `maxcount`=4 WHERE `entry`=1504 AND `item`=2775;
+-- Iron
+UPDATE `gameobject_loot_template` SET `mincountOrRef`=1 WHERE `entry`=1505 AND `item`=2772;
+UPDATE `gameobject_loot_template` SET `maxcount`=4 WHERE `entry`=1505 AND `item`=2772;
+UPDATE `gameobject_loot_template` SET `mincountOrRef`=1 WHERE `entry`=1505 AND `item`=2838;
+UPDATE `gameobject_loot_template` SET `maxcount`=5 WHERE `entry`=1505 AND `item`=2838;
+-- Gold
+UPDATE `gameobject_loot_template` SET `mincountOrRef`=1 WHERE `entry`=1506 AND `item`=2776;
+UPDATE `gameobject_loot_template` SET `maxcount`=4 WHERE `entry`=1506 AND `item`=2776;
+-- Mithril
+UPDATE `gameobject_loot_template` SET `maxcount`=5 WHERE `entry`=1742 AND `item`=3858;
+UPDATE `gameobject_loot_template` SET `maxcount`=7 WHERE `entry`=1742 AND `item`=7912;
+-- Truesilver
+UPDATE `gameobject_loot_template` SET `mincountOrRef`=1 WHERE `entry`=5045 AND `item`=7911;
+UPDATE `gameobject_loot_template` SET `maxcount`=4 WHERE `entry`=5045 AND `item`=7911;
+-- Small Thorium
+UPDATE `gameobject_loot_template` SET `mincountOrRef`=1 WHERE `entry`=9597 AND `item`=10620;
+UPDATE `gameobject_loot_template` SET `maxcount`=4 WHERE `entry`=9597 AND `item`=10620;
+UPDATE `gameobject_loot_template` SET `maxcount`=4 WHERE `entry`=9597 AND `item`=12365;
+-- Rich Thorium
+UPDATE `gameobject_loot_template` SET `mincountOrRef`=2 WHERE `entry`=12883 AND `item`=10620;
+UPDATE `gameobject_loot_template` SET `maxcount`=5 WHERE `entry`=12883 AND `item`=10620;
+UPDATE `gameobject_loot_template` SET `mincountOrRef`=2 WHERE `entry`=12883 AND `item`=12365;
+UPDATE `gameobject_loot_template` SET `maxcount`=6 WHERE `entry`=12883 AND `item`=12365;
+
+-- Remove Underlight Ore from all other copper ore nodes:
+DELETE FROM `gameobject_loot_template` WHERE `item`=22634; -- Underlight Ore
+DELETE FROM `gameobject_loot_template` WHERE `item`=2798; -- Rethban Ore
+DELETE FROM `gameobject_loot_template` WHERE `item`=11513; -- Tainted Vitriol
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=4 AND `SourceGroup`=17939 AND `SourceEntry`=11513;
+
+-- Set LootIDvariables for Special Nodes
+SET @CopperUM := 18092;
+SET @TinUM := 18093;
+SET @CopperRR := 1735;
+SET @TinRR := 1736;
+SET @CopperB := 2626;
+SET @TinB := 2627;
+SET @GoldOoze := 17939;
+SET @MithrilFW := 13961;
+SET @TruesilverFW := 17938;
+SET @ThoriumFW := 13960;
+SET @ThoriumGems = 12900;
+
+DELETE FROM `gameobject_loot_template` WHERE `entry` IN (@CopperUM,@CopperRR,@TinUM,@TinRR,@CopperB,@TinB,@GoldOoze,@MithrilFW,@TruesilverFW,@ThoriumFW);
+INSERT INTO `gameobject_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+-- Underlight Mine Special Nodes
+(@CopperUM,2770,100,1,0,1,5), -- Copper Ore
+(@CopperUM,2835, 25,1,0,1,6), -- Rough Stone
+(@CopperUM,774 ,5,1,1,1,1), -- Malachite
+(@CopperUM,1210,5,1,1,1,1), -- Shadowgem
+(@CopperUM,818 ,5,1,1,1,1), -- Tigerseye
+(@CopperUM,22634,-100,1,0,1,2), -- Underlight Ore (only if on quest)
+-- Chanced Tin also have to drop it
+(@TinUM,2771,100,1,0,1,5), -- Tin Ore
+(@TinUM,2836,25,1,0,1,7), -- Coarse Stone
+(@TinUM,1206,5,1,1,1,1), -- Moss Agate
+(@TinUM,1705,5,1,1,1,1), -- Lesser Moonstone
+(@TinUM,1210,5,1,1,1,1), -- Shadowgem
+(@TinUM,1529,5,1,1,1,1), -- Jade
+(@TinUM,22634,-100,1,0,1,2), -- Underlight Ore (only on quest)
+-- Redridge Special Nodes
+(@CopperRR,2770,100,1,0,1,5), -- Copper Ore
+(@CopperRR,2835, 25,1,0,1,6), -- Rough Stone
+(@CopperRR,774 ,5,1,1,1,1), -- Malachite
+(@CopperRR,1210,5,1,1,1,1), -- Shadowgem
+(@CopperRR,818 ,5,1,1,1,1), -- Tigerseye
+(@CopperRR,2798,-100,1,0,1,4), -- Rethban Ore
+-- Chanced Tin also have to drop it
+(@TinRR,2771,100,1,0,1,5), -- Tin Ore
+(@TinRR,2836,25,1,0,1,7), -- Coarse Stone
+(@TinRR,1206,5,1,1,1,1), -- Moss Agate
+(@TinRR,1705,5,1,1,1,1), -- Lesser Moonstone
+(@TinRR,1210,5,1,1,1,1), -- Shadowgem
+(@TinRR,1529,5,1,1,1,1), -- Jade
+(@TinRR,2798,-100,1,0,1,2), -- Rethban Ore (only on quest)
+-- The Barrens Copper Vein contain Blood Shards
+(@CopperB,2770,100,1,0,1,5), -- Copper Ore
+(@CopperB,2835, 25,1,0,1,6), -- Rough Stone
+(@CopperB,774 ,5,1,1,1,1), -- Malachite
+(@CopperB,1210,5,1,1,1,1), -- Shadowgem
+(@CopperB,818 ,5,1,1,1,1), -- Tigerseye
+(@CopperB,5075,5,1,1,1,3), -- Blood Shard (only in barrens)
+-- Chanced Tin also have to drop it
+(@TinB,2771,100,1,0,1,5), -- Tin Ore
+(@TinB,2836,25,1,0,1,7), -- Coarse Stone
+(@TinB,1206,5,1,1,1,1), -- Moss Agate
+(@TinB,1705,5,1,1,1,1), -- Lesser Moonstone
+(@TinB,1210,5,1,1,1,1), -- Shadowgem
+(@TinB,1529,5,1,1,1,1), -- Jade
+(@TinB,5075,5,1,1,1,4), -- Blood Shard (only in barrens ?)
+-- Ooze Covered Gold Vein
+(@GoldOoze,2776,100,1,0,2,4), -- Gold Ore
+(@GoldOoze,3864,5,1,1,1,1), -- Citrine
+(@GoldOoze,1705,5,1,1,1,1), -- Lesser Moonstone
+(@GoldOoze,7909,5,1,1,1,1), -- Aquamarine
+-- Felwood Mithril Vein
+(@MithrilFW,3858,100,1,0,1,5), -- Mithril Ore
+(@MithrilFW,7912,80,1,0,1,7), -- Solid Stone
+(@MithrilFW,7909,5,1,1,1,1), -- Aquamarine
+(@MithrilFW,3864,5,1,1,1,1), -- Citrine
+(@MithrilFW,7910,5,1,1,1,1), -- Star Ruby
+(@MithrilFW,9262,5,1,1,1,1), -- Black Vitriol
+(@MithrilFW,11513,25,1,0,1,4), -- Tainted Vitriol
+-- Chanced Truesilver also needs it
+(@TruesilverFW,7911,100,1,0,1,4), -- Truesilver Ore
+(@TruesilverFW,7909,5,1,1,1,1), -- Aquamarine
+(@TruesilverFW,3864,5,1,1,1,1), -- Citrine
+(@TruesilverFW,7910,5,1,1,1,1), -- Star Ruby
+(@TruesilverFW,11513,25,1,0,1,4), -- Tainted Vitriol
+-- Chance Thoriuym also needs it
+-- Small Thorium Vein+Tainted Vitriol
+(@ThoriumFW,10620,100,1,0,1,8), -- Thorium Ore
+(@ThoriumFW,12365,100,1,0,1,10), -- Dense Stone
+(@ThoriumFW,1,15,1,0,-@ThoriumGems,1), -- One From Gems
+(@ThoriumFW,11513,50,1,0,1,1); -- Tainted Vitriol
+
+
diff --git a/sql/updates/world/2012_01_31_01_world_misc.sql b/sql/updates/world/2012_01_31_01_world_misc.sql
new file mode 100644
index 00000000000..c359f186431
--- /dev/null
+++ b/sql/updates/world/2012_01_31_01_world_misc.sql
@@ -0,0 +1,8 @@
+-- Delete the criteria from the disables table
+DELETE FROM `disables` WHERE `sourceType`=4 AND `entry`=3880;
+
+-- criteria data for achievement Not So Fast
+DELETE FROM `achievement_criteria_data` WHERE `criteria_id`=3880;
+INSERT INTO `achievement_criteria_data` (`criteria_id`, `TYPE`, `value1`, `value2`, `ScriptName`) VALUES
+(3880,6,3277,0, ''),
+(3880,7,23451,0, '');
diff --git a/sql/updates/world/2012_02_01_00_world_misc.sql b/sql/updates/world/2012_02_01_00_world_misc.sql
new file mode 100644
index 00000000000..e137f7a8238
--- /dev/null
+++ b/sql/updates/world/2012_02_01_00_world_misc.sql
@@ -0,0 +1,5 @@
+DELETE FROM `achievement_criteria_data` WHERE `criteria_id`=9798 AND `type`=6;
+
+DELETE FROM `spell_script_names` WHERE `spell_id`=63399;
+INSERT INTO `spell_script_names`(`spell_id`,`ScriptName`) VALUES
+(63399, 'spell_gen_tournament_pennant');
diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp
index 02686993fbb..271e78abf67 100755
--- a/src/server/game/Achievements/AchievementMgr.cpp
+++ b/src/server/game/Achievements/AchievementMgr.cpp
@@ -1176,10 +1176,9 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
// speedup for non-login case
if (miscValue1 && achievementCriteria->own_item.itemID != miscValue1)
continue;
- SetCriteriaProgress(achievementCriteria, GetPlayer()->GetItemCount(achievementCriteria->own_item.itemID, true));
+ SetCriteriaProgress(achievementCriteria, miscValue2, PROGRESS_ACCUMULATE);
break;
case ACHIEVEMENT_CRITERIA_TYPE_WIN_RATED_ARENA:
- // miscvalue1 contains the personal rating
if (!miscValue1) // no update at login
continue;
diff --git a/src/server/game/Battlegrounds/ArenaTeam.cpp b/src/server/game/Battlegrounds/ArenaTeam.cpp
index 8e30743f107..02707261d13 100755
--- a/src/server/game/Battlegrounds/ArenaTeam.cpp
+++ b/src/server/game/Battlegrounds/ArenaTeam.cpp
@@ -455,7 +455,7 @@ void ArenaTeam::Inspect(WorldSession* session, uint64 guid)
session->SendPacket(&data);
}
-void ArenaTeamMember::ModifyPersonalRating(Player* player, int32 mod, uint32 slot)
+void ArenaTeamMember::ModifyPersonalRating(Player* player, int32 mod, uint32 type)
{
if (int32(PersonalRating) + mod < 0)
PersonalRating = 0;
@@ -464,8 +464,8 @@ void ArenaTeamMember::ModifyPersonalRating(Player* player, int32 mod, uint32 slo
if (player)
{
- player->SetArenaTeamInfoField(slot, ARENA_TEAM_PERSONAL_RATING, PersonalRating);
- player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_PERSONAL_RATING, PersonalRating, slot);
+ player->SetArenaTeamInfoField(ArenaTeam::GetSlotByType(type), ARENA_TEAM_PERSONAL_RATING, PersonalRating);
+ player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_PERSONAL_RATING, PersonalRating, type);
}
}
@@ -725,7 +725,7 @@ void ArenaTeam::MemberLost(Player* player, uint32 againstMatchmakerRating, int32
{
// Update personal rating
int32 mod = GetRatingMod(itr->PersonalRating, againstMatchmakerRating, false);
- itr->ModifyPersonalRating(player, mod, GetSlot());
+ itr->ModifyPersonalRating(player, mod, GetType());
// Update matchmaker rating
itr->ModifyMatchmakerRating(MatchmakerRatingChange, GetSlot());
@@ -751,7 +751,7 @@ void ArenaTeam::OfflineMemberLost(uint64 guid, uint32 againstMatchmakerRating, i
{
// update personal rating
int32 mod = GetRatingMod(itr->PersonalRating, againstMatchmakerRating, false);
- itr->ModifyPersonalRating(NULL, mod, GetSlot());
+ itr->ModifyPersonalRating(NULL, mod, GetType());
// update matchmaker rating
itr->ModifyMatchmakerRating(MatchmakerRatingChange, GetSlot());
@@ -773,7 +773,7 @@ void ArenaTeam::MemberWon(Player* player, uint32 againstMatchmakerRating, int32
{
// update personal rating
int32 mod = GetRatingMod(itr->PersonalRating, againstMatchmakerRating, true);
- itr->ModifyPersonalRating(player, mod, GetSlot());
+ itr->ModifyPersonalRating(player, mod, GetType());
// update matchmaker rating
itr->ModifyMatchmakerRating(MatchmakerRatingChange, GetSlot());
diff --git a/src/server/game/Battlegrounds/ArenaTeam.h b/src/server/game/Battlegrounds/ArenaTeam.h
index 03ddea1dd3a..d8ad2c09e59 100755
--- a/src/server/game/Battlegrounds/ArenaTeam.h
+++ b/src/server/game/Battlegrounds/ArenaTeam.h
@@ -97,7 +97,7 @@ struct ArenaTeamMember
uint16 PersonalRating;
uint16 MatchMakerRating;
- void ModifyPersonalRating(Player* player, int32 mod, uint32 slot);
+ void ModifyPersonalRating(Player* player, int32 mod, uint32 type);
void ModifyMatchmakerRating(int32 mod, uint32 slot);
};
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp
index 5d121869f54..08ca406e373 100755
--- a/src/server/game/Battlegrounds/Battleground.cpp
+++ b/src/server/game/Battlegrounds/Battleground.cpp
@@ -824,7 +824,7 @@ void Battleground::EndBattleground(uint32 winner)
// update achievement BEFORE personal rating update
ArenaTeamMember* member = winner_arena_team->GetMember(player->GetGUID());
if (member)
- player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_WIN_RATED_ARENA, member->PersonalRating);
+ player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_WIN_RATED_ARENA, 1);
winner_arena_team->MemberWon(player, loser_matchmaker_rating, winner_matchmaker_change);
}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
index 1e7f79b8391..cbc3ec85055 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
@@ -196,7 +196,6 @@ void BattlegroundEY::CheckSomeoneLeftPoint()
//move not existed player to "free space" - this will cause many error showing in log, but it is a very important bug
m_PlayersNearPoint[EY_POINTS_MAX].push_back(m_PlayersNearPoint[i][j]);
m_PlayersNearPoint[i].erase(m_PlayersNearPoint[i].begin() + j);
- ++j;
continue;
}
if (!player->CanCaptureTowerPoint() || !player->IsWithinDistInMap(obj, BG_EY_POINT_RADIUS))
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp
index a745c5a2f13..330a38ba5dd 100755
--- a/src/server/game/Conditions/ConditionMgr.cpp
+++ b/src/server/game/Conditions/ConditionMgr.cpp
@@ -344,17 +344,17 @@ ConditionList ConditionMgr::GetConditionsForVehicleSpell(uint32 creatureID, uint
return cond;
}
-ConditionList ConditionMgr::GetConditionsForSmartEvent(uint32 entry, uint32 eventId, uint32 sourceType)
+ConditionList ConditionMgr::GetConditionsForSmartEvent(int32 entryOrGuid, uint32 eventId, uint32 sourceType)
{
ConditionList cond;
- SmartEventConditionContainer::const_iterator itr = SmartEventConditionStore.find(std::make_pair(entry, sourceType));
+ SmartEventConditionContainer::const_iterator itr = SmartEventConditionStore.find(std::make_pair(entryOrGuid, sourceType));
if (itr != SmartEventConditionStore.end())
{
ConditionTypeContainer::const_iterator i = (*itr).second.find(eventId + 1);
if (i != (*itr).second.end())
{
cond = (*i).second;
- sLog->outDebug(LOG_FILTER_CONDITIONSYS, "GetConditionsForSmartEvent: found conditions for Smart Event entry %u event_id %u", entry, eventId);
+ sLog->outDebug(LOG_FILTER_CONDITIONSYS, "GetConditionsForSmartEvent: found conditions for Smart Event entry or guid %d event_id %u", entryOrGuid, eventId);
}
}
return cond;
@@ -410,7 +410,7 @@ void ConditionMgr::LoadConditions(bool isReload)
Condition* cond = new Condition();
int32 iSourceTypeOrReferenceId = fields[0].GetInt32();
cond->mSourceGroup = fields[1].GetUInt32();
- cond->mSourceEntry = fields[2].GetUInt32();
+ cond->mSourceEntry = fields[2].GetInt32();
cond->mSourceId = fields[3].GetUInt32();
cond->mElseGroup = fields[4].GetUInt32();
int32 iConditionTypeOrReference = fields[5].GetInt32();
@@ -553,7 +553,7 @@ void ConditionMgr::LoadConditions(bool isReload)
case CONDITION_SOURCE_TYPE_SMART_EVENT:
{
// If the entry does not exist, create a new list
- std::pair<uint32, uint32> key = std::make_pair(cond->mSourceEntry, cond->mSourceId);
+ std::pair<int32, uint32> key = std::make_pair(cond->mSourceEntry, cond->mSourceId);
if (SmartEventConditionStore.find(key) == SmartEventConditionStore.end())
{
ConditionTypeContainer cmap;
diff --git a/src/server/game/Conditions/ConditionMgr.h b/src/server/game/Conditions/ConditionMgr.h
index a9bb97251da..1641642dd86 100755
--- a/src/server/game/Conditions/ConditionMgr.h
+++ b/src/server/game/Conditions/ConditionMgr.h
@@ -104,7 +104,7 @@ struct Condition
{
ConditionSourceType mSourceType; //SourceTypeOrReferenceId
uint32 mSourceGroup;
- uint32 mSourceEntry;
+ int32 mSourceEntry;
uint32 mSourceId; // So far, only used in CONDITION_SOURCE_TYPE_SMART_EVENT
uint32 mElseGroup;
ConditionType mConditionType; //ConditionTypeOrReference
@@ -138,7 +138,7 @@ typedef std::list<Condition*> ConditionList;
typedef std::map<uint32, ConditionList> ConditionTypeContainer;
typedef std::map<ConditionSourceType, ConditionTypeContainer> ConditionContainer;
typedef std::map<uint32, ConditionTypeContainer> VehicleSpellConditionContainer;
-typedef std::map<std::pair<uint32, uint32 /*SAI source_type*/>, ConditionTypeContainer> SmartEventConditionContainer;
+typedef std::map<std::pair<int32, uint32 /*SAI source_type*/>, ConditionTypeContainer> SmartEventConditionContainer;
typedef std::map<uint32, ConditionList> ConditionReferenceContainer;//only used for references
@@ -157,7 +157,7 @@ class ConditionMgr
bool IsPlayerMeetToConditions(Player* player, ConditionList const& conditions, Unit* invoker = NULL);
ConditionList GetConditionsForNotGroupedEntry(ConditionSourceType sourceType, uint32 entry);
- ConditionList GetConditionsForSmartEvent(uint32 entry, uint32 eventId, uint32 sourceType);
+ ConditionList GetConditionsForSmartEvent(int32 entryOrGuid, uint32 eventId, uint32 sourceType);
ConditionList GetConditionsForVehicleSpell(uint32 creatureID, uint32 spellID);
private:
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 44186dad95c..9eece3003af 100755
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -2314,14 +2314,9 @@ bool Player::TeleportToBGEntryPoint()
if (m_bgData.joinPos.m_mapId == MAPID_INVALID)
return false;
- Group* group = GetGroup();
- if (group && group->isLFGGroup() && group->GetMembersCount() == 1)
- group->Disband();
- else
- ScheduleDelayedOperation(DELAYED_BG_GROUP_RESTORE);
-
ScheduleDelayedOperation(DELAYED_BG_MOUNT_RESTORE);
ScheduleDelayedOperation(DELAYED_BG_TAXI_RESTORE);
+ ScheduleDelayedOperation(DELAYED_BG_GROUP_RESTORE);
return TeleportTo(m_bgData.joinPos);
}
@@ -12043,7 +12038,7 @@ Item* Player::StoreItem(ItemPosCountVec const& dest, Item* pItem, bool update)
lastItem = _StoreItem(pos, pItem, count, true, update);
}
- GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_OWN_ITEM, entry);
+ GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_OWN_ITEM, entry, 1);
return lastItem;
}
@@ -14829,7 +14824,9 @@ bool Player::CanRewardQuest(Quest const* quest, uint32 reward, bool msg)
void Player::AddQuest(Quest const* quest, Object* questGiver)
{
uint16 log_slot = FindQuestSlot(0);
- ASSERT(log_slot < MAX_QUEST_LOG_SIZE);
+
+ if (log_slot >= MAX_QUEST_LOG_SIZE) // Player does not have any free slot in the quest log
+ return;
uint32 quest_id = quest->GetQuestId();
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index e02331e00e7..289a600e88a 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -775,7 +775,10 @@ uint32 Unit::DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDam
ASSERT(he->duel);
- he->SetHealth(1);
+ if (duel_wasMounted) // In this case victim==mount
+ victim->SetHealth(1);
+ else
+ he->SetHealth(1);
he->duel->opponent->CombatStopWithPets(true);
he->CombatStopWithPets(true);
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index c8e4c55c7c0..3c73edb880d 100755
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -5401,6 +5401,9 @@ SpellCastResult Spell::CheckCast(bool strict)
}
case SPELL_AURA_PERIODIC_MANA_LEECH:
{
+ if (m_spellInfo->Effects[i].IsArea())
+ break;
+
if (!m_targets.GetUnitTarget())
return SPELL_FAILED_BAD_IMPLICIT_TARGETS;
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
index 04ae6f933d8..ac246abdc7c 100755
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
@@ -106,6 +106,7 @@ class boss_lord_marrowgar : public CreatureScript
events.ScheduleEvent(EVENT_COLDFLAME, 5000, EVENT_GROUP_SPECIAL);
events.ScheduleEvent(EVENT_WARN_BONE_STORM, urand(45000, 50000));
events.ScheduleEvent(EVENT_ENRAGE, 600000);
+ _boneSlice = false;
}
void EnterCombat(Unit* /*who*/)
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index 96d259817c0..3d552901295 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -342,11 +342,8 @@ class spell_gen_remove_flight_auras : public SpellScriptLoader
PrepareSpellScript(spell_gen_remove_flight_auras_SpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
- Unit* target = GetHitUnit();
- if (!target)
- return;
- target->RemoveAurasByType(SPELL_AURA_FLY);
- target->RemoveAurasByType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED);
+ GetHitUnit()->RemoveAurasByType(SPELL_AURA_FLY);
+ GetHitUnit()->RemoveAurasByType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED);
}
void Register()
@@ -448,25 +445,22 @@ class spell_gen_elune_candle : public SpellScriptLoader
void HandleScript(SpellEffIndex /*effIndex*/)
{
- if (Unit* target = GetHitUnit())
- {
- uint32 spellId = 0;
+ uint32 spellId = 0;
- if (target->GetEntry() == NPC_OMEN)
+ if (GetHitUnit()->GetEntry() == NPC_OMEN)
+ {
+ switch (urand(0, 3))
{
- switch (urand(0, 3))
- {
- case 0: spellId = SPELL_ELUNE_CANDLE_OMEN_HEAD; break;
- case 1: spellId = SPELL_ELUNE_CANDLE_OMEN_CHEST; break;
- case 2: spellId = SPELL_ELUNE_CANDLE_OMEN_HAND_R; break;
- case 3: spellId = SPELL_ELUNE_CANDLE_OMEN_HAND_L; break;
- }
+ case 0: spellId = SPELL_ELUNE_CANDLE_OMEN_HEAD; break;
+ case 1: spellId = SPELL_ELUNE_CANDLE_OMEN_CHEST; break;
+ case 2: spellId = SPELL_ELUNE_CANDLE_OMEN_HAND_R; break;
+ case 3: spellId = SPELL_ELUNE_CANDLE_OMEN_HAND_L; break;
}
- else
- spellId = SPELL_ELUNE_CANDLE_NORMAL;
-
- GetCaster()->CastSpell(target, spellId, true, NULL);
}
+ else
+ spellId = SPELL_ELUNE_CANDLE_NORMAL;
+
+ GetCaster()->CastSpell(GetHitUnit(), spellId, true, NULL);
}
void Register()
@@ -947,11 +941,8 @@ class spell_generic_clone : public SpellScriptLoader
void HandleScriptEffect(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
- Unit* caster = GetCaster();
uint32 spellId = uint32(GetSpellInfo()->Effects[effIndex].CalcValue());
-
- if (Unit* target = GetHitUnit())
- target->CastSpell(caster, spellId, true);
+ GetHitUnit()->CastSpell(GetCaster(), spellId, true);
}
void Register()
@@ -1591,7 +1582,6 @@ class spell_gen_dalaran_disguise : public SpellScriptLoader
void HandleScript(SpellEffIndex /*effIndex*/)
{
-
if (Player* player = GetHitPlayer())
{
uint8 gender = player->getGender();
@@ -1661,66 +1651,74 @@ enum BreakShieldSpells
class spell_gen_break_shield: public SpellScriptLoader
{
-public:
- spell_gen_break_shield() : SpellScriptLoader("spell_gen_break_shield") { }
-
- class spell_gen_break_shield_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_gen_break_shield_SpellScript)
+ public:
+ spell_gen_break_shield() : SpellScriptLoader("spell_gen_break_shield") { }
- void HandleScriptEffect(SpellEffIndex effIndex)
+ class spell_gen_break_shield_SpellScript : public SpellScript
{
- Unit* caster = GetCaster();
- Unit* target = GetTargetUnit();
-
- if (!caster || !target)
- return;
+ PrepareSpellScript(spell_gen_break_shield_SpellScript)
- switch (effIndex)
+ void HandleScriptEffect(SpellEffIndex effIndex)
{
- case EFFECT_0: // On spells wich trigger the damaging spell (and also the visual)
- uint32 spellId;
- switch (GetSpellInfo()->Id)
+ Unit* target = GetHitUnit();
+
+ switch (effIndex)
+ {
+ case EFFECT_0: // On spells wich trigger the damaging spell (and also the visual)
{
- case SPELL_BREAK_SHIELD_TRIGGER_UNK:
- case SPELL_BREAK_SHIELD_TRIGGER_CAMPAING_WARHORSE:
- spellId = SPELL_BREAK_SHIELD_DAMAGE_10K;
- break;
- case SPELL_BREAK_SHIELD_TRIGGER_FACTION_MOUNTS:
- spellId = SPELL_BREAK_SHIELD_DAMAGE_2K;
- break;
- default:
- return;
- }
+ uint32 spellId;
- if (Unit* rider = caster->GetCharmer())
- rider->CastSpell(target, spellId, false);
- else
- caster->CastSpell(target, spellId, false);
- break;
- case EFFECT_1: // On damaging spells, for removing the a defend layer
- Unit::AuraApplicationMap const& auras = target->GetAppliedAuras();
- for (Unit::AuraApplicationMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
+ switch (GetSpellInfo()->Id)
+ {
+ case SPELL_BREAK_SHIELD_TRIGGER_UNK:
+ case SPELL_BREAK_SHIELD_TRIGGER_CAMPAING_WARHORSE:
+ spellId = SPELL_BREAK_SHIELD_DAMAGE_10K;
+ break;
+ case SPELL_BREAK_SHIELD_TRIGGER_FACTION_MOUNTS:
+ spellId = SPELL_BREAK_SHIELD_DAMAGE_2K;
+ break;
+ default:
+ return;
+ }
+
+ if (Unit* rider = GetCaster()->GetCharmer())
+ rider->CastSpell(target, spellId, false);
+ else
+ GetCaster()->CastSpell(target, spellId, false);
+ break;
+ }
+ case EFFECT_1: // On damaging spells, for removing a defend layer
{
- Aura* aura = itr->second->GetBase();
- SpellInfo const* auraInfo = aura->GetSpellInfo();
- if (aura && auraInfo->SpellIconID == 2007 && aura->HasEffectType(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN))
- aura->ModStackAmount(-1, AURA_REMOVE_BY_ENEMY_SPELL);
+ Unit::AuraApplicationMap const& auras = target->GetAppliedAuras();
+ for (Unit::AuraApplicationMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
+ {
+ Aura* aura = itr->second->GetBase();
+ SpellInfo const* auraInfo = aura->GetSpellInfo();
+ if (aura && auraInfo->SpellIconID == 2007 && aura->HasEffectType(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN))
+ {
+ aura->ModStackAmount(-1, AURA_REMOVE_BY_ENEMY_SPELL);
+ // Remove dummys from rider (Necessary for updating visual shields)
+ if (Unit* rider = target->GetCharmer())
+ if (Aura* defend = rider->GetAura(aura->GetId()))
+ defend->ModStackAmount(-1, AURA_REMOVE_BY_ENEMY_SPELL);
+ break;
+ }
+ }
+ break;
}
- break;
+ }
}
- }
- void Register()
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_gen_break_shield_SpellScript::HandleScriptEffect, EFFECT_FIRST_FOUND, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
{
- OnEffectHit += SpellEffectFn(spell_gen_break_shield_SpellScript::HandleScriptEffect, EFFECT_FIRST_FOUND, SPELL_EFFECT_SCRIPT_EFFECT);
+ return new spell_gen_break_shield_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_gen_break_shield_SpellScript();
- }
};
/* DOCUMENTATION: Charge spells
@@ -1775,109 +1773,110 @@ enum ChargeSpells
class spell_gen_mounted_charge: public SpellScriptLoader
{
-public:
- spell_gen_mounted_charge() : SpellScriptLoader("spell_gen_mounted_charge") { }
-
- class spell_gen_mounted_charge_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_gen_mounted_charge_SpellScript)
+ public:
+ spell_gen_mounted_charge() : SpellScriptLoader("spell_gen_mounted_charge") { }
- void HandleScriptEffect(SpellEffIndex effIndex)
+ class spell_gen_mounted_charge_SpellScript : public SpellScript
{
- Unit* caster = GetCaster();
- Unit* target = GetTargetUnit();
+ PrepareSpellScript(spell_gen_mounted_charge_SpellScript)
- if (!caster || !target)
- return;
-
- switch (effIndex)
+ void HandleScriptEffect(SpellEffIndex effIndex)
{
- case EFFECT_0: // On spells wich trigger the damaging spell (and also the visual)
- uint32 spellId;
+ Unit* target = GetHitUnit();
- switch (GetSpellInfo()->Id)
+ switch (effIndex)
+ {
+ case EFFECT_0: // On spells wich trigger the damaging spell (and also the visual)
{
- case SPELL_CHARGE_TRIGGER_TRIAL_CHAMPION:
- spellId = SPELL_CHARGE_CHARGING_EFFECT_20K_1;
- case SPELL_CHARGE_TRIGGER_FACTION_MOUNTS:
- spellId = SPELL_CHARGE_CHARGING_EFFECT_8K5;
- break;
- default:
- return;
- }
+ uint32 spellId;
- if (Unit* vehicle = caster->GetVehicleBase())
- vehicle->CastSpell(target, spellId, false);
- else
- caster->CastSpell(target, spellId, false);
- break;
- case EFFECT_1: // On damaging spells, for removing the a defend layer
- case EFFECT_2:
- Unit::AuraApplicationMap const& auras = target->GetAppliedAuras();
- for (Unit::AuraApplicationMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
+ switch (GetSpellInfo()->Id)
+ {
+ case SPELL_CHARGE_TRIGGER_TRIAL_CHAMPION:
+ spellId = SPELL_CHARGE_CHARGING_EFFECT_20K_1;
+ case SPELL_CHARGE_TRIGGER_FACTION_MOUNTS:
+ spellId = SPELL_CHARGE_CHARGING_EFFECT_8K5;
+ break;
+ default:
+ return;
+ }
+
+ // If target isn't a training dummy there's a chance of failing the charge
+ if (!target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE) && roll_chance_f(12.5f))
+ spellId = SPELL_CHARGE_MISS_EFFECT;
+
+ if (Unit* vehicle = GetCaster()->GetVehicleBase())
+ vehicle->CastSpell(target, spellId, false);
+ else
+ GetCaster()->CastSpell(target, spellId, false);
+ break;
+ }
+ case EFFECT_1: // On damaging spells, for removing a defend layer
+ case EFFECT_2:
{
- Aura* aura = itr->second->GetBase();
- SpellInfo const* auraInfo = aura->GetSpellInfo();
- if (aura && auraInfo->SpellIconID == 2007 && aura->HasEffectType(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN))
- aura->ModStackAmount(-1, AURA_REMOVE_BY_ENEMY_SPELL);
+ Unit::AuraApplicationMap const& auras = target->GetAppliedAuras();
+ for (Unit::AuraApplicationMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
+ {
+ Aura* aura = itr->second->GetBase();
+ SpellInfo const* auraInfo = aura->GetSpellInfo();
+ if (aura && auraInfo->SpellIconID == 2007 && aura->HasEffectType(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN))
+ {
+ aura->ModStackAmount(-1, AURA_REMOVE_BY_ENEMY_SPELL);
+ // Remove dummys from rider (Necessary for updating visual shields)
+ if (Unit* rider = target->GetCharmer())
+ if (Aura* defend = rider->GetAura(aura->GetId()))
+ defend->ModStackAmount(-1, AURA_REMOVE_BY_ENEMY_SPELL);
+ break;
+ }
+ }
+ break;
}
- break;
+ }
}
- }
- void HandleChargeEffect(SpellEffIndex effIndex)
- {
- Unit* caster = GetCaster();
- Unit* target = GetTargetUnit();
+ void HandleChargeEffect(SpellEffIndex effIndex)
+ {
+ uint32 spellId;
- if (!caster || !target)
- return;
+ switch (GetSpellInfo()->Id)
+ {
+ case SPELL_CHARGE_CHARGING_EFFECT_8K5:
+ spellId = SPELL_CHARGE_DAMAGE_8K5;
+ break;
+ case SPELL_CHARGE_CHARGING_EFFECT_20K_1:
+ case SPELL_CHARGE_CHARGING_EFFECT_20K_2:
+ spellId = SPELL_CHARGE_DAMAGE_20K;
+ break;
+ case SPELL_CHARGE_CHARGING_EFFECT_45K_1:
+ case SPELL_CHARGE_CHARGING_EFFECT_45K_2:
+ spellId = SPELL_CHARGE_DAMAGE_45K;
+ break;
+ default:
+ return;
+ }
- uint32 spellId;
-
- switch (GetSpellInfo()->Id)
- {
- case SPELL_CHARGE_CHARGING_EFFECT_8K5:
- spellId = SPELL_CHARGE_DAMAGE_8K5;
- break;
- case SPELL_CHARGE_CHARGING_EFFECT_20K_1:
- case SPELL_CHARGE_CHARGING_EFFECT_20K_2:
- spellId = SPELL_CHARGE_DAMAGE_20K;
- break;
- case SPELL_CHARGE_CHARGING_EFFECT_45K_1:
- case SPELL_CHARGE_CHARGING_EFFECT_45K_2:
- spellId = SPELL_CHARGE_DAMAGE_45K;
- break;
- default:
- return;
+ if (Unit* rider = GetCaster()->GetCharmer())
+ rider->CastSpell(GetHitUnit(), spellId, false);
+ else
+ GetCaster()->CastSpell(GetHitUnit(), spellId, false);
}
- // If target isn't a training dummy there's a chance of failing the charge
- if (!target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE) && urand(0,7) == 0)
- spellId = SPELL_CHARGE_MISS_EFFECT;
-
- if (Unit* rider = caster->GetCharmer())
- rider->CastSpell(target, spellId, false);
- else
- caster->CastSpell(target, spellId, false);
- }
+ void Register()
+ {
+ SpellInfo const* spell = sSpellMgr->GetSpellInfo(m_scriptSpellId);
- void Register()
- {
- SpellInfo const* spell = sSpellMgr->GetSpellInfo(m_scriptSpellId);
+ if (spell->HasEffect(SPELL_EFFECT_SCRIPT_EFFECT))
+ OnEffectHitTarget += SpellEffectFn(spell_gen_mounted_charge_SpellScript::HandleScriptEffect, EFFECT_FIRST_FOUND, SPELL_EFFECT_SCRIPT_EFFECT);
- if (spell->HasEffect(SPELL_EFFECT_SCRIPT_EFFECT))
- OnEffectHit += SpellEffectFn(spell_gen_mounted_charge_SpellScript::HandleScriptEffect, EFFECT_FIRST_FOUND, SPELL_EFFECT_SCRIPT_EFFECT);
+ if (spell->Effects[EFFECT_0].Effect == SPELL_EFFECT_CHARGE)
+ OnEffectHitTarget += SpellEffectFn(spell_gen_mounted_charge_SpellScript::HandleChargeEffect, EFFECT_0, SPELL_EFFECT_CHARGE);
+ }
+ };
- if (spell->Effects[EFFECT_0].Effect == SPELL_EFFECT_CHARGE)
- OnEffectHit += SpellEffectFn(spell_gen_mounted_charge_SpellScript::HandleChargeEffect, EFFECT_0, SPELL_EFFECT_CHARGE);
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_gen_mounted_charge_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_gen_mounted_charge_SpellScript();
- }
};
enum DefendVisuals
@@ -1907,44 +1906,33 @@ class spell_gen_defend : public SpellScriptLoader
return true;
}
- void RefreshVisualShields(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ void RefreshVisualShields(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
{
- Unit* caster = GetCaster();
- Unit* target = GetTarget();
-
- if(!target)
- return;
-
- if (!caster)
+ if (Unit* caster = GetCaster())
{
- target->RemoveAurasDueToSpell(GetId());
- return;
- }
+ Unit* target = GetTarget();
- for (uint8 i = 0; i < GetSpellInfo()->StackAmount; ++i)
- target->RemoveAurasDueToSpell(SPELL_VISUAL_SHIELD_1 + i);
+ for (uint8 i = 0; i < GetSpellInfo()->StackAmount; ++i)
+ target->RemoveAurasDueToSpell(SPELL_VISUAL_SHIELD_1 + i);
- target->CastSpell(target, SPELL_VISUAL_SHIELD_1 + GetAura()->GetStackAmount() - 1);
+ target->CastSpell(target, SPELL_VISUAL_SHIELD_1 + GetAura()->GetStackAmount() - 1, true, NULL, aurEff);
+ }
+ else
+ GetTarget()->RemoveAurasDueToSpell(GetId());
}
void RemoveVisualShields(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- Unit* target = GetTarget();
-
- if(!target)
- return;
-
for (uint8 i = 0; i < GetSpellInfo()->StackAmount; ++i)
- target->RemoveAurasDueToSpell(SPELL_VISUAL_SHIELD_1 + i);
+ GetTarget()->RemoveAurasDueToSpell(SPELL_VISUAL_SHIELD_1 + i);
}
void RemoveDummyFromDriver(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- Unit* caster = GetCaster();
-
- if (caster && caster->ToTempSummon())
- if (Unit* rider = caster->ToTempSummon()->GetSummoner())
- rider->RemoveAurasDueToSpell(GetId());
+ if (Unit* caster = GetCaster())
+ if (TempSummon* vehicle = caster->ToTempSummon())
+ if (Unit* rider = vehicle->GetSummoner())
+ rider->RemoveAurasDueToSpell(GetId());
}
void Register()
@@ -1955,7 +1943,7 @@ class spell_gen_defend : public SpellScriptLoader
if (spell->Effects[EFFECT_0].ApplyAuraName == SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN)
{
AfterEffectApply += AuraEffectApplyFn(spell_gen_defendAuraScript::RefreshVisualShields, EFFECT_0, SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
- OnEffectRemove += AuraEffectRemoveFn(spell_gen_defendAuraScript::RemoveVisualShields, EFFECT_0, SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN, AURA_EFFECT_HANDLE_REAL);
+ OnEffectRemove += AuraEffectRemoveFn(spell_gen_defendAuraScript::RemoveVisualShields, EFFECT_0, SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN, AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK);
}
// Remove Defend spell from player when he dismounts
@@ -1966,7 +1954,7 @@ class spell_gen_defend : public SpellScriptLoader
if (spell->Effects[EFFECT_1].ApplyAuraName == SPELL_AURA_DUMMY)
{
AfterEffectApply += AuraEffectApplyFn(spell_gen_defendAuraScript::RefreshVisualShields, EFFECT_1, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
- OnEffectRemove += AuraEffectRemoveFn(spell_gen_defendAuraScript::RemoveVisualShields, EFFECT_1, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ OnEffectRemove += AuraEffectRemoveFn(spell_gen_defendAuraScript::RemoveVisualShields, EFFECT_1, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK);
}
}
};
@@ -2003,33 +1991,24 @@ class spell_gen_tournament_duel : public SpellScriptLoader
void HandleScriptEffect(SpellEffIndex effIndex)
{
- Unit* caster = GetCaster();
- Unit* target = GetTargetUnit();
- Unit* player = GetCaster()->GetCharmer();
-
- if (!caster || !target || !player)
- return;
-
- if (target->GetTypeId() == TYPEID_PLAYER)
- {
-
- if (!target->HasAura(SPELL_ON_TOURNAMENT_MOUNT) || !target->GetVehicleBase())
- return;
-
- player->CastSpell(target, SPELL_MOUNTED_DUEL, true);
- }
- else if (target->GetTypeId() == TYPEID_UNIT)
+ if (Unit* rider = GetCaster()->GetCharmer())
{
- if (!target->GetCharmer() || target->GetCharmer()->GetTypeId() != TYPEID_PLAYER || !target->GetCharmer()->HasAura(SPELL_ON_TOURNAMENT_MOUNT))
- return;
-
- player->CastSpell(target->GetCharmer(), SPELL_MOUNTED_DUEL, true);
+ if (Player* plrTarget = GetHitPlayer())
+ {
+ if (plrTarget->HasAura(SPELL_ON_TOURNAMENT_MOUNT) && plrTarget->GetVehicleBase())
+ rider->CastSpell(plrTarget, SPELL_MOUNTED_DUEL, true);
+ }
+ else if (Unit* unitTarget = GetHitUnit())
+ {
+ if (unitTarget->GetCharmer() && unitTarget->GetCharmer()->GetTypeId() == TYPEID_PLAYER && unitTarget->GetCharmer()->HasAura(SPELL_ON_TOURNAMENT_MOUNT))
+ rider->CastSpell(unitTarget->GetCharmer(), SPELL_MOUNTED_DUEL, true);
+ }
}
}
void Register()
{
- OnEffectHit += SpellEffectFn(spell_gen_tournament_duel_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ OnEffectHitTarget += SpellEffectFn(spell_gen_tournament_duel_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
@@ -2062,9 +2041,13 @@ class spell_gen_summon_tournament_mount : public SpellScriptLoader
SpellCastResult CheckIfLanceEquiped()
{
- Unit* caster = GetCaster();
+ if (GetCaster()->HasAuraType(SPELL_AURA_MOD_SHAPESHIFT))
+ {
+ SetCustomCastResultMessage(SPELL_CUSTOM_ERROR_CANT_MOUNT_WITH_SHAPESHIFT);
+ return SPELL_FAILED_CUSTOM_ERROR;
+ }
- if (!caster->HasAura(SPELL_LANCE_EQUIPPED))
+ if (!GetCaster()->HasAura(SPELL_LANCE_EQUIPPED))
{
SetCustomCastResultMessage(SPELL_CUSTOM_ERROR_MUST_HAVE_LANCE_EQUIPPED);
return SPELL_FAILED_CUSTOM_ERROR;
@@ -2194,25 +2177,24 @@ class spell_gen_on_tournament_mount : public SpellScriptLoader
bool Load()
{
_pennantSpellId = 0;
- return (GetCaster()->GetTypeId() == TYPEID_PLAYER);
+ return GetCaster() && GetCaster()->GetTypeId() == TYPEID_PLAYER;
}
void HandleApplyEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- Unit* caster = GetCaster();
-
- if (caster && caster->GetVehicleBase())
+ if (Unit* caster = GetCaster())
{
- _pennantSpellId = GetPennatSpellId(caster->ToPlayer(), caster->GetVehicleBase());
- caster->CastSpell(caster, _pennantSpellId,true);
+ if (Unit* vehicle = caster->GetVehicleBase())
+ {
+ _pennantSpellId = GetPennatSpellId(caster->ToPlayer(), vehicle);
+ caster->CastSpell(caster, _pennantSpellId, true);
+ }
}
}
void HandleRemoveEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- Unit* caster = GetCaster();
-
- if (caster)
+ if (Unit* caster = GetCaster())
caster->RemoveAurasDueToSpell(_pennantSpellId);
}
@@ -2348,12 +2330,16 @@ class spell_gen_tournament_pennant : public SpellScriptLoader
{
PrepareAuraScript(spell_gen_tournament_pennantAuraScript);
- void HandleApplyEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ bool Load()
{
- Unit* caster = GetCaster();
+ return GetCaster() && GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
- if (caster && caster->GetTypeId() == TYPEID_PLAYER && !caster->GetVehicleBase())
- caster->RemoveAurasDueToSpell(GetId());
+ void HandleApplyEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ if (Unit* caster = GetCaster())
+ if (!caster->GetVehicleBase())
+ caster->RemoveAurasDueToSpell(GetId());
}
void Register()
diff --git a/src/server/scripts/World/achievement_scripts.cpp b/src/server/scripts/World/achievement_scripts.cpp
index 135f22e0a01..9bcf450b3aa 100755
--- a/src/server/scripts/World/achievement_scripts.cpp
+++ b/src/server/scripts/World/achievement_scripts.cpp
@@ -285,6 +285,16 @@ class achievement_bg_sa_defense_of_ancients : public AchievementCriteriaScript
}
};
+enum ArgentTournamentAreas
+{
+ AREA_ARGENT_TOURNAMENT_FIELDS = 4658,
+ AREA_RING_OF_ASPIRANTS = 4670,
+ AREA_RING_OF_ARGENT_VALIANTS = 4671,
+ AREA_RING_OF_ALLIANCE_VALIANTS = 4672,
+ AREA_RING_OF_HORDE_VALIANTS = 4673,
+ AREA_RING_OF_CHAMPIONS = 4669,
+};
+
class achievement_tilted : public AchievementCriteriaScript
{
public:
@@ -292,7 +302,14 @@ class achievement_tilted : public AchievementCriteriaScript
bool OnCheck(Player* player, Unit* /*target*/)
{
- return player && player->duel && player->duel->isMounted;
+ bool checkArea = player->GetAreaId() == AREA_ARGENT_TOURNAMENT_FIELDS ||
+ player->GetAreaId() == AREA_RING_OF_ASPIRANTS ||
+ player->GetAreaId() == AREA_RING_OF_ARGENT_VALIANTS ||
+ player->GetAreaId() == AREA_RING_OF_ALLIANCE_VALIANTS ||
+ player->GetAreaId() == AREA_RING_OF_HORDE_VALIANTS ||
+ player->GetAreaId() == AREA_RING_OF_CHAMPIONS;
+
+ return player && checkArea && player->duel && player->duel->isMounted;
}
};