aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2015_11_29_00_world.sql41
-rw-r--r--sql/updates/world/2015_11_29_01_world.sql15
-rw-r--r--sql/updates/world/2015_12_01_00_world.sql12
-rw-r--r--sql/updates/world/2015_12_04_00_world.sql34
-rw-r--r--sql/updates/world/2015_12_05_00_world.sql8
-rw-r--r--sql/updates/world/2015_12_06_00_world.sql35
-rw-r--r--sql/updates/world/2015_12_08_00_world_335.sql15
-rw-r--r--sql/updates/world/2015_12_08_01_world.sql2
-rw-r--r--sql/updates/world/2015_12_08_02_world.sql (renamed from sql/updates/world/2015_10_09_maexxna.sql)0
-rw-r--r--src/server/database/Database/DatabaseLoader.cpp10
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedCreature.cpp1
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedCreature.h3
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp4
-rw-r--r--src/server/game/Conditions/ConditionMgr.cpp4
-rw-r--r--src/server/game/Conditions/ConditionMgr.h2
-rw-r--r--src/server/game/Entities/Pet/Pet.cpp18
-rw-r--r--src/server/game/Entities/Pet/Pet.h2
-rw-r--r--src/server/game/Entities/Player/Player.cpp4
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp23
-rw-r--r--src/server/game/Entities/Unit/Unit.h9
-rw-r--r--src/server/game/Groups/Group.cpp2
-rw-r--r--src/server/game/Handlers/GroupHandler.cpp2
-rw-r--r--src/server/game/Quests/QuestDef.cpp12
-rw-r--r--src/server/game/Server/WorldSession.cpp5
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.cpp2
-rw-r--r--src/server/game/Spells/SpellEffects.cpp2
-rw-r--r--src/server/game/Spells/SpellHistory.cpp4
-rw-r--r--src/server/game/Spells/SpellMgr.cpp9
-rw-r--r--src/server/game/Texts/CreatureTextMgr.cpp2
-rw-r--r--src/server/scripts/Commands/cs_wp.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp4
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp2
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp4
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp2
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp4
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp18
-rw-r--r--src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp2
-rw-r--r--src/server/scripts/Kalimdor/zone_moonglade.cpp59
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp2
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.cpp6
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp6
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp4
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp3
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp4
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp4
-rw-r--r--src/server/scripts/Northrend/zone_borean_tundra.cpp2
-rw-r--r--src/server/scripts/Northrend/zone_sholazar_basin.cpp2
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp2
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp2
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp2
-rw-r--r--src/server/scripts/Spells/spell_holiday.cpp81
-rw-r--r--src/server/scripts/Spells/spell_hunter.cpp2
-rw-r--r--src/server/scripts/Spells/spell_item.cpp2
63 files changed, 374 insertions, 167 deletions
diff --git a/sql/updates/world/2015_11_29_00_world.sql b/sql/updates/world/2015_11_29_00_world.sql
new file mode 100644
index 00000000000..fd64b65bd02
--- /dev/null
+++ b/sql/updates/world/2015_11_29_00_world.sql
@@ -0,0 +1,41 @@
+-- Talbuk Doe SAI
+SET @ENTRY := 20610; -- Talbuk Doe
+SET @SPELL_GORE := 32019; -- Gore
+SET @SPELL_TAG := 35771; -- Tag Subbued Talbuk
+SET @SPELL_TAG_CREDIT := 40347; -- Talbuk Tagging Credit
+SET @SPELL_SLEEPING := 14915; -- Sleeping Sleep
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+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,4,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Talbuk Doe - On Aggro - Say text 0"),
+(@ENTRY,0,1,0,0,0,100,0,1000,1000,8000,11000,11,@SPELL_GORE,0,0,0,0,0,2,0,0,0,0,0,0,0,"Talbuk Doe - In Combat - Cast Gore"),
+(@ENTRY,0,2,0,2,0,100,1,0,20,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Talbuk Doe - At 20% HP - Say Text 1"),
+(@ENTRY,0,5,0,4,0,100,0,0,0,0,0,45,0,1,0,0,0,0,19,20777,30,0,0,0,0,0,"Talbuk Doe - On Aggro - Set data"),
+(@ENTRY,0,3,0,8,0,100,0,@SPELL_TAG,0,0,0,80,@ENTRY*100,2,0,0,0,0,1,0,0,0,0,0,0,0,"Talbuk Doe - On Spellhit - Run Script"),
+(@ENTRY,0,4,0,11,0,100,0,0,0,0,0,19,386,0,0,0,0,0,1,0,0,0,0,0,0,0,"Talbuk Doe - On Respawn - Remove Unit Flag"),
+(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,85,@SPELL_TAG_CREDIT ,0,0,0,0,0,7,0,0,0,0,0,0,0,"Talbuk Doe - Script - Give Quest Credit"),
+(@ENTRY*100,9,1,0,0,0,100,1,0,0,0,0,27,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Talbuk Doe - Script - Stop combat"),
+(@ENTRY*100,9,2,0,0,0,100,0,0,0,0,0,18,386,0,0,0,0,0,1,0,0,0,0,0,0,0,"Talbuk Doe - Script - Set Unit Flag"),
+(@ENTRY*100,9,3,0,0,0,100,0,0,0,0,0,11,@SPELL_SLEEPING,1,0,0,0,0,1,0,0,0,0,0,0,0,"Talbuk Doe - Script - Cast Sleeping Sleep"),
+(@ENTRY*100,9,4,0,0,0,100,0,0,0,0,0,11,55795,1,0,0,0,0,1,0,0,0,0,0,0,0,"Talbuk Doe - Script - Cast visual death state"),
+(@ENTRY*100, 9, 5, 0, 0, 0, 100, 0, 30000, 30000, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Talbuk Doe - On Script - Despawn');
+
+-- Talbuk Sire SAI
+SET @ENTRY := 20777; -- Talbuk Sire
+SET @SPELL_STOMP := 32023; -- Hoof Stomp
+SET @SPELL_TAG := 35771; -- Tag Subbued Talbuk
+SET @SPELL_SLEEPING := 14915; -- Sleeping Sleep
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+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,0,0,100,0,4000,6000,8000,11000,11,@SPELL_STOMP,0,0,0,0,0,2,0,0,0,0,0,0,0,"Talbuk Sire - In Combat - Cast Hoof Stomp"),
+(@ENTRY,0,1,0,2,0,100,1,0,20,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Talbuk Sire - At 20% HP - Say Text 0"),
+(@ENTRY,0,4,0,38,0,100,0,0,1,0,0,49,0,0,0,0,0,0,21,40,0,0,0,0,0,0,"Talbuk Sire - On data set - Start attack"),
+(@ENTRY,0,2,0,8,0,100,0,@SPELL_TAG,0,0,0,80,@ENTRY*100,2,0,0,0,0,1,0,0,0,0,0,0,0,"Talbuk Sire - On Spellhit - Run Script"),
+(@ENTRY,0,3,0,11,0,100,0,0,0,0,0,19,386,0,0,0,0,0,1,0,0,0,0,0,0,0,"Talbuk Sire - On Respawn - Remove Unit Flag"),
+(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,85,@SPELL_TAG_CREDIT ,0,0,0,0,0,7,0,0,0,0,0,0,0,"Talbuk Sire - Script - Give Quest Credit"),
+(@ENTRY*100,9,1,0,0,0,100,1,0,0,0,0,27,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Talbuk Sire - Script - Stop combat"),
+(@ENTRY*100,9,2,0,0,0,100,0,0,0,0,0,18,386,0,0,0,0,0,1,0,0,0,0,0,0,0,"Talbuk Sire - Script - Set Unit Flag"),
+(@ENTRY*100,9,3,0,0,0,100,0,0,0,0,0,11,@SPELL_SLEEPING,1,0,0,0,0,1,0,0,0,0,0,0,0,"Talbuk Sire - Script - Cast Sleeping Sleep"),
+(@ENTRY*100,9,4,0,0,0,100,0,0,0,0,0,11,55795,1,0,0,0,0,1,0,0,0,0,0,0,0,"Talbuk Sire - Script - Cast visual death state"),
+(@ENTRY*100, 9, 5, 0, 0, 0, 100, 0, 30000, 30000, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Talbuk Sire - On Script - Despawn');
diff --git a/sql/updates/world/2015_11_29_01_world.sql b/sql/updates/world/2015_11_29_01_world.sql
new file mode 100644
index 00000000000..cd46800c5dd
--- /dev/null
+++ b/sql/updates/world/2015_11_29_01_world.sql
@@ -0,0 +1,15 @@
+--
+DELETE FROM `creature_text` WHERE `entry` = 22293;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `TextRange`, `comment`, `BroadcastTextId`) VALUES
+(22293, 0, 0, "%s begins to sputter as its engine malfunctions.", 16, 0, 100, 0, 0, 0, 0, "Inactive Fel Reaver", 20103);
+
+-- Creature Script - Inactive Fel Reaver
+DELETE FROM `smart_scripts` WHERE (source_type = 0 AND entryorguid = 22293);
+DELETE FROM `smart_scripts` WHERE (source_type = 9 AND entryorguid = 2229300);
+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
+(22293, 0, 0, 0, 20, 0, 100, 0, 10850, 0, 0, 0, 80, 2229300, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Inactive Fel Reaver - On Quest complete - Action list'),
+(2229300, 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, 'Inactive Fel Reaver - Action list - Say text'),
+(2229300, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 83, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Inactive Fel Reaver - Action list - Remove npc flag'),
+(2229300, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 89, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Inactive Fel Reaver - Action list - Random Move'),
+(2229300, 9, 3, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 33, 22293, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Inactive Fel Reaver - Action list - Give Credit'),
+(2229300, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 51, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Inactive Fel Reaver - Action list - Kill Itself');
diff --git a/sql/updates/world/2015_12_01_00_world.sql b/sql/updates/world/2015_12_01_00_world.sql
new file mode 100644
index 00000000000..1572245a517
--- /dev/null
+++ b/sql/updates/world/2015_12_01_00_world.sql
@@ -0,0 +1,12 @@
+--
+-- Hallowed wand spell script names
+DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_hallow_end_wand';
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(24717, 'spell_hallow_end_wand'), -- Pirate Costume
+(24718, 'spell_hallow_end_wand'), -- Ninja Costume
+(24719, 'spell_hallow_end_wand'), -- Leper Gnome Costume
+(24720, 'spell_hallow_end_wand'), -- Random Costume
+(24724, 'spell_hallow_end_wand'), -- Skeleton Costume
+(24733, 'spell_hallow_end_wand'), -- Bat Costume
+(24737, 'spell_hallow_end_wand'), -- Ghost Costume
+(24741, 'spell_hallow_end_wand'); -- Wisp Costume
diff --git a/sql/updates/world/2015_12_04_00_world.sql b/sql/updates/world/2015_12_04_00_world.sql
new file mode 100644
index 00000000000..ee721273bef
--- /dev/null
+++ b/sql/updates/world/2015_12_04_00_world.sql
@@ -0,0 +1,34 @@
+--
+DELETE FROM `gameobject` WHERE `id`=185295;
+DELETE FROM `creature_text` WHERE `entry` IN (21514, 10204);
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `TextRange`, `comment`, `BroadcastTextId`) VALUES
+(10204, 0, 0, "Misha lets OUT a loud roar AS she rakes her claws AGAINST the gronn's altar.", 16, 0, 100, 0, 0, 0, 0, "Misha", 20261),
+(21514, 0, 0, "Who dares defile the altar of Gorgrom the Dragon-Eater?", 14, 0, 100, 0, 0, 0, 0, "Gorgrom the Dragon-Eater", 20262),
+(21514, 1, 0, "I will crush it and flay it and eat its meat and crack its bones one by one when I am done.", 14, 0, 100, 0, 0, 0, 0, "Gorgrom the Dragon-Eater", 20264);
+
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (21514, 10204);
+DELETE FROM `smart_scripts` WHERE source_type = 0 AND entryorguid IN (21514, 10204);
+DELETE FROM `smart_scripts` WHERE source_type = 9 AND entryorguid IN (2151400, 1020400);
+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
+(21514, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 80, 2151400, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gorgrom the Dragon-Eater - On Just summoned - Action list'),
+(2151400, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 18, 768, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gorgrom the Dragon-Eater - Action list - Set unit flag'),
+(2151400, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gorgrom the Dragon-Eater - Action list - Say text'),
+(2151400, 9, 2, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gorgrom the Dragon-Eater - Action list - Say text'),
+(2151400, 9, 3, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 3608.135986, 7183.374023, 139.581833, 2.321033, 'Gorgrom the Dragon-Eater - Action list - Move to pos'),
+(2151400, 9, 4, 0, 0, 0, 100, 0, 2500, 2500, 0, 0, 11, 35470, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gorgrom the Dragon-Eater - Action list - Cast explosion'),
+(2151400, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 50, 185295, 60, 0, 0, 0, 0, 8, 0, 0, 0, 3608.135986, 7183.374023, 139.581833, 2.321033, 'Gorgrom the Dragon-Eater - Action list - Summon Gorgrom corpse spell focus object'),
+(2151400, 9, 6, 0, 0, 0, 100, 0, 400, 400, 0, 0, 11, 58951, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gorgrom the Dragon-Eater - Action list - cast Permanent Feign Death'),
+(2151400, 9, 7, 0, 0, 0, 100, 0, 40000, 40000, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gorgrom the Dragon-Eater - Action list - Despawn'),
+(10204, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 80, 1020400, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Misha - On Just summoned - Action list'),
+(1020400, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 18, 768, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Misha - Action list - Set unit flag'),
+(1020400, 9, 1, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Misha - Action list - Say text'),
+(1020400, 9, 2, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 3612.911865, 7193.020508, 139.651291, 5.472856, 'Misha - Action list - Move to pos'),
+(1020400, 9, 3, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 3612.911865, 7193.020508, 139.651291, 5.472856, 'Misha - Action list - Set Orientation'),
+(1020400, 9, 4, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Misha - Action list - Despawn');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry` IN (39264, 39220);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(17, 0, 39264, 0, 0, 29, 1, 21514, 30, 0, 1, 0, 0, '', "Sablemane's Trap Require Gorgrom the Dragon-Eater not around"),
+(17, 0, 39220, 0, 0, 29, 1, 21514, 30, 0, 1, 0, 0, '', "Sablemane's Trap Require Gorgrom the Dragon-Eater not around"),
+(17, 0, 39264, 0, 0, 28, 0, 10802, 0, 0, 1, 0, 0, '', "Sablemane's Trap RequireGorgrom the Dragon-Eater not Completed"),
+(17, 0, 39220, 0, 0, 28, 0, 10723, 0, 0, 1, 0, 0, '', "Sablemane's Trap RequireGorgrom the Dragon-Eater not Completed");
diff --git a/sql/updates/world/2015_12_05_00_world.sql b/sql/updates/world/2015_12_05_00_world.sql
new file mode 100644
index 00000000000..c2c90164a4f
--- /dev/null
+++ b/sql/updates/world/2015_12_05_00_world.sql
@@ -0,0 +1,8 @@
+--
+SET @TATJANA := 27627;
+DELETE FROM `smart_scripts` WHERE `entryorguid`IN (27627) 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
+(@TATJANA,0,0,1,8,0,100,0,49134,0,0,0,11,49135,2,0,0,0,0,1,0,0,0,0,0,0,0,'Tatjana - On spellhit Tranquilizer Dart - Spellcast Tatjana Ping'),
+(@TATJANA,0,1,2,61,0,100,0,0,0,0,0,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,'Tatjana - On spellhit Tranquilizer Dart - Set faction'),
+(@TATJANA,0,2,0,61,0,100,0,0,0,0,0,20,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Tatjana - On Spellhit \'Tranquilizer Dart\' - Stop Attack'),
+(@TATJANA,0,3,0,0,0,100,0,2000,6000,9000,12000,11,32009,0,0,0,0,0,2,0,0,0,0,0,0,0,'Tatjana - On update IC - Spellcast Cutdown');
diff --git a/sql/updates/world/2015_12_06_00_world.sql b/sql/updates/world/2015_12_06_00_world.sql
new file mode 100644
index 00000000000..b60d4d3e88c
--- /dev/null
+++ b/sql/updates/world/2015_12_06_00_world.sql
@@ -0,0 +1,35 @@
+--
+UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry`=11956;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid`=11956 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
+(11956, 0, 0, 0, 62, 0, 100, 0, 3884, 0, 0, 0, 15, 5930, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Great Bear Spirit - On Gossip Select - Quest explored'),
+(11956, 0, 1, 0, 62, 0, 100, 0, 3884, 1, 0, 0, 15, 5929, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Great Bear Spirit - On Gossip Select - Quest explored');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=3884;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(15,3884,0,0,9,5930,0,0,0,0,'','Show the gossip option if the quest 5930 is taken'),
+(15,3884,1,0,9,5929,0,0,0,0,'','Show the gossip option if the quest 5929 is taken');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=3882;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`Comment`) VALUES
+(14,3882,4719,0,9,5929,0,0,0,"Only show text_id 4719 if the quest 5929 is taken"),
+(14,3882,4719,1,9,5930,0,0,0,"Only show text_id 4719 if the quest 5930 is taken");
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=3882;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(15,3882,0,0,9,5930,0,0,0,0,'','Show the gossip option if the quest 5930 is taken'),
+(15,3882,0,1,9,5929,0,0,0,0,'','Show the gossip option if the quest 5929 is taken');
+
+DELETE FROM `gossip_menu` WHERE `entry`=3882 AND `text_id`=4719;
+INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES (3882, 4719);
+
+DELETE FROM `gossip_menu` WHERE `entry`=3882 AND `text_id`=4719;
+INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES (3882, 4719);
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (3881, 3882, 3883, 3884);
+INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`OptionBroadcastTextID`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`,`BoxBroadcastTextID`) VALUES
+(3882,0,0,'What do you represent, spirit?',7439,1,1,3881,0,0,0,'',0),
+(3881,0,0,'I seek to understand the importance of strength of the body.',7442,1,1,3883,0,0,0,'',0),
+(3883,0,0,'I seek to understand the importance of strength of the heart.',7444,1,1,3884,0,0,0,'',0),
+(3884,0,0,'I have heard your words, Great Bear Spirit, and I understand. I now seek your blessings to fully learn the way of the Claw.',7446,1,1,3885,0,0,0,'',0),
+(3884,1,0,'I have heard your words, Great Bear Spirit, and I understand. I now seek your blessings to fully learn the way of the Claw.',7446,1,1,3885,0,0,0,'',0);
diff --git a/sql/updates/world/2015_12_08_00_world_335.sql b/sql/updates/world/2015_12_08_00_world_335.sql
new file mode 100644
index 00000000000..e742130b1a4
--- /dev/null
+++ b/sql/updates/world/2015_12_08_00_world_335.sql
@@ -0,0 +1,15 @@
+--
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (2562) AND `id`=1;
+INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`OptionBroadcastTextID`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`,`BoxBroadcastTextID`) VALUES
+(2562,1,0,"Gubber, I don't know how to fish.",5529,1,1,0,0,0,0,'',0);
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=2562;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(15,2562,1,0,9,1141,0,0,0,0,'','Show the gossip option if the quest 1141 is taken'),
+(15,2562,1,0,25,7620,0,0,1,0,'','Show the gossip option if Fishing is not learned');
+
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=10216;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=10216 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
+(10216, 0, 0, 1, 62, 0, 100, 0, 2562, 1, 0, 0, 85, 7733, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Gubber Blump- On Gossip Select - Cast Fishing'),
+(10216, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Gubber Blump- On Gossip Select - Close gossip');
diff --git a/sql/updates/world/2015_12_08_01_world.sql b/sql/updates/world/2015_12_08_01_world.sql
new file mode 100644
index 00000000000..9e24acd91db
--- /dev/null
+++ b/sql/updates/world/2015_12_08_01_world.sql
@@ -0,0 +1,2 @@
+--
+UPDATE `smart_scripts` SET `event_param2`=7 WHERE `entryorguid` IN (34146, 34150, 34151) AND `source_type`=0 AND `id`=0;
diff --git a/sql/updates/world/2015_10_09_maexxna.sql b/sql/updates/world/2015_12_08_02_world.sql
index 375d0941adb..375d0941adb 100644
--- a/sql/updates/world/2015_10_09_maexxna.sql
+++ b/sql/updates/world/2015_12_08_02_world.sql
diff --git a/src/server/database/Database/DatabaseLoader.cpp b/src/server/database/Database/DatabaseLoader.cpp
index 69e212cf7e1..39719e4c6a1 100644
--- a/src/server/database/Database/DatabaseLoader.cpp
+++ b/src/server/database/Database/DatabaseLoader.cpp
@@ -37,14 +37,14 @@ DatabaseLoader& DatabaseLoader::AddDatabase(DatabaseWorkerPool<T>& pool, std::st
std::string const dbString = sConfigMgr->GetStringDefault(name + "DatabaseInfo", "");
if (dbString.empty())
{
- TC_LOG_ERROR(_logger.c_str(), "Database %s not specified in configuration file!", name.c_str());
+ TC_LOG_ERROR(_logger, "Database %s not specified in configuration file!", name.c_str());
return false;
}
uint8 const asyncThreads = uint8(sConfigMgr->GetIntDefault(name + "Database.WorkerThreads", 1));
if (asyncThreads < 1 || asyncThreads > 32)
{
- TC_LOG_ERROR(_logger.c_str(), "%s database: invalid number of worker threads specified. "
+ TC_LOG_ERROR(_logger, "%s database: invalid number of worker threads specified. "
"Please pick a value between 1 and 32.", name.c_str());
return false;
}
@@ -85,7 +85,7 @@ DatabaseLoader& DatabaseLoader::AddDatabase(DatabaseWorkerPool<T>& pool, std::st
{
if (!DBUpdater<T>::Populate(pool))
{
- TC_LOG_ERROR(_logger.c_str(), "Could not populate the %s database, see log for details.", name.c_str());
+ TC_LOG_ERROR(_logger, "Could not populate the %s database, see log for details.", name.c_str());
return false;
}
return true;
@@ -95,7 +95,7 @@ DatabaseLoader& DatabaseLoader::AddDatabase(DatabaseWorkerPool<T>& pool, std::st
{
if (!DBUpdater<T>::Update(pool))
{
- TC_LOG_ERROR(_logger.c_str(), "Could not update the %s database, see log for details.", name.c_str());
+ TC_LOG_ERROR(_logger, "Could not update the %s database, see log for details.", name.c_str());
return false;
}
return true;
@@ -106,7 +106,7 @@ DatabaseLoader& DatabaseLoader::AddDatabase(DatabaseWorkerPool<T>& pool, std::st
{
if (!pool.PrepareStatements())
{
- TC_LOG_ERROR(_logger.c_str(), "Could not prepare statements of the %s database, see log for details.", name.c_str());
+ TC_LOG_ERROR(_logger, "Could not prepare statements of the %s database, see log for details.", name.c_str());
return false;
}
return true;
diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
index 7b145268d22..9a6742b5ebc 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
@@ -97,7 +97,6 @@ bool SummonList::HasEntry(uint32 entry) const
}
ScriptedAI::ScriptedAI(Creature* creature) : CreatureAI(creature),
- me(creature),
IsFleeing(false),
_evadeCheckCooldown(2500),
_isCombatMovementAllowed(true)
diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.h b/src/server/game/AI/ScriptedAI/ScriptedCreature.h
index 7d7811d9e75..242acbcd44d 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedCreature.h
+++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.h
@@ -184,9 +184,6 @@ struct ScriptedAI : public CreatureAI
// Variables
// *************
- //Pointer to creature we are manipulating
- Creature* me;
-
//For fleeing
bool IsFleeing;
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index a1703dfa78f..7ca4274bc40 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -979,7 +979,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
{
if (me && !me->isDead())
{
- me->Kill(me);
+ me->KillSelf();
TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction: SMART_ACTION_DIE: Creature %u", me->GetGUID().GetCounter());
}
break;
@@ -1249,7 +1249,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (!IsUnit(*itr))
continue;
- (*itr)->ToUnit()->Kill((*itr)->ToUnit());
+ (*itr)->ToUnit()->KillSelf();
}
delete targets;
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp
index 8e8c640ccf7..bae400adcc2 100644
--- a/src/server/game/Conditions/ConditionMgr.cpp
+++ b/src/server/game/Conditions/ConditionMgr.cpp
@@ -89,7 +89,7 @@ ConditionMgr::ConditionTypeInfo const ConditionMgr::StaticConditionTypeData[COND
{ "PhaseMask", true, false, false },
{ "Level", true, true, false },
{ "Quest Completed", true, false, false },
- { "Near Creature", true, true, false },
+ { "Near Creature", true, true, true },
{ "Near GameObject", true, true, false },
{ "Object Entry or Guid", true, true, true },
{ "Object TypeMask", true, false, false },
@@ -280,7 +280,7 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo) const
}
case CONDITION_NEAR_CREATURE:
{
- condMeets = GetClosestCreatureWithEntry(object, ConditionValue1, (float)ConditionValue2) ? true : false;
+ condMeets = GetClosestCreatureWithEntry(object, ConditionValue1, (float)ConditionValue2, bool(!ConditionValue3)) ? true : false;
break;
}
case CONDITION_NEAR_GAMEOBJECT:
diff --git a/src/server/game/Conditions/ConditionMgr.h b/src/server/game/Conditions/ConditionMgr.h
index 81fe379f0db..43454aba049 100644
--- a/src/server/game/Conditions/ConditionMgr.h
+++ b/src/server/game/Conditions/ConditionMgr.h
@@ -59,7 +59,7 @@ enum ConditionTypes
CONDITION_PHASEMASK = 26, // phasemask 0 0 true if object is in phasemask
CONDITION_LEVEL = 27, // level ComparisonType 0 true if unit's level is equal to param1 (param2 can modify the statement)
CONDITION_QUEST_COMPLETE = 28, // quest_id 0 0 true if player has quest_id with all objectives complete, but not yet rewarded
- CONDITION_NEAR_CREATURE = 29, // creature entry distance 0 true if there is a creature of entry in range
+ CONDITION_NEAR_CREATURE = 29, // creature entry distance dead (0/1) true if there is a creature of entry in range
CONDITION_NEAR_GAMEOBJECT = 30, // gameobject entry distance 0 true if there is a gameobject of entry in range
CONDITION_OBJECT_ENTRY_GUID = 31, // TypeID entry guid true if object is type TypeID and the entry is 0 or matches entry of the object or matches guid of the object
CONDITION_TYPE_MASK = 32, // TypeMask 0 0 true if object is type object's TypeMask matches provided TypeMask
diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp
index 0121194e327..a399600d2f2 100644
--- a/src/server/game/Entities/Pet/Pet.cpp
+++ b/src/server/game/Entities/Pet/Pet.cpp
@@ -52,7 +52,7 @@ Pet::Pet(Player* owner, PetType type) :
}
m_name = "Pet";
- m_regenTimer = PET_FOCUS_REGEN_INTERVAL;
+ m_focusRegenTimer = PET_FOCUS_REGEN_INTERVAL;
}
Pet::~Pet()
@@ -589,22 +589,22 @@ void Pet::Update(uint32 diff)
}
//regenerate focus for hunter pets or energy for deathknight's ghoul
- if (m_regenTimer)
+ if (m_focusRegenTimer)
{
- if (m_regenTimer > diff)
- m_regenTimer -= diff;
+ if (m_focusRegenTimer > diff)
+ m_focusRegenTimer -= diff;
else
{
switch (getPowerType())
{
case POWER_FOCUS:
Regenerate(POWER_FOCUS);
- m_regenTimer += PET_FOCUS_REGEN_INTERVAL - diff;
- if (!m_regenTimer) ++m_regenTimer;
+ m_focusRegenTimer += PET_FOCUS_REGEN_INTERVAL - diff;
+ if (!m_focusRegenTimer) ++m_focusRegenTimer;
// Reset if large diff (lag) causes focus to get 'stuck'
- if (m_regenTimer > PET_FOCUS_REGEN_INTERVAL)
- m_regenTimer = PET_FOCUS_REGEN_INTERVAL;
+ if (m_focusRegenTimer > PET_FOCUS_REGEN_INTERVAL)
+ m_focusRegenTimer = PET_FOCUS_REGEN_INTERVAL;
break;
@@ -615,7 +615,7 @@ void Pet::Update(uint32 diff)
// if (!m_regenTimer) ++m_regenTimer;
// break;
default:
- m_regenTimer = 0;
+ m_focusRegenTimer = 0;
break;
}
}
diff --git a/src/server/game/Entities/Pet/Pet.h b/src/server/game/Entities/Pet/Pet.h
index 85c1f83d4a7..c8e95a06a2c 100644
--- a/src/server/game/Entities/Pet/Pet.h
+++ b/src/server/game/Entities/Pet/Pet.h
@@ -152,7 +152,7 @@ class Pet : public Guardian
int32 m_duration; // time until unsummon (used mostly for summoned guardians and not used for controlled pets)
uint64 m_auraRaidUpdateMask;
bool m_loading;
- uint32 m_regenTimer;
+ uint32 m_focusRegenTimer;
DeclinedName *m_declinedname;
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 58a9626776b..aa9cd9fa045 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -23833,7 +23833,7 @@ void Player::SetViewpoint(WorldObject* target, bool apply)
// farsight dynobj or puppet may be very far away
UpdateVisibilityOf(target);
- if (target->isType(TYPEMASK_UNIT) && !GetVehicle())
+ if (target->isType(TYPEMASK_UNIT) && target != GetVehicleBase())
((Unit*)target)->AddPlayerToVision(this);
}
else
@@ -23846,7 +23846,7 @@ void Player::SetViewpoint(WorldObject* target, bool apply)
return;
}
- if (target->isType(TYPEMASK_UNIT) && !GetVehicle())
+ if (target->isType(TYPEMASK_UNIT) && target != GetVehicleBase())
((Unit*)target)->RemovePlayerFromVision(this);
//must immediately set seer back otherwise may crash
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 63de39f570a..277ead92df7 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -7475,8 +7475,8 @@ bool Unit::HandleAuraProc(Unit* victim, uint32 damage, Aura* triggeredByAura, Sp
uint32 stack = triggeredByAura->GetStackAmount();
int32 const mod = (GetMap()->GetSpawnMode() & 1) ? 1500 : 1250;
int32 dmg = 0;
- for (uint8 i = 1; i < stack; ++i)
- dmg += mod * stack;
+ for (uint8 i = 1; i <= stack; ++i)
+ dmg += mod * i;
if (Unit* caster = triggeredByAura->GetCaster())
caster->CastCustomSpell(70701, SPELLVALUE_BASE_POINT0, dmg);
break;
@@ -8291,6 +8291,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
case 15337: // Improved Spirit Tap (Rank 1)
case 15338: // Improved Spirit Tap (Rank 2)
{
+ ASSERT(procSpell);
if (procSpell->SpellFamilyFlags[0] & 0x800000)
if ((procSpell->Id != 58381) || !roll_chance_i(50))
return false;
@@ -8552,7 +8553,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
// try detect target manually if not set
if (target == NULL)
- target = !(procFlags & (PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_POS | PROC_FLAG_DONE_SPELL_NONE_DMG_CLASS_POS)) && triggerEntry && triggerEntry->IsPositive() ? this : victim;
+ target = !(procFlags & (PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_POS | PROC_FLAG_DONE_SPELL_NONE_DMG_CLASS_POS)) && triggerEntry->IsPositive() ? this : victim;
if (basepoints0)
CastCustomSpell(target, trigger_spell_id, &basepoints0, NULL, NULL, true, castItem, triggeredByAura);
@@ -9648,7 +9649,7 @@ Unit* Unit::GetMagicHitRedirectTarget(Unit* victim, SpellInfo const* spellInfo)
&& _IsValidAttackTarget(magnet, spellInfo))
{
/// @todo handle this charge drop by proc in cast phase on explicit target
- if (victim && spellInfo->Speed > 0.0f)
+ if (spellInfo->Speed > 0.0f)
{
// Set up missile speed based delay
uint32 delay = uint32(std::floor(std::max<float>(victim->GetDistance(this), 5.0f) / spellInfo->Speed * 1000.0f));
@@ -13788,7 +13789,7 @@ void CharmInfo::InitPossessCreateSpells()
break;
}
- for (uint32 i = 0; i < CREATURE_MAX_SPELLS; ++i)
+ for (uint8 i = 0; i < CREATURE_MAX_SPELLS; ++i)
{
uint32 spellId = _unit->ToCreature()->m_spells[i];
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
@@ -13797,7 +13798,7 @@ void CharmInfo::InitPossessCreateSpells()
if (spellInfo->IsPassive())
_unit->CastSpell(_unit, spellInfo, true);
else
- AddSpellToActionBar(spellInfo, ACT_PASSIVE);
+ AddSpellToActionBar(spellInfo, ACT_PASSIVE, i % MAX_UNIT_ACTION_BAR_INDEX);
}
}
}
@@ -13855,11 +13856,12 @@ void CharmInfo::InitCharmCreateSpells()
}
}
-bool CharmInfo::AddSpellToActionBar(SpellInfo const* spellInfo, ActiveStates newstate)
+bool CharmInfo::AddSpellToActionBar(SpellInfo const* spellInfo, ActiveStates newstate, uint8 preferredSlot)
{
uint32 spell_id = spellInfo->Id;
uint32 first_id = spellInfo->GetFirstRankSpell()->Id;
+ ASSERT(preferredSlot < MAX_UNIT_ACTION_BAR_INDEX);
// new spell rank can be already listed
for (uint8 i = 0; i < MAX_UNIT_ACTION_BAR_INDEX; ++i)
{
@@ -13876,9 +13878,10 @@ bool CharmInfo::AddSpellToActionBar(SpellInfo const* spellInfo, ActiveStates new
// or use empty slot in other case
for (uint8 i = 0; i < MAX_UNIT_ACTION_BAR_INDEX; ++i)
{
- if (!PetActionBar[i].GetAction() && PetActionBar[i].IsActionBarForSpell())
+ uint8 j = (preferredSlot + i) % MAX_UNIT_ACTION_BAR_INDEX;
+ if (!PetActionBar[j].GetAction() && PetActionBar[j].IsActionBarForSpell())
{
- SetActionBar(i, spell_id, newstate == ACT_DECIDE ? spellInfo->IsAutocastable() ? ACT_DISABLED : ACT_PASSIVE : newstate);
+ SetActionBar(j, spell_id, newstate == ACT_DECIDE ? spellInfo->IsAutocastable() ? ACT_DISABLED : ACT_PASSIVE : newstate);
return true;
}
}
@@ -16039,7 +16042,7 @@ void Unit::RemoveCharmedBy(Unit* charmer)
// Vehicle should not attack its passenger after he exists the seat
if (type != CHARM_TYPE_VEHICLE)
- LastCharmerGUID = charmer->GetGUID();
+ LastCharmerGUID = ASSERT_NOTNULL(charmer)->GetGUID();
}
// If charmer still exists
diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h
index 2500f327849..2ddbe398f76 100644
--- a/src/server/game/Entities/Unit/Unit.h
+++ b/src/server/game/Entities/Unit/Unit.h
@@ -898,6 +898,12 @@ public:
uint32 GetHitMask() const { return _hitMask; }
SpellInfo const* GetSpellInfo() const { return NULL; }
+ SpellInfo const* EnsureSpellInfo() const
+ {
+ SpellInfo const* spellInfo = GetSpellInfo();
+ ASSERT(spellInfo);
+ return spellInfo;
+ }
SpellSchoolMask GetSchoolMask() const { return SPELL_SCHOOL_MASK_NONE; }
DamageInfo* GetDamageInfo() const { return _damageInfo; }
@@ -1119,7 +1125,7 @@ struct CharmInfo
void InitEmptyActionBar(bool withAttack = true);
//return true if successful
- bool AddSpellToActionBar(SpellInfo const* spellInfo, ActiveStates newstate = ACT_DECIDE);
+ bool AddSpellToActionBar(SpellInfo const* spellInfo, ActiveStates newstate = ACT_DECIDE, uint8 preferredSlot = 0);
bool RemoveSpellFromActionBar(uint32 spell_id);
void LoadPetActionBar(const std::string& data);
void BuildActionBar(WorldPacket* data);
@@ -1395,6 +1401,7 @@ class Unit : public WorldObject
void DealDamageMods(Unit* victim, uint32 &damage, uint32* absorb);
uint32 DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDamage = NULL, DamageEffectType damagetype = DIRECT_DAMAGE, SpellSchoolMask damageSchoolMask = SPELL_SCHOOL_MASK_NORMAL, SpellInfo const* spellProto = NULL, bool durabilityLoss = true);
void Kill(Unit* victim, bool durabilityLoss = true);
+ void KillSelf(bool durabilityLoss = true) { Kill(this, durabilityLoss); }
int32 DealHeal(Unit* victim, uint32 addhealth);
void ProcDamageAndSpell(Unit* victim, uint32 procAttacker, uint32 procVictim, uint32 procEx, uint32 amount, WeaponAttackType attType = BASE_ATTACK, SpellInfo const* procSpell = NULL, SpellInfo const* procAura = NULL);
diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp
index 5f500156f58..4f8accee69c 100644
--- a/src/server/game/Groups/Group.cpp
+++ b/src/server/game/Groups/Group.cpp
@@ -539,7 +539,7 @@ bool Group::RemoveMember(ObjectGuid guid, const RemoveMethod& method /*= GROUP_R
}
// Reevaluate group enchanter if the leaving player had enchanting skill or the player is offline
- if ((player && player->GetSkillValue(SKILL_ENCHANTING)) || !player)
+ if (!player || player->GetSkillValue(SKILL_ENCHANTING))
ResetMaxEnchantingLevel();
// Remove player from loot rolls
diff --git a/src/server/game/Handlers/GroupHandler.cpp b/src/server/game/Handlers/GroupHandler.cpp
index 30764fea2a3..9f225df8427 100644
--- a/src/server/game/Handlers/GroupHandler.cpp
+++ b/src/server/game/Handlers/GroupHandler.cpp
@@ -991,7 +991,7 @@ void WorldSession::HandleRequestPartyMemberStatsOpcode(WorldPacket &recvData)
data.put<uint64>(maskPos, auraMask); // GROUP_UPDATE_FLAG_AURAS
if (updateFlags & GROUP_UPDATE_FLAG_PET_GUID)
- data << uint64(pet->GetGUID());
+ data << uint64(ASSERT_NOTNULL(pet)->GetGUID());
data << std::string(pet ? pet->GetName() : ""); // GROUP_UPDATE_FLAG_PET_NAME
data << uint16(pet ? pet->GetDisplayId() : 0); // GROUP_UPDATE_FLAG_PET_MODEL_ID
diff --git a/src/server/game/Quests/QuestDef.cpp b/src/server/game/Quests/QuestDef.cpp
index 58bc4915d3f..a3f662f2ade 100644
--- a/src/server/game/Quests/QuestDef.cpp
+++ b/src/server/game/Quests/QuestDef.cpp
@@ -127,6 +127,18 @@ Quest::Quest(Field* questRecord)
for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
if (RewardChoiceItemId[i])
++_rewChoiceItemsCount;
+
+ for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
+ DetailsEmote[i] = 0;
+
+ for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
+ DetailsEmoteDelay[i] = 0;
+
+ for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
+ OfferRewardEmote[i] = 0;
+
+ for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
+ OfferRewardEmoteDelay[i] = 0;
}
void Quest::LoadQuestDetails(Field* fields)
diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp
index 1ccd6a4151f..6ae63f2efa3 100644
--- a/src/server/game/Server/WorldSession.cpp
+++ b/src/server/game/Server/WorldSession.cpp
@@ -858,9 +858,8 @@ void WorldSession::ReadMovementInfo(WorldPacket &data, MovementInfo* mi)
// MOVEMENTFLAG_ROOT + MOVEMENTFLAG_PITCH_UP (0x840)
// MOVEMENTFLAG_ROOT + MOVEMENTFLAG_PITCH_DOWN (0x880)
// If none of these are true, clear the root
- if (mi->HasMovementFlag(MOVEMENTFLAG_ROOT) && mi->HasMovementFlag(MOVEMENTFLAG_LEFT | MOVEMENTFLAG_RIGHT | MOVEMENTFLAG_PITCH_UP | MOVEMENTFLAG_PITCH_DOWN))
- REMOVE_VIOLATING_FLAGS(mi->HasMovementFlag(MOVEMENTFLAG_ROOT),
- MOVEMENTFLAG_MASK_MOVING);
+ REMOVE_VIOLATING_FLAGS(mi->HasMovementFlag(MOVEMENTFLAG_ROOT) && mi->HasMovementFlag(MOVEMENTFLAG_LEFT | MOVEMENTFLAG_RIGHT | MOVEMENTFLAG_PITCH_UP | MOVEMENTFLAG_PITCH_DOWN),
+ MOVEMENTFLAG_MASK_MOVING);
}
else
{
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index 200e16a9666..01f27a38e9c 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -5562,7 +5562,7 @@ void AuraEffect::HandlePeriodicTriggerSpellAuraTick(Unit* target, Unit* caster)
case 31347:
{
target->CastSpell(target, 31350, true, NULL, this);
- target->Kill(target);
+ target->KillSelf();
return;
}
// Spellcloth
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index b345c5affea..b3ab72dcbff 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -5638,7 +5638,7 @@ void Spell::EffectGameObjectDamage(SpellEffIndex /*effIndex*/)
FactionTemplateEntry const* casterFaction = caster->GetFactionTemplateEntry();
FactionTemplateEntry const* targetFaction = sFactionTemplateStore.LookupEntry(gameObjTarget->GetUInt32Value(GAMEOBJECT_FACTION));
// Do not allow to damage GO's of friendly factions (ie: Wintergrasp Walls/Ulduar Storm Beacons)
- if ((casterFaction && targetFaction && !casterFaction->IsFriendlyTo(*targetFaction)) || !targetFaction)
+ if (!targetFaction || (casterFaction && targetFaction && !casterFaction->IsFriendlyTo(*targetFaction)))
gameObjTarget->ModifyHealth(-damage, caster, GetSpellInfo()->Id);
}
diff --git a/src/server/game/Spells/SpellHistory.cpp b/src/server/game/Spells/SpellHistory.cpp
index ed5c31c25c6..faad54d0af7 100644
--- a/src/server/game/Spells/SpellHistory.cpp
+++ b/src/server/game/Spells/SpellHistory.cpp
@@ -695,9 +695,7 @@ void SpellHistory::RestoreCooldownStateAfterDuel()
// check for spell with onHold active before and during the duel
for (auto itr = _spellCooldownsBeforeDuel.begin(); itr != _spellCooldownsBeforeDuel.end(); ++itr)
{
- if (!itr->second.OnHold &&
- _spellCooldowns.find(itr->first) != _spellCooldowns.end() &&
- !_spellCooldowns[itr->first].OnHold)
+ if (!itr->second.OnHold && !_spellCooldowns[itr->first].OnHold)
_spellCooldowns[itr->first] = _spellCooldownsBeforeDuel[itr->first];
}
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 019b9e6f4d5..2d990ad3ed2 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -969,10 +969,10 @@ bool SpellMgr::CanSpellTriggerProcOnEvent(SpellProcEntry const& procEntry, ProcE
// check spell family name/flags (if set) for spells
if (eventInfo.GetTypeMask() & (PERIODIC_PROC_FLAG_MASK | SPELL_PROC_FLAG_MASK | PROC_FLAG_DONE_TRAP_ACTIVATION))
{
- if (procEntry.spellFamilyName && eventInfo.GetSpellInfo() && (procEntry.spellFamilyName != eventInfo.GetSpellInfo()->SpellFamilyName))
+ if (procEntry.spellFamilyName && eventInfo.GetSpellInfo() && (procEntry.spellFamilyName != eventInfo.EnsureSpellInfo()->SpellFamilyName))
return false;
- if (procEntry.spellFamilyMask && eventInfo.GetSpellInfo() && !(procEntry.spellFamilyMask & eventInfo.GetSpellInfo()->SpellFamilyFlags))
+ if (procEntry.spellFamilyMask && eventInfo.GetSpellInfo() && !(procEntry.spellFamilyMask & eventInfo.EnsureSpellInfo()->SpellFamilyFlags))
return false;
}
@@ -2923,6 +2923,11 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->Speed = SPEED_CHARGE;
break;
}
+
+ // Passive talent auras cannot target pets
+ if (spellInfo->IsPassive() && GetTalentSpellCost(i))
+ if (spellInfo->Effects[j].TargetA.GetTarget() == TARGET_UNIT_PET)
+ spellInfo->Effects[j].TargetA = SpellImplicitTargetInfo(TARGET_UNIT_CASTER);
}
if (spellInfo->ActiveIconID == 2158) // flight
diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp
index 9f75d917aea..034fe96306e 100644
--- a/src/server/game/Texts/CreatureTextMgr.cpp
+++ b/src/server/game/Texts/CreatureTextMgr.cpp
@@ -293,7 +293,7 @@ uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, WorldObject
SendChatPacket(finalSource, builder, finalType, whisperTarget, range, team, gmOnly);
}
- if (isEqualChanced || (!isEqualChanced && totalChance == 100.0f))
+ if (isEqualChanced || totalChance == 100.0f)
SetRepeatId(source, textGroup, iter->id);
return iter->duration;
diff --git a/src/server/scripts/Commands/cs_wp.cpp b/src/server/scripts/Commands/cs_wp.cpp
index b35e71dbd50..30ee8254f72 100644
--- a/src/server/scripts/Commands/cs_wp.cpp
+++ b/src/server/scripts/Commands/cs_wp.cpp
@@ -374,6 +374,12 @@ public:
if (show == "del")
{
+ if (!arg_id)
+ {
+ handler->SendSysMessage("|cffff33ffERROR: Waypoint script guid not present.|r");
+ return true;
+ }
+
id = atoi(arg_id);
stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_WAYPOINT_SCRIPT_ID_BY_GUID);
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
index 0b5c3302890..96c7c5d8102 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
@@ -108,7 +108,7 @@ public:
{
Talk(SAY_DEATH);
if (Unit* midnight = ObjectAccessor::GetUnit(*me, Midnight))
- midnight->Kill(midnight);
+ midnight->KillSelf();
}
void UpdateAI(uint32 diff) override;
@@ -264,7 +264,7 @@ void boss_attumen::boss_attumenAI::UpdateAI(uint32 diff)
}
Midnight.Clear();
me->SetVisible(false);
- me->Kill(me);
+ me->KillSelf();
} else ResetTimer -= diff;
}
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp
index 0abba3dfff4..d11c4a6e584 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp
@@ -295,7 +295,7 @@ public:
{
Unit* axe = ObjectAccessor::GetUnit(*me, axes[i]);
if (axe && axe->IsAlive())
- axe->Kill(axe);
+ axe->KillSelf();
axes[i].Clear();
}
}
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
index a95ac9aaa20..e4cc7c0e84a 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
@@ -473,7 +473,7 @@ public:
if (FlameStrikeTimer <= diff)
{
DoCast(me, SPELL_FLAMESTRIKE1_NORMAL, true);
- me->Kill(me);
+ me->KillSelf();
} else FlameStrikeTimer -= diff;
}
};
@@ -636,7 +636,7 @@ public:
if (HatchTimer <= diff)
{
me->SummonCreature(CREATURE_PHOENIX, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000);
- me->Kill(me);
+ me->KillSelf();
} else HatchTimer -= diff;
}
};
@@ -675,7 +675,7 @@ public:
void UpdateAI(uint32 diff) override
{
if (DespawnTimer <= diff)
- me->Kill(me);
+ me->KillSelf();
else
DespawnTimer -= diff;
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
index f57de5316ab..480fd8848f5 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
@@ -139,7 +139,7 @@ class boss_selin_fireheart : public CreatureScript
for (Creature* crystal : Crystals)
{
if (crystal && crystal->IsAlive())
- crystal->Kill(crystal);
+ crystal->KillSelf();
}
}
@@ -218,7 +218,7 @@ class boss_selin_fireheart : public CreatureScript
Creature* CrystalChosen = ObjectAccessor::GetCreature(*me, CrystalGUID);
if (CrystalChosen && CrystalChosen->IsAlive())
- CrystalChosen->Kill(CrystalChosen);
+ CrystalChosen->KillSelf();
CrystalGUID.Clear();
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
index 2714d65774f..ce8b094bb83 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
@@ -1218,7 +1218,7 @@ public:
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiLichKingGUID)) // Lich king disappears here
{
temp->AI()->Talk(EMOTE_LIGHT_OF_DAWN17);
- temp->Kill(temp);
+ temp->KillSelf();
}
JumpToNextStep(10000);
break;
@@ -1633,7 +1633,7 @@ public:
if (temp->IsAlive())
{
temp->SetVisible(false);
- temp->Kill(temp);
+ temp->KillSelf();
}
}
};
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
index a78ad740c97..bac4e450a03 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
@@ -359,8 +359,8 @@ public:
{
die = false;
if (Unit* body = ObjectAccessor::GetUnit(*me, bodyGUID))
- body->Kill(body);
- me->Kill(me);
+ body->KillSelf();
+ me->KillSelf();
}
else wait -= diff;
}
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp
index ed9f7ccb6dd..c41b1d87d61 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp
@@ -121,7 +121,7 @@ class instance_scarlet_monastery : public InstanceMapScript
{
Creature* add = instance->GetCreature(guid);
if (add && add->IsAlive())
- add->Kill(add);
+ add->KillSelf();
}
HorsemanAdds.clear();
HandleGameObject(PumpkinShrineGUID, false);
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp
index ba99df8cdd5..60dd27eed90 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp
@@ -170,7 +170,7 @@ public:
{
if (Player* player = temp->ToPlayer())
player->KilledMonsterCredit(NPC_RESTLESS, me->GetGUID());
- me->Kill(me);
+ me->KillSelf();
}
}
else
@@ -248,7 +248,7 @@ public:
if (Tagged)
{
if (Die_Timer <= diff)
- me->Kill(me);
+ me->KillSelf();
else Die_Timer -= diff;
}
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp
index 31ca716e0fb..77e0e680f4a 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp
@@ -698,7 +698,7 @@ public:
if (KillTimer <= diff)
{
- me->Kill(me);
+ me->KillSelf();
KillTimer = 9999999;
} else KillTimer -= diff;
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
index 4d544ccdeab..e3deac506b0 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
@@ -1112,7 +1112,7 @@ public:
else if (me->IsWithinDistInMap(me->GetVictim(), 3)) // Explode if it's close enough to it's target
{
DoCastVictim(SPELL_FELFIRE_FISSION);
- me->Kill(me);
+ me->KillSelf();
}
}
};
@@ -1172,7 +1172,7 @@ public:
uiTimer = 5000;
break;
case 3:
- me->Kill(me);
+ me->KillSelf();
me->RemoveCorpse();
break;
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp
index 254e3a41d6b..d0a9b233454 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp
@@ -235,7 +235,7 @@ public:
if (AnetheronGUID)
{
Creature* boss = ObjectAccessor::GetCreature(*me, AnetheronGUID);
- if (!boss || (boss && boss->isDead()))
+ if (!boss || boss->isDead())
{
me->setDeathState(JUST_DIED);
me->RemoveCorpse();
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp
index 08942e3393f..8bfdee067b2 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp
@@ -200,7 +200,6 @@ public:
CrippleTimer = 50000;
WarstompTimer = 10000;
CheckTimer = 5000;
- instance = creature->GetInstanceScript();
AzgalorGUID = instance->GetGuidData(DATA_AZGALOR);
}
@@ -208,7 +207,6 @@ public:
uint32 WarstompTimer;
uint32 CheckTimer;
ObjectGuid AzgalorGUID;
- InstanceScript* instance;
void Reset() override
{
@@ -248,7 +246,7 @@ public:
if (AzgalorGUID)
{
Creature* boss = ObjectAccessor::GetCreature(*me, AzgalorGUID);
- if (!boss || (boss && boss->isDead()))
+ if (!boss || boss->isDead())
{
me->setDeathState(JUST_DIED);
me->RemoveCorpse();
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp
index 70ecaad3d8d..c39fbc90795 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp
@@ -218,7 +218,7 @@ public:
break;
case 5:
me->SetVisible(false);
- me->Kill(me);
+ me->KillSelf();
break;
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
index b5d2931377f..a73a6b8d998 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
@@ -817,7 +817,7 @@ public:
cityman1->AI()->Talk(SAY_PHASE204);
cityman1->SetTarget(me->GetGUID());
if (Creature* cityman0 = ObjectAccessor::GetCreature(*me, citymenGUID[0]))
- cityman0->Kill(cityman0);
+ cityman0->KillSelf();
me->SetTarget(citymenGUID[1]);
}
JumpToNextStep(0);
@@ -829,7 +829,7 @@ public:
break;
case 33:
if (Creature* cityman1 = ObjectAccessor::GetCreature(*me, citymenGUID[1]))
- cityman1->Kill(cityman1);
+ cityman1->KillSelf();
JumpToNextStep(1000);
break;
case 34:
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
index 8e84f1b4265..6016893a785 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
@@ -917,7 +917,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
if (Unit* p = ObjectAccessor::GetUnit(*me, Portal))
- p->Kill(p);
+ p->KillSelf();
}
void Reset() override
@@ -943,7 +943,7 @@ public:
//KillSelfTimer
if (KillSelfTimer <= diff)
{
- me->Kill(me);
+ me->KillSelf();
return;
} else KillSelfTimer -= diff;
@@ -997,7 +997,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
if (Unit* p = ObjectAccessor::GetUnit(*me, Portal))
- p->Kill(p);
+ p->KillSelf();
}
void Reset() override
@@ -1025,7 +1025,7 @@ public:
if (EvadeTimer <= diff)
{
if (Unit* p = ObjectAccessor::GetUnit(*me, Portal))
- p->Kill(p);
+ p->KillSelf();
//Dissapear and reappear at new position
me->SetVisible(false);
@@ -1033,7 +1033,7 @@ public:
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (!target)
{
- me->Kill(me);
+ me->KillSelf();
return;
}
@@ -1113,7 +1113,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
if (Unit* p = ObjectAccessor::GetUnit(*me, Portal))
- p->Kill(p);
+ p->KillSelf();
}
void Reset() override
@@ -1142,7 +1142,7 @@ public:
if (EvadeTimer <= diff)
{
if (Unit* p = ObjectAccessor::GetUnit(*me, Portal))
- p->Kill(p);
+ p->KillSelf();
//Dissapear and reappear at new position
me->SetVisible(false);
@@ -1150,7 +1150,7 @@ public:
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (!target)
{
- me->Kill(me);
+ me->KillSelf();
return;
}
@@ -1231,7 +1231,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
if (Unit* p = ObjectAccessor::GetUnit(*me, Portal))
- p->Kill(p);
+ p->KillSelf();
}
void Reset() override
diff --git a/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp b/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp
index b0800918765..fba0956ccfc 100644
--- a/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp
+++ b/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp
@@ -352,7 +352,7 @@ class spell_ooze_zap_channel_end : public SpellScriptLoader
PreventHitDefaultEffect(effIndex);
if (Player* player = GetCaster()->ToPlayer())
player->CastSpell(player, SPELL_OOZE_CHANNEL_CREDIT, true);
- GetHitUnit()->Kill(GetHitUnit());
+ GetHitUnit()->KillSelf();
}
void Register() override
diff --git a/src/server/scripts/Kalimdor/zone_moonglade.cpp b/src/server/scripts/Kalimdor/zone_moonglade.cpp
index 163620230ef..c7decd3e286 100644
--- a/src/server/scripts/Kalimdor/zone_moonglade.cpp
+++ b/src/server/scripts/Kalimdor/zone_moonglade.cpp
@@ -108,64 +108,6 @@ public:
};
/*######
-## npc_great_bear_spirit
-######*/
-
-#define GOSSIP_BEAR1 "What do you represent, spirit?"
-#define GOSSIP_BEAR2 "I seek to understand the importance of strength of the body."
-#define GOSSIP_BEAR3 "I seek to understand the importance of strength of the heart."
-#define GOSSIP_BEAR4 "I have heard your words, Great Bear Spirit, and I understand. I now seek your blessings to fully learn the way of the Claw."
-
-class npc_great_bear_spirit : public CreatureScript
-{
-public:
- npc_great_bear_spirit() : CreatureScript("npc_great_bear_spirit") { }
-
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
- {
- player->PlayerTalkClass->ClearMenus();
- switch (action)
- {
- case GOSSIP_ACTION_INFO_DEF:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BEAR2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
- player->SEND_GOSSIP_MENU(4721, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF + 1:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BEAR3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
- player->SEND_GOSSIP_MENU(4733, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF + 2:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BEAR4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
- player->SEND_GOSSIP_MENU(4734, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF + 3:
- player->SEND_GOSSIP_MENU(4735, creature->GetGUID());
- if (player->GetQuestStatus(5929) == QUEST_STATUS_INCOMPLETE)
- player->AreaExploredOrEventHappens(5929);
- if (player->GetQuestStatus(5930) == QUEST_STATUS_INCOMPLETE)
- player->AreaExploredOrEventHappens(5930);
- break;
- }
- return true;
- }
-
- bool OnGossipHello(Player* player, Creature* creature) override
- {
- //ally or horde quest
- if (player->GetQuestStatus(5929) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(5930) == QUEST_STATUS_INCOMPLETE)
- {
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BEAR1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
- player->SEND_GOSSIP_MENU(4719, creature->GetGUID());
- }
- else
- player->SEND_GOSSIP_MENU(4718, creature->GetGUID());
-
- return true;
- }
-
-};
-
-/*######
## npc_silva_filnaveth
######*/
@@ -712,7 +654,6 @@ public:
void AddSC_moonglade()
{
new npc_bunthen_plainswind();
- new npc_great_bear_spirit();
new npc_silva_filnaveth();
new npc_clintar_spirit();
new npc_omen();
diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp
index 5890b9cbec7..240e8a7b957 100644
--- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp
@@ -433,7 +433,7 @@ public:
{
ENSURE_AI(boss_jedoga_shadowseeker::boss_jedoga_shadowseekerAI, boss->AI())->bOpFerok = true;
ENSURE_AI(boss_jedoga_shadowseeker::boss_jedoga_shadowseekerAI, boss->AI())->bOpFerokFail = false;
- me->Kill(me);
+ me->KillSelf();
}
}
break;
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.cpp b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.cpp
index eac84d1f6c9..3b12104a90b 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.cpp
@@ -338,14 +338,14 @@ struct dummy_dragonAI : public ScriptedAI
if (instance->GetBossState(DATA_SARTHARION) != IN_PROGRESS)
instance->SetBossState(DATA_SHADRON, DONE);
if (Creature* acolyte = me->FindNearestCreature(NPC_ACOLYTE_OF_SHADRON, 100.0f))
- acolyte->Kill(acolyte);
+ acolyte->KillSelf();
break;
case NPC_VESPERON:
spellId = SPELL_POWER_OF_VESPERON;
if (instance->GetBossState(DATA_SARTHARION) != IN_PROGRESS)
instance->SetBossState(DATA_VESPERON, DONE);
if (Creature* acolyte = me->FindNearestCreature(NPC_ACOLYTE_OF_VESPERON, 100.0f))
- acolyte->Kill(acolyte);
+ acolyte->KillSelf();
break;
}
@@ -948,7 +948,7 @@ public:
//DoCastVictim(57620, true);
//DoCastVictim(57874, true);
me->RemoveAllAuras();
- me->Kill(me);
+ me->KillSelf();
}
}
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp
index 0b8fa7459a8..6bc49de5319 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp
@@ -360,11 +360,11 @@ class boss_halion : public CreatureScript
if (Creature* twilightHalion = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_TWILIGHT_HALION)))
if (twilightHalion->IsAlive())
- twilightHalion->Kill(twilightHalion);
+ twilightHalion->KillSelf();
if (Creature* controller = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_HALION_CONTROLLER)))
if (controller->IsAlive())
- controller->Kill(controller);
+ controller->KillSelf();
}
Position const* GetMeteorStrikePosition() const { return &_meteorStrikePos; }
@@ -523,7 +523,7 @@ class boss_twilight_halion : public CreatureScript
if (Creature* controller = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_HALION_CONTROLLER)))
if (controller->IsAlive())
- controller->Kill(controller);
+ controller->KillSelf();
instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me);
}
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
index f5843cbfd30..3a745e2c98c 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
@@ -820,7 +820,7 @@ class npc_vengeful_shade : public CreatureScript
case SPELL_VENGEFUL_BLAST_25N:
case SPELL_VENGEFUL_BLAST_10H:
case SPELL_VENGEFUL_BLAST_25H:
- me->Kill(me);
+ me->KillSelf();
break;
default:
break;
@@ -1008,7 +1008,7 @@ class spell_cultist_dark_martyrdom : public SpellScriptLoader
if (Unit* owner = GetCaster()->ToTempSummon()->GetSummoner())
owner->GetAI()->SetGUID(GetCaster()->GetGUID(), GUID_CULTIST);
- GetCaster()->Kill(GetCaster());
+ GetCaster()->KillSelf();
GetCaster()->SetDisplayId(uint32(GetCaster()->GetEntry() == NPC_CULT_FANATIC ? 38009 : 38010));
}
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp b/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp
index 5c4d0ad4560..0d938122f28 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp
@@ -235,7 +235,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
- if (victimGUID && !victimGUID.IsEmpty())
+ if (victimGUID)
if (Unit* victim = ObjectAccessor::GetUnit(*me, victimGUID))
victim->RemoveAurasDueToSpell(SPELL_WEB_WRAP, me->GetGUID());
@@ -248,6 +248,5 @@ public:
void AddSC_boss_maexxna()
{
new boss_maexxna();
-
new npc_webwrap();
}
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp
index 5d9ef449168..5d3b038d41d 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp
@@ -531,7 +531,7 @@ public:
}
break;
case ACTION_TRANSITION:
- me->Kill(me); // true death
+ me->KillSelf(); // true death
me->DespawnOrUnsummon();
if (Creature* coil = myCoil())
@@ -801,7 +801,7 @@ public:
magneticPullTimer = 30 * IN_MILLISECONDS;
break;
case ACTION_TRANSITION:
- me->Kill(me); // true death this time around
+ me->KillSelf(); // true death this time around
me->DespawnOrUnsummon();
if (Creature* coil = myCoil())
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
index bd4fee60c42..5c852cd7f26 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
@@ -701,7 +701,7 @@ class boss_leviathan_mk_ii : public CreatureScript
{
me->CastStop();
if (Unit* turret = me->GetVehicleKit()->GetPassenger(3))
- turret->Kill(turret);
+ turret->KillSelf();
me->SetSpeed(MOVE_RUN, 1.5f, true);
me->GetMotionMaster()->MovePoint(WP_MKII_P1_IDLE, VehicleRelocation[WP_MKII_P1_IDLE]);
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp
index 6f07a88536d..8545d5b21eb 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp
@@ -2423,7 +2423,7 @@ class spell_yogg_saron_squeeze : public SpellScriptLoader // 64125
{
if (Unit* vehicle = GetTarget()->GetVehicleBase())
if (vehicle->IsAlive())
- vehicle->Kill(vehicle); // should tentacle die or just release its target?
+ vehicle->KillSelf(); // should tentacle die or just release its target?
}
void Register() override
@@ -2905,7 +2905,7 @@ class spell_yogg_saron_insane : public SpellScriptLoader // 63120
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
if (GetTarget()->IsAlive())
- GetTarget()->Kill(GetTarget());
+ GetTarget()->KillSelf();
}
void Register() override
diff --git a/src/server/scripts/Northrend/zone_borean_tundra.cpp b/src/server/scripts/Northrend/zone_borean_tundra.cpp
index 4cdfa653224..6ef9abe2267 100644
--- a/src/server/scripts/Northrend/zone_borean_tundra.cpp
+++ b/src/server/scripts/Northrend/zone_borean_tundra.cpp
@@ -1326,7 +1326,7 @@ public:
arlos->AI()->Talk(SAY_ARLOS_1);
arlos->AI()->Talk(SAY_ARLOS_2);
leryssa->AI()->Talk(SAY_LERYSSA_1);
- arlos->Kill(arlos, false);
+ arlos->KillSelf(false);
leryssa->RemoveAura(SPELL_STUN);
leryssa->ClearUnitState(UNIT_STATE_STUNNED);
leryssa->SetWalk(false);
diff --git a/src/server/scripts/Northrend/zone_sholazar_basin.cpp b/src/server/scripts/Northrend/zone_sholazar_basin.cpp
index 6e4a8df6f25..5d47e7fa4ec 100644
--- a/src/server/scripts/Northrend/zone_sholazar_basin.cpp
+++ b/src/server/scripts/Northrend/zone_sholazar_basin.cpp
@@ -778,7 +778,7 @@ public:
wilhelm->AI()->Talk(SAY_WILHELM_MISS);
drostan->AI()->Talk(SAY_DROSTAN_REPLY_MISS);
- bird->Kill(bird);
+ bird->KillSelf();
crunchy->GetMotionMaster()->MovePoint(0, bird->GetPositionX(), bird->GetPositionY(),
bird->GetMap()->GetWaterOrGroundLevel(bird->GetPositionX(), bird->GetPositionY(), bird->GetPositionZ()));
/// @todo Make crunchy perform emote eat when he reaches the bird
diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp
index b16a9630335..04d3a20d945 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp
@@ -257,7 +257,7 @@ class npc_voidtraveler : public CreatureScript
{
DoCastAOE(SPELL_EMPOWERING_SHADOWS, true);
DoCast(me, SPELL_SHADOW_NOVA, true);
- me->Kill(me);
+ me->KillSelf();
return;
}
me->GetMotionMaster()->MoveFollow(Vorpil, 0, 0);
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp
index 787b191e23d..0292ed65697 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp
@@ -633,7 +633,7 @@ public:
}
if (Creature* vashj = ObjectAccessor::GetCreature(*me, VashjGUID))
if (!vashj->IsInCombat() || ENSURE_AI(boss_lady_vashj::boss_lady_vashjAI, vashj->AI())->Phase != 2 || vashj->isDead())
- me->Kill(me);
+ me->KillSelf();
Move = 1000;
} else Move -= diff;
}
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
index 872269fd19f..2d99fd9bacf 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
@@ -1286,7 +1286,7 @@ class npc_kael_flamestrike : public CreatureScript
DoCast(me, SPELL_FLAME_STRIKE_DMG);
}
else
- me->Kill(me);
+ me->KillSelf();
KillSelf = true;
Timer = 1000;
diff --git a/src/server/scripts/Spells/spell_holiday.cpp b/src/server/scripts/Spells/spell_holiday.cpp
index a1b218010aa..e29f87a5ff9 100644
--- a/src/server/scripts/Spells/spell_holiday.cpp
+++ b/src/server/scripts/Spells/spell_holiday.cpp
@@ -277,6 +277,86 @@ class spell_hallow_end_tricky_treat : public SpellScriptLoader
}
};
+// Hallowed wands
+enum HallowendData
+{
+ //wand spells
+ SPELL_HALLOWED_WAND_PIRATE = 24717,
+ SPELL_HALLOWED_WAND_NINJA = 24718,
+ SPELL_HALLOWED_WAND_LEPER_GNOME = 24719,
+ SPELL_HALLOWED_WAND_RANDOM = 24720,
+ SPELL_HALLOWED_WAND_SKELETON = 24724,
+ SPELL_HALLOWED_WAND_WISP = 24733,
+ SPELL_HALLOWED_WAND_GHOST = 24737,
+ SPELL_HALLOWED_WAND_BAT = 24741
+};
+
+class spell_hallow_end_wand : public SpellScriptLoader
+{
+public:
+ spell_hallow_end_wand() : SpellScriptLoader("spell_hallow_end_wand") {}
+
+ class spell_hallow_end_wand_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_hallow_end_wand_SpellScript);
+
+ bool Validate(SpellInfo const* /*spellEntry*/) override
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_PIRATE_COSTUME_MALE) ||
+ !sSpellMgr->GetSpellInfo(SPELL_PIRATE_COSTUME_FEMALE) ||
+ !sSpellMgr->GetSpellInfo(SPELL_NINJA_COSTUME_MALE) ||
+ !sSpellMgr->GetSpellInfo(SPELL_NINJA_COSTUME_FEMALE) ||
+ !sSpellMgr->GetSpellInfo(SPELL_LEPER_GNOME_COSTUME_MALE) ||
+ !sSpellMgr->GetSpellInfo(SPELL_LEPER_GNOME_COSTUME_FEMALE) ||
+ !sSpellMgr->GetSpellInfo(SPELL_GHOST_COSTUME_MALE) ||
+ !sSpellMgr->GetSpellInfo(SPELL_GHOST_COSTUME_FEMALE))
+ return false;
+ return true;
+ }
+
+ void HandleScriptEffect()
+ {
+ Unit* caster = GetCaster();
+ Unit* target = GetHitUnit();
+
+ uint32 spellId = 0;
+ uint8 gender = target->getGender();
+
+ switch (GetSpellInfo()->Id)
+ {
+ case SPELL_HALLOWED_WAND_LEPER_GNOME:
+ spellId = gender ? SPELL_LEPER_GNOME_COSTUME_FEMALE : SPELL_LEPER_GNOME_COSTUME_MALE;
+ break;
+ case SPELL_HALLOWED_WAND_PIRATE:
+ spellId = gender ? SPELL_PIRATE_COSTUME_FEMALE : SPELL_PIRATE_COSTUME_MALE;
+ break;
+ case SPELL_HALLOWED_WAND_GHOST:
+ spellId = gender ? SPELL_GHOST_COSTUME_FEMALE : SPELL_GHOST_COSTUME_MALE;
+ break;
+ case SPELL_HALLOWED_WAND_NINJA:
+ spellId = gender ? SPELL_NINJA_COSTUME_FEMALE : SPELL_NINJA_COSTUME_MALE;
+ break;
+ case SPELL_HALLOWED_WAND_RANDOM:
+ spellId = RAND(SPELL_HALLOWED_WAND_PIRATE, SPELL_HALLOWED_WAND_NINJA, SPELL_HALLOWED_WAND_LEPER_GNOME, SPELL_HALLOWED_WAND_SKELETON, SPELL_HALLOWED_WAND_WISP, SPELL_HALLOWED_WAND_GHOST, SPELL_HALLOWED_WAND_BAT);
+ break;
+ default:
+ return;
+ }
+ caster->CastSpell(target, spellId, true);
+ }
+
+ void Register() override
+ {
+ AfterHit += SpellHitFn(spell_hallow_end_wand_SpellScript::HandleScriptEffect);
+ }
+ };
+
+ SpellScript* GetSpellScript() const override
+ {
+ return new spell_hallow_end_wand_SpellScript();
+ }
+};
+
enum PilgrimsBountyBuffFood
{
// Pilgrims Bounty Buff Food
@@ -886,6 +966,7 @@ void AddSC_holiday_spell_scripts()
new spell_hallow_end_trick();
new spell_hallow_end_trick_or_treat();
new spell_hallow_end_tricky_treat();
+ new spell_hallow_end_wand();
// Pilgrims Bounty
new spell_pilgrims_bounty_buff_food("spell_gen_slow_roasted_turkey", SPELL_WELL_FED_AP_TRIGGER);
new spell_pilgrims_bounty_buff_food("spell_gen_cranberry_chutney", SPELL_WELL_FED_ZM_TRIGGER);
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp
index f2871871c30..0ca4112b288 100644
--- a/src/server/scripts/Spells/spell_hunter.cpp
+++ b/src/server/scripts/Spells/spell_hunter.cpp
@@ -480,7 +480,7 @@ class spell_hun_misdirection : public SpellScriptLoader
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_DEFAULT)
+ if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_DEFAULT || !GetTarget()->HasAura(SPELL_HUNTER_MISDIRECTION_PROC))
GetTarget()->ResetRedirectThreat();
}
diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp
index 717382a0e36..f0b6c0945c2 100644
--- a/src/server/scripts/Spells/spell_item.cpp
+++ b/src/server/scripts/Spells/spell_item.cpp
@@ -2509,7 +2509,7 @@ class spell_item_chicken_cover : public SpellScriptLoader
if (!target->HasAura(SPELL_CHICKEN_NET) && (caster->GetQuestStatus(QUEST_CHICKEN_PARTY) == QUEST_STATUS_INCOMPLETE || caster->GetQuestStatus(QUEST_FLOWN_THE_COOP) == QUEST_STATUS_INCOMPLETE))
{
caster->CastSpell(caster, SPELL_CAPTURE_CHICKEN_ESCAPE, true);
- target->Kill(target);
+ target->KillSelf();
}
}
}