diff options
99 files changed, 1457 insertions, 835 deletions
diff --git a/sql/updates/world/2013_08_09_08_world_creature_template.sql b/sql/updates/world/2013_08_09_08_world_creature_template.sql new file mode 100644 index 00000000000..ab3b4fc2837 --- /dev/null +++ b/sql/updates/world/2013_08_09_08_world_creature_template.sql @@ -0,0 +1,7 @@ +UPDATE `creature_template` SET `ScriptName`='npc_pet_dk_ebon_gargoyle' WHERE `ScriptName`='npc_ebon_gargoyle'; +UPDATE `creature_template` SET `ScriptName`='npc_pet_hunter_snake_trap' WHERE `ScriptName`='npc_snake_trap_serpents'; +UPDATE `creature_template` SET `ScriptName`='npc_pet_mage_mirror_image' WHERE `ScriptName`='npc_mirror_image'; +UPDATE `creature_template` SET `ScriptName`='npc_pet_pri_lightwell' WHERE `ScriptName`='npc_lightwell'; +UPDATE `creature_template` SET `ScriptName`='npc_pet_pri_shadowfiend' WHERE `ScriptName`='npc_shadowfiend'; +UPDATE `creature_template` SET `ScriptName`='npc_pet_shaman_earth_elemental' WHERE `ScriptName`='npc_earth_elemental'; +UPDATE `creature_template` SET `ScriptName`='npc_pet_shaman_fire_elemental' WHERE `ScriptName`='npc_fire_elemental'; diff --git a/sql/updates/world/2013_08_09_08_world_go_template.sql b/sql/updates/world/2013_08_09_08_world_go_template.sql new file mode 100644 index 00000000000..958d0125994 --- /dev/null +++ b/sql/updates/world/2013_08_09_08_world_go_template.sql @@ -0,0 +1,2 @@ +-- Change SpellFocus GO radius to 100y +UPDATE `gameobject_template` SET `data1`=100 WHERE `entry`=300209; diff --git a/sql/updates/world/2013_08_09_09_world_sai.sql b/sql/updates/world/2013_08_09_09_world_sai.sql new file mode 100644 index 00000000000..1ba2e7a5b15 --- /dev/null +++ b/sql/updates/world/2013_08_09_09_world_sai.sql @@ -0,0 +1,27 @@ +-- Archmage Pentarus SAI +SET @ENTRY := 28160; -- NPC entry +SET @SPELL := 50859; -- Flight to Sholazar +UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@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,62,0,100,0,10024,0,0,0,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Archmage Pentarus - On gossip option select - run script'), +(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,11,@SPELL,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Archmage Pentarus - Script - Cast Flight to Sholazar on player'), +(@ENTRY*100,9,1,0,0,0,100,0,1000,1000,1000,1000,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Archmage Pentarus - Script - say 0'); +-- NPC talk text insert from sniff +DELETE FROM `creature_text` WHERE `entry`=28160 AND `groupid`=0; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(28160,0,0, 'I''ll send you on my flying machine. Keep your eyes peeled for clues about what might''ve happened to Hemet!',12,0,100,25,0,0, 'Archmage Pentarus'); +-- Gossip conditions for Archmage Pentarus +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=10024; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,10024,0,0,28,12521,0,0,0,'','Show gossip option if player has quest Where in the World is Hemet Nesingwary?'); +DELETE FROM `gossip_menu_option` WHERE `menu_id`=10024 AND `id`=1; + +-- Add spell target position +DELETE FROM `spell_target_position` WHERE `id`=50987; +INSERT INTO `spell_target_position` (`id`,`target_map`,`target_position_x`,`target_position_y`,`target_position_z`,`target_orientation`) VALUES +(50987,571,5071.35,4642.54,72.164,0.878587); + +-- Update Archmage Pentarus' Flying Machine +UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry`=28192; diff --git a/sql/updates/world/2013_08_09_10_world_sai.sql b/sql/updates/world/2013_08_09_10_world_sai.sql new file mode 100644 index 00000000000..db48e519dbd --- /dev/null +++ b/sql/updates/world/2013_08_09_10_world_sai.sql @@ -0,0 +1,22 @@ +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (16977,16978); +DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (16977,16978); -- clean old EAI +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (16977, 16978) 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 +(16977,0,0,0,25,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arch Mage Xintor - prevent combat movement on spawn'), +(16977,0,1,0,4,0,100,0,0,0,0,0,11,20823,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Arch Mage Xintor - cast fireball on aggro'), +(16977,0,2,0,4,0,100,0,0,0,0,0,23,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arch Mage Xintor - set phase 1 on aggro'), +(16977,0,3,0,9,1,100,0,0,40,2400,3800,11,20823,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Arch Mage Xintor - cast fireball'), +(16977,0,4,0,3,1,100,0,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arch Mage Xintor - start normal attack on 15% mana'), +(16977,0,5,0,3,1,100,0,0,15,0,0,23,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arch Mage Xintor - set phase 2 on 15% mana'), +(16977,0,6,0,9,1,100,0,35,80,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arch Mage Xintor - combatmovement'), +(16977,0,7,0,9,1,100,0,5,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arch Mage Xintor - combatmovement'), +(16977,0,8,0,9,1,100,0,0,5,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arch Mage Xintor - combatmovement'), +(16977,0,9,0,3,1,100,0,30,100,100,100,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arch Mage Xintor - set phase 1 on 30% mana'), +(16977,0,10,0,0,1,50,0,6000,8000,9000,12000,11,15735,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Arch Mage Xintor - cast arcane missles'), +(16977,0,11,0,2,0,100,0,0,50,0,0,11,33245,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arch Mage Xintor - 50% hp - cast ice barrier'), +(16977,0,12,0,2,0,100,0,0,50,0,0,11,29458,0,0,0,0,0,5,0,0,0,0,0,0,0, 'Arch Mage Xintor - 50% hp - cast blizzard'), +(16977,0,13,0,2,0,100,0,0,15,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 'Arch Mage Xintor - flee on 15% hp'), +(16977,0,14,0,7,0,100,0,0,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 'Arch Mage Xintor - set phase 0 on evade'), +(16978,0,0,0,0,0,50,0,4000,4000,8000,8000,11,8242,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Lieutenant Commander Thalvos - Cast Shield Slam'), +(16978,0,1,0,0,0,50,0,5000,5000,10000,10000,11,20823,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Lieutenant Commander Thalvos - Cast Strike'), +(16978,0,2,0,25,0,100,0,0,0,0,0,11,27978,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Lieutenant Commander Thalvos - Shroud of Death'); diff --git a/sql/updates/world/2013_08_09_11_world_disables.sql b/sql/updates/world/2013_08_09_11_world_disables.sql new file mode 100644 index 00000000000..81411aa00a2 --- /dev/null +++ b/sql/updates/world/2013_08_09_11_world_disables.sql @@ -0,0 +1,4 @@ +DELETE FROM `disables` WHERE `sourceType`=0 AND `entry` IN (38729,38736); +INSERT INTO `disables`(`sourceType`,`entry`,`flags`,`comment`) VALUES +(0,38729,64,'Ignore LOS on Rod of Purification'), +(0,38736,64,'Ignore LOS on Rod of Purification'); diff --git a/sql/updates/world/2013_08_10_00_world_eai_335.sql b/sql/updates/world/2013_08_10_00_world_eai_335.sql new file mode 100644 index 00000000000..445e86712bc --- /dev/null +++ b/sql/updates/world/2013_08_10_00_world_eai_335.sql @@ -0,0 +1,4 @@ +UPDATE `creature_ai_scripts` SET `action1_param1`=`action1_param1` + 1 WHERE `action1_type`=17; +UPDATE `creature_ai_scripts` SET `action2_param1`=`action2_param1` + 1 WHERE `action2_type`=17; +UPDATE `creature_ai_scripts` SET `action3_param1`=`action3_param1` + 1 WHERE `action3_type`=17; +UPDATE `creature_ai_scripts` SET `action1_param1`=25 WHERE `id`=1531201; diff --git a/sql/updates/world/2013_08_10_01_world_creature.sql b/sql/updates/world/2013_08_10_01_world_creature.sql new file mode 100644 index 00000000000..ca12b55b00a --- /dev/null +++ b/sql/updates/world/2013_08_10_01_world_creature.sql @@ -0,0 +1,15 @@ +UPDATE `creature_template` SET `AIName` = 'NullAI' WHERE `entry` = 27490; +UPDATE `creature_template` SET `unit_flags` = 64 WHERE `entry` = 31339; +UPDATE `creature_template` SET `ScriptName` = '', AIName = 'SmartAI' WHERE `entry` = 26638; + +DELETE FROM `smart_scripts` WHERE `entryorguid` = 26638 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 +(26638, 0, 1, 0, 0, 0, 100, 6, 0, 0, 0, 0, 43, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Risen Drakkari Bat Rider - In Combat - Dismount"), +(26638, 0, 2, 0, 0, 0, 100, 6, 0, 0, 0, 0, 19, 0x02000000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Risen Drakkari Bat Rider - In Combat - Remove flag"), +(26638, 0, 3, 0, 9, 0, 100, 6, 5, 30, 9000, 12000, 11, 16001, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, "Risen Drakkari Bat Rider - At 5 - 30 Range - Cast Impale"), +(26638, 0, 4, 0, 0, 0, 100, 2, 3000, 6000, 9000, 12000, 11, 50414, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Risen Drakkari Bat Rider - In Combat - Cast Curse of Blood"), +(26638, 0, 5, 0, 0, 0, 100, 4, 3000, 6000, 9000, 12000, 11, 59009, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Risen Drakkari Bat Rider - In Combat - Cast Curse of Blood"); + +DELETE FROM `creature_addon` WHERE `guid` = 127448; +INSERT INTO `creature_addon` (`guid`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES +(127448, 0, 26751, 0, 1, 0, ''); diff --git a/sql/updates/world/2013_08_10_02_world_spell_target_position.sql b/sql/updates/world/2013_08_10_02_world_spell_target_position.sql new file mode 100644 index 00000000000..e576a424f05 --- /dev/null +++ b/sql/updates/world/2013_08_10_02_world_spell_target_position.sql @@ -0,0 +1,4 @@ +DELETE FROM `spell_target_position` WHERE `id`=50859; +DELETE FROM `spell_target_position` WHERE `id`=50987; +INSERT INTO `spell_target_position` (`id`,`target_map`,`target_position_x`,`target_position_y`,`target_position_z`,`target_orientation`) VALUES +(50987,571,5832.892,482.8708,658.2753,0.9121326); diff --git a/sql/updates/world/2013_08_10_03_world_creature_text.sql b/sql/updates/world/2013_08_10_03_world_creature_text.sql new file mode 100644 index 00000000000..5c799a946fe --- /dev/null +++ b/sql/updates/world/2013_08_10_03_world_creature_text.sql @@ -0,0 +1,10 @@ +SET @NPC := 7271; +-- Move boss_zum_rah from SAI to CPP +UPDATE `creature_template` SET `AIName`= '', `ScriptName`= 'boss_zum_rah' WHERE `entry`=@NPC; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@NPC; +DELETE FROM `creature_text` WHERE `entry` =@NPC; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES +(@NPC, 0, 0, 'How dare you enter my sanctum!', 12, 0, 100, 0, 0, 0, 'Witch Doctor Zum''rah'), +(@NPC, 1, 1, 'T''eif godehsi wha!', 14, 14, 100, 0, 0, 0, 'Witch Doctor Zum''rah'), +(@NPC, 2, 2, 'Sands consume you!', 14, 0, 100, 0, 0, 0, 'Witch Doctor Zum''rah'), +(@NPC, 2, 3, 'Fall!', 14, 0, 100, 0, 0, 0, 'Witch Doctor Zum''rah'); diff --git a/sql/updates/world/2013_08_11_00_world_spell_script_names.sql b/sql/updates/world/2013_08_11_00_world_spell_script_names.sql new file mode 100644 index 00000000000..00aee104022 --- /dev/null +++ b/sql/updates/world/2013_08_11_00_world_spell_script_names.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_script_names` WHERE `spell_id`=66545; +INSERT INTO `spell_script_names` (`spell_id` ,`ScriptName`) VALUES +(66545, 'spell_paletress_summon_memory'); diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index ca5b50ea568..65b1e6c331e 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -2075,13 +2075,47 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u GetBaseObject()->SummonCreatureGroup(e.action.creatureGroup.group, &summonList); for (std::list<TempSummon*>::const_iterator itr = summonList.begin(); itr != summonList.end(); ++itr) - { if (unit && e.action.creatureGroup.attackInvoker) (*itr)->AI()->AttackStart(unit); - } break; } + case SMART_ACTION_SET_POWER: + { + ObjectList* targets = GetTargets(e, unit); + + if (targets) + for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) + if (IsUnit(*itr)) + (*itr)->ToUnit()->SetPower(Powers(e.action.power.powerType), e.action.power.newPower); + + delete targets; + break; + } + case SMART_ACTION_ADD_POWER: + { + ObjectList* targets = GetTargets(e, unit); + + if (targets) + for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) + if (IsUnit(*itr)) + (*itr)->ToUnit()->SetPower(Powers(e.action.power.powerType), (*itr)->ToUnit()->GetPower(Powers(e.action.power.powerType)) + e.action.power.newPower); + + delete targets; + break; + } + case SMART_ACTION_REMOVE_POWER: + { + ObjectList* targets = GetTargets(e, unit); + + if (targets) + for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) + if (IsUnit(*itr)) + (*itr)->ToUnit()->SetPower(Powers(e.action.power.powerType), (*itr)->ToUnit()->GetPower(Powers(e.action.power.powerType)) - e.action.power.newPower); + + delete targets; + break; + } default: TC_LOG_ERROR(LOG_FILTER_SQL, "SmartScript::ProcessAction: Entry %d SourceType %u, Event %u, Unhandled Action type %u", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); break; diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index 5fb3e2481c7..99693355d70 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -831,6 +831,15 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) return false; break; } + case SMART_ACTION_SET_POWER: + case SMART_ACTION_ADD_POWER: + case SMART_ACTION_REMOVE_POWER: + if (e.action.power.powerType > MAX_POWERS) + { + TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Power %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.power.powerType); + return false; + } + break; case SMART_ACTION_FOLLOW: case SMART_ACTION_SET_ORIENTATION: case SMART_ACTION_STORE_TARGET_LIST: diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index 2f8c3cc33ab..740be9276b2 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -489,8 +489,11 @@ enum SMART_ACTION SMART_ACTION_ADD_GO_FLAG = 105, // Flags SMART_ACTION_REMOVE_GO_FLAG = 106, // Flags SMART_ACTION_SUMMON_CREATURE_GROUP = 107, // Group, attackInvoker + SMART_ACTION_SET_POWER = 108, // PowerType, newPower + SMART_ACTION_ADD_POWER = 109, // PowerType, newPower + SMART_ACTION_REMOVE_POWER = 110, // PowerType, newPower - SMART_ACTION_END = 108 + SMART_ACTION_END = 111 }; struct SmartAction @@ -938,6 +941,12 @@ struct SmartAction uint32 attackInvoker; } creatureGroup; + struct + { + uint32 powerType; + uint32 newPower; + } power; + //! Note for any new future actions //! All parameters must have type uint32 diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp index 3be95a86ca8..f8c9e888176 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp @@ -1623,7 +1623,7 @@ void BattlegroundAV::ResetBGSubclass() bool BattlegroundAV::CheckAchievementCriteriaMeet(uint32 criteriaId, Player const* source, Unit const* target, uint32 miscValue) { - uint8 team = source->GetTeam(); + uint32 team = source->GetTeam(); switch (criteriaId) { case BG_CRITERIA_CHECK_EVERYTHING_COUNTS: diff --git a/src/server/game/Scripting/ScriptLoader.cpp b/src/server/game/Scripting/ScriptLoader.cpp index 8e2fc2953c9..76defc03da4 100644 --- a/src/server/game/Scripting/ScriptLoader.cpp +++ b/src/server/game/Scripting/ScriptLoader.cpp @@ -340,8 +340,9 @@ void AddSC_npc_anubisath_sentinel(); void AddSC_instance_temple_of_ahnqiraj(); void AddSC_wailing_caverns(); //Wailing caverns void AddSC_instance_wailing_caverns(); -void AddSC_zulfarrak(); //Zul'Farrak generic -void AddSC_instance_zulfarrak(); //Zul'Farrak instance script +void AddSC_boss_zum_rah(); //Zul'Farrak +void AddSC_zulfarrak(); +void AddSC_instance_zulfarrak(); void AddSC_ashenvale(); void AddSC_azshara(); @@ -619,6 +620,13 @@ void AddSC_zangarmarsh(); // Events void AddSC_event_childrens_week(); +// Pets +void AddSC_deathknight_pet_scripts(); +void AddSC_hunter_pet_scripts(); +void AddSC_mage_pet_scripts(); +void AddSC_priest_pet_scripts(); +void AddSC_shaman_pet_scripts(); + // battlegrounds // outdoor pvp @@ -647,6 +655,7 @@ void AddScripts() AddOutlandScripts(); AddNorthrendScripts(); AddEventScripts(); + AddPetScripts(); AddBattlegroundScripts(); AddOutdoorPvPScripts(); AddCustomScripts(); @@ -990,8 +999,9 @@ void AddKalimdorScripts() AddSC_instance_temple_of_ahnqiraj(); AddSC_wailing_caverns(); //Wailing caverns AddSC_instance_wailing_caverns(); - AddSC_zulfarrak(); //Zul'Farrak generic - AddSC_instance_zulfarrak(); //Zul'Farrak instance script + AddSC_boss_zum_rah(); //Zul'Farrak + AddSC_zulfarrak(); + AddSC_instance_zulfarrak(); AddSC_ashenvale(); AddSC_azshara(); @@ -1283,6 +1293,17 @@ void AddEventScripts() #endif } +void AddPetScripts() +{ +#ifdef SCRIPTS + AddSC_deathknight_pet_scripts(); + AddSC_hunter_pet_scripts(); + AddSC_mage_pet_scripts(); + AddSC_priest_pet_scripts(); + AddSC_shaman_pet_scripts(); +#endif +} + void AddOutdoorPvPScripts() { #ifdef SCRIPTS diff --git a/src/server/game/Scripting/ScriptLoader.h b/src/server/game/Scripting/ScriptLoader.h index ef29b54369d..79e2454518f 100644 --- a/src/server/game/Scripting/ScriptLoader.h +++ b/src/server/game/Scripting/ScriptLoader.h @@ -28,6 +28,7 @@ void AddKalimdorScripts(); void AddOutlandScripts(); void AddNorthrendScripts(); void AddEventScripts(); +void AddPetScripts(); void AddBattlegroundScripts(); void AddOutdoorPvPScripts(); void AddCustomScripts(); diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 80d326e2c7a..ac3f12ed8c5 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -4114,14 +4114,6 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) } break; } - case 66545: //Summon Memory - { - uint8 uiRandom = urand(0, 25); - uint32 uiSpells[26] = {66704, 66705, 66706, 66707, 66709, 66710, 66711, 66712, 66713, 66714, 66715, 66708, 66708, 66691, 66692, 66694, 66695, 66696, 66697, 66698, 66699, 66700, 66701, 66702, 66703, 66543}; - - m_caster->CastSpell(m_caster, uiSpells[uiRandom], true); - break; - } case 45668: // Ultra-Advanced Proto-Typical Shortening Blaster { if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT) diff --git a/src/server/scripts/CMakeLists.txt b/src/server/scripts/CMakeLists.txt index cf4618022b3..5be634d2060 100644 --- a/src/server/scripts/CMakeLists.txt +++ b/src/server/scripts/CMakeLists.txt @@ -38,6 +38,7 @@ if(SCRIPTS) include(Outland/CMakeLists.txt) include(Northrend/CMakeLists.txt) include(Events/CMakeLists.txt) + include(Pet/CMakeLists.txt) endif() message(STATUS "SCRIPT PREPARATION COMPLETE") diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp index b9ff40f8285..a080e117583 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp @@ -115,7 +115,7 @@ public: uint32 TombTimer; uint32 TombEventCounter; - void Initialize() + void Initialize() OVERRIDE { memset(&encounter, 0, sizeof(encounter)); @@ -156,7 +156,7 @@ public: TombBossGUIDs[i] = 0; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -178,7 +178,7 @@ public: } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -342,12 +342,12 @@ public: return 0; } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { return str_data; } - void Load(const char* in) + void Load(const char* in) OVERRIDE { if (!in) { @@ -429,7 +429,7 @@ public: TombEventStarterGUID = 0; SetData(TYPE_TOMB_OF_SEVEN, DONE); } - void Update(uint32 diff) + void Update(uint32 diff) OVERRIDE { if (TombEventStarterGUID && GhostKillCount < 7) { diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp index f0d252a5c5e..9b250cc169a 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp @@ -75,7 +75,7 @@ public: go_portcullis_tobossrooms = 0; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -133,7 +133,7 @@ public: } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -240,7 +240,7 @@ public: } } - bool SetBossState(uint32 type, EncounterState state) + bool SetBossState(uint32 type, EncounterState state) OVERRIDE { if (!InstanceScript::SetBossState(type, state)) return false; @@ -270,7 +270,7 @@ public: return true; } - void ProcessEvent(WorldObject* /*gameObject*/, uint32 eventId) + void ProcessEvent(WorldObject* /*gameObject*/, uint32 eventId) OVERRIDE { switch (eventId) { @@ -414,7 +414,7 @@ public: return 0; } - void Update(uint32 diff) + void Update(uint32 diff) OVERRIDE { Events.Update(diff); @@ -531,7 +531,7 @@ public: } } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; @@ -542,7 +542,7 @@ public: return saveStream.str(); } - void Load(const char* strIn) + void Load(const char* strIn) OVERRIDE { if (!strIn) { diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp index d904e0a89f8..622c34d3358 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp @@ -59,7 +59,7 @@ public: SetBossNumber(EncounterCount); } - void Initialize() + void Initialize() OVERRIDE { // Razorgore EggCount = 0; @@ -85,7 +85,7 @@ public: NefarianGUID = 0; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -126,7 +126,7 @@ public: } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -159,13 +159,13 @@ public: } } - void OnGameObjectRemove(GameObject* go) + void OnGameObjectRemove(GameObject* go) OVERRIDE { if (go->GetEntry() == 177807) // Egg EggList.remove(go->GetGUID()); } - bool SetBossState(uint32 type, EncounterState state) + bool SetBossState(uint32 type, EncounterState state) OVERRIDE { if (!InstanceScript::SetBossState(type, state)) return false; @@ -268,14 +268,14 @@ public: } } - void OnUnitDeath(Unit* unit) + void OnUnitDeath(Unit* unit) OVERRIDE { //! HACK, needed because of buggy CreatureAI after charm if (unit->GetEntry() == NPC_RAZORGORE && GetBossState(BOSS_RAZORGORE) != DONE) SetBossState(BOSS_RAZORGORE, DONE); } - void Update(uint32 diff) + void Update(uint32 diff) OVERRIDE { if (_events.Empty()) return; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp index 04e652b7f80..73ea15be261 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp @@ -79,7 +79,7 @@ class instance_molten_core : public InstanceMapScript } } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -94,7 +94,7 @@ class instance_molten_core : public InstanceMapScript } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -183,7 +183,7 @@ class instance_molten_core : public InstanceMapScript summon->AI()->DoAction(ACTION_START_RAGNAROS_ALT); } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; diff --git a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp index b9073a35abf..7e7d1b72415 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp @@ -72,7 +72,7 @@ class instance_deadmines : public InstanceMapScript uint32 PiratesDelay_Timer; uint64 uiSmiteChestGUID; - void Initialize() + void Initialize() OVERRIDE { FactoryDoorGUID = 0; IronCladDoorGUID = 0; @@ -86,7 +86,7 @@ class instance_deadmines : public InstanceMapScript uiSmiteChestGUID = 0; } - virtual void Update(uint32 diff) + virtual void Update(uint32 diff) OVERRIDE { if (!IronCladDoorGUID || !DefiasCannonGUID || !DoorLeverGUID) return; @@ -188,7 +188,7 @@ class instance_deadmines : public InstanceMapScript pDoorLever->SetUInt32Value(GAMEOBJECT_FLAGS, 4); } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp index a00e9d9abe5..bd24c87539e 100644 --- a/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp +++ b/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp @@ -45,7 +45,7 @@ public: uint64 uiBastmasterEmiShortfuseGUID; - void Initialize() + void Initialize() OVERRIDE { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); @@ -55,7 +55,7 @@ public: uiBastmasterEmiShortfuseGUID = 0; } - void Load(const char* in) + void Load(const char* in) OVERRIDE { if (!in) { @@ -77,7 +77,7 @@ public: OUT_LOAD_INST_DATA_COMPLETE; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -85,7 +85,7 @@ public: } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { diff --git a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp index eef61f0c051..82dc85861da 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp @@ -80,7 +80,7 @@ public: uint64 ImageGUID; uint64 DustCoveredChest; - void Initialize() + void Initialize() OVERRIDE { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); @@ -108,7 +108,7 @@ public: DustCoveredChest = 0; } - bool IsEncounterInProgress() const + bool IsEncounterInProgress() const OVERRIDE { for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) if (m_auiEncounter[i] == IN_PROGRESS) @@ -117,7 +117,7 @@ public: return false; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -190,7 +190,7 @@ public: } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -236,7 +236,7 @@ public: } } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { return strSaveData; } diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp index 2350cd8f581..ba3526bfa11 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp @@ -86,7 +86,7 @@ public: uint32 StatuesState; uint8 felCristalIndex; - void Initialize() + void Initialize() OVERRIDE { memset(&Encounter, 0, sizeof(Encounter)); @@ -108,7 +108,7 @@ public: felCristalIndex = 0; } - bool IsEncounterInProgress() const + bool IsEncounterInProgress() const OVERRIDE { for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) if (Encounter[i] == IN_PROGRESS) @@ -188,7 +188,7 @@ public: SaveToDB(); } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -204,7 +204,7 @@ public: } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -235,7 +235,7 @@ public: } } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; @@ -246,7 +246,7 @@ public: return saveStream.str(); } - void Load(const char* str) + void Load(const char* str) OVERRIDE { if (!str) { diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp index 3bd00cf243f..05664a946ed 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp @@ -63,7 +63,7 @@ public: uint32 encounter[MAX_ENCOUNTER]; - void Initialize() + void Initialize() OVERRIDE { memset(&encounter, 0, sizeof(encounter)); @@ -78,7 +78,7 @@ public: DoorHighInquisitorGUID = 0; } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -87,7 +87,7 @@ public: } } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { diff --git a/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp b/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp index abe79a89522..ad0ae3998f1 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp @@ -48,7 +48,7 @@ class instance_scholomance : public InstanceMapScript BrazierOfTheHeraldGUID = 0; } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -84,7 +84,7 @@ class instance_scholomance : public InstanceMapScript } } - bool SetBossState(uint32 type, EncounterState state) + bool SetBossState(uint32 type, EncounterState state) OVERRIDE { if (!InstanceScript::SetBossState(type, state)) return false; @@ -168,7 +168,7 @@ class instance_scholomance : public InstanceMapScript instance->SummonCreature(NPC_DARKMASTER_GANDLING, GandlingLoc); } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; @@ -179,7 +179,7 @@ class instance_scholomance : public InstanceMapScript return saveStream.str(); } - void Load(const char* str) + void Load(const char* str) OVERRIDE { if (!str) { diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp index 346c9f0f038..fde5bffd07a 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp @@ -94,7 +94,7 @@ public: uint8 uiPhase; uint16 uiTimer; - void Initialize() + void Initialize() OVERRIDE { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); @@ -110,7 +110,7 @@ public: uiTimer = 0; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -120,7 +120,7 @@ public: } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -218,12 +218,12 @@ public: return 0; } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { return str_data; } - void Load(const char* in) + void Load(const char* in) OVERRIDE { if (!in) { diff --git a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp index b0d5b0508eb..85eabe70cfa 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp @@ -72,7 +72,7 @@ class instance_stratholme : public InstanceMapScript std::set<uint64> abomnationGUID; EventMap events; - void Initialize() + void Initialize() OVERRIDE { for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) EncounterState[i] = NOT_STARTED; @@ -126,7 +126,7 @@ class instance_stratholme : public InstanceMapScript } } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -146,7 +146,7 @@ class instance_stratholme : public InstanceMapScript } } - void OnCreatureRemove(Creature* creature) + void OnCreatureRemove(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -160,7 +160,7 @@ class instance_stratholme : public InstanceMapScript } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -353,7 +353,7 @@ class instance_stratholme : public InstanceMapScript SaveToDB(); } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; @@ -365,7 +365,7 @@ class instance_stratholme : public InstanceMapScript return saveStream.str(); } - void Load(const char* in) + void Load(const char* in) OVERRIDE { if (!in) { @@ -426,7 +426,7 @@ class instance_stratholme : public InstanceMapScript return 0; } - void Update(uint32 diff) + void Update(uint32 diff) OVERRIDE { events.Update(diff); diff --git a/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp b/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp index 2239b4a6ed3..b2afee86774 100644 --- a/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp +++ b/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp @@ -79,7 +79,7 @@ public: bool s5; bool s6; - void Initialize() + void Initialize() OVERRIDE { GOAtalaiStatue1 = 0; GOAtalaiStatue2 = 0; @@ -99,7 +99,7 @@ public: s6 = false; } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp index ac5adde9e73..f1febf07bb7 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp @@ -81,7 +81,7 @@ public: uint32 SpectralRealmTimer; std::vector<uint64> SpectralRealmList; - void Initialize() + void Initialize() OVERRIDE { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); @@ -113,7 +113,7 @@ public: SpectralRealmTimer = 5000; } - bool IsEncounterInProgress() const + bool IsEncounterInProgress() const OVERRIDE { for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) if (m_auiEncounter[i] == IN_PROGRESS) @@ -141,7 +141,7 @@ public: return NULL; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -161,7 +161,7 @@ public: } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -272,7 +272,7 @@ public: SaveToDB(); } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; std::ostringstream stream; @@ -283,7 +283,7 @@ public: return stream.str(); } - void Load(char const* in) + void Load(char const* in) OVERRIDE { if (!in) { diff --git a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp index 7da755b5313..7d17a339d5f 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp @@ -47,7 +47,7 @@ class instance_uldaman : public InstanceMapScript { instance_uldaman_InstanceMapScript(Map* map) : InstanceScript(map) {} - void Initialize() + void Initialize() OVERRIDE { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); @@ -67,7 +67,7 @@ class instance_uldaman : public InstanceMapScript keystoneCheck = false; } - bool IsEncounterInProgress() const + bool IsEncounterInProgress() const OVERRIDE { for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) if (m_auiEncounter[i] == IN_PROGRESS) @@ -99,7 +99,7 @@ class instance_uldaman : public InstanceMapScript uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string str_data; - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -308,7 +308,7 @@ class instance_uldaman : public InstanceMapScript } } } - void Update(uint32 diff) + void Update(uint32 diff) OVERRIDE { if (!keystoneCheck) return; @@ -403,12 +403,12 @@ class instance_uldaman : public InstanceMapScript } } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { return str_data; } - void Load(const char* in) + void Load(const char* in) OVERRIDE { if (!in) { @@ -430,7 +430,7 @@ class instance_uldaman : public InstanceMapScript OUT_LOAD_INST_DATA_COMPLETE; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -494,7 +494,7 @@ class instance_uldaman : public InstanceMapScript return 0; } // end GetData64 - void ProcessEvent(WorldObject* /*gameObject*/, uint32 eventId) + void ProcessEvent(WorldObject* /*gameObject*/, uint32 eventId) OVERRIDE { switch (eventId) { diff --git a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp index 8068238b12e..5803f1b981c 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp @@ -90,7 +90,7 @@ class instance_zulaman : public InstanceMapScript uint32 m_auiEncounter[MAX_ENCOUNTER]; uint32 RandVendor[RAND_VENDOR]; - void Initialize() + void Initialize() OVERRIDE { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); @@ -119,7 +119,7 @@ class instance_zulaman : public InstanceMapScript m_auiEncounter[DATA_GONGEVENT] = NOT_STARTED; } - bool IsEncounterInProgress() const + bool IsEncounterInProgress() const OVERRIDE { for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) if (m_auiEncounter[i] == IN_PROGRESS) @@ -134,7 +134,7 @@ class instance_zulaman : public InstanceMapScript instance->SummonCreature(NPC_HARRISON_JONES, HarrisonJonesLoc); } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -151,7 +151,7 @@ class instance_zulaman : public InstanceMapScript } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -201,7 +201,7 @@ class instance_zulaman : public InstanceMapScript HandleGameObject(ZulJinGateGUID, true); } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; @@ -331,7 +331,7 @@ class instance_zulaman : public InstanceMapScript } } - void Update(uint32 diff) + void Update(uint32 diff) OVERRIDE { if (QuestMinute) { diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp index 27e1150818e..797695a70f3 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp @@ -38,7 +38,7 @@ class instance_zulgurub : public InstanceMapScript SetBossNumber(EncounterCount); } - void Initialize() + void Initialize() OVERRIDE { _zealotLorkhanGUID = 0; _zealotZathGUID = 0; @@ -50,13 +50,13 @@ class instance_zulgurub : public InstanceMapScript _goGongOfBethekkGUID = 0; } - bool IsEncounterInProgress() const + bool IsEncounterInProgress() const OVERRIDE { // not active in Zul'Gurub return false; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -81,7 +81,7 @@ class instance_zulgurub : public InstanceMapScript } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -129,7 +129,7 @@ class instance_zulgurub : public InstanceMapScript return 0; } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; @@ -140,7 +140,7 @@ class instance_zulgurub : public InstanceMapScript return saveStream.str(); } - void Load(const char* str) + void Load(const char* str) OVERRIDE { if (!str) { diff --git a/src/server/scripts/Events/childrens_week.cpp b/src/server/scripts/Events/childrens_week.cpp index 655fa65f2f2..5d4b0797081 100644 --- a/src/server/scripts/Events/childrens_week.cpp +++ b/src/server/scripts/Events/childrens_week.cpp @@ -721,7 +721,7 @@ class npc_alexstraza_the_lifebinder : public CreatureScript orphanGUID = 0; } - void SetData(uint32 type, uint32 data) + void SetData(uint32 type, uint32 data) OVERRIDE { // Existing SmartAI if (type == 0) diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp index c403246cc04..6aa12e8ce77 100644 --- a/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp +++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp @@ -79,7 +79,7 @@ public: uint8 countFires; uint8 deathTimes; - void Initialize() + void Initialize() OVERRIDE { memset(&encounter, 0, sizeof(encounter)); @@ -95,7 +95,7 @@ public: deathTimes = 0; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -108,7 +108,7 @@ public: } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { diff --git a/src/server/scripts/Kalimdor/CMakeLists.txt b/src/server/scripts/Kalimdor/CMakeLists.txt index 6a54d777c1e..752f8d3a2af 100644 --- a/src/server/scripts/Kalimdor/CMakeLists.txt +++ b/src/server/scripts/Kalimdor/CMakeLists.txt @@ -20,6 +20,7 @@ set(scripts_STAT_SRCS Kalimdor/ZulFarrak/zulfarrak.h Kalimdor/ZulFarrak/zulfarrak.cpp Kalimdor/ZulFarrak/instance_zulfarrak.cpp + Kalimdor/ZulFarrak/boss_zum_rah.cpp Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.h Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp index 65b146e4770..5f425f780cb 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp @@ -56,7 +56,7 @@ public: { instance_mount_hyjal_InstanceMapScript(Map* map) : InstanceScript(map) {} - void Initialize() + void Initialize() OVERRIDE { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); @@ -80,7 +80,7 @@ public: ArchiYell = false; } - bool IsEncounterInProgress() const + bool IsEncounterInProgress() const OVERRIDE { for (uint8 i = 0; i < EncounterCount; ++i) if (m_auiEncounter[i] == IN_PROGRESS) @@ -89,7 +89,7 @@ public: return false; } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -113,7 +113,7 @@ public: } } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -282,12 +282,12 @@ public: return 0; } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { return str_data; } - void Load(const char* in) + void Load(const char* in) OVERRIDE { if (!in) { diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp index 7df66c89594..9af1486275c 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp @@ -70,7 +70,7 @@ class instance_culling_of_stratholme : public InstanceMapScript _crateCount = 0; } - bool IsEncounterInProgress() const + bool IsEncounterInProgress() const OVERRIDE { for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) if (_encounterState[i] == IN_PROGRESS) @@ -79,7 +79,7 @@ class instance_culling_of_stratholme : public InstanceMapScript return false; } - void FillInitialWorldStates(WorldPacket& data) + void FillInitialWorldStates(WorldPacket& data) OVERRIDE { data << uint32(WORLDSTATE_SHOW_CRATES) << uint32(1); data << uint32(WORLDSTATE_CRATES_REVEALED) << uint32(_crateCount); @@ -88,7 +88,7 @@ class instance_culling_of_stratholme : public InstanceMapScript data << uint32(WORLDSTATE_TIME_GUARDIAN_SHOW) << uint32(0); } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -116,7 +116,7 @@ class instance_culling_of_stratholme : public InstanceMapScript } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -248,7 +248,7 @@ class instance_culling_of_stratholme : public InstanceMapScript return 0; } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; @@ -260,7 +260,7 @@ class instance_culling_of_stratholme : public InstanceMapScript return saveStream.str(); } - void Load(const char* in) + void Load(const char* in) OVERRIDE { if (!in) { diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp index add2c57335a..0cb9c1e454d 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp @@ -62,7 +62,7 @@ public: uint64 TarethaGUID; uint64 EpochGUID; - void Initialize() + void Initialize() OVERRIDE { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); @@ -104,7 +104,7 @@ public: } } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp index 003207eeecf..d8dfa2f5cf6 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp @@ -92,7 +92,7 @@ public: uint64 _medivhGUID; uint8 _currentRiftId; - void Initialize() + void Initialize() OVERRIDE { _medivhGUID = 0; Clear(); @@ -117,7 +117,7 @@ public: DoUpdateWorldState(WORLD_STATE_BM_RIFT, 0); } - bool IsEncounterInProgress() const + bool IsEncounterInProgress() const OVERRIDE { if (GetData(TYPE_MEDIVH) == IN_PROGRESS) return true; @@ -125,7 +125,7 @@ public: return false; } - void OnPlayerEnter(Player* player) + void OnPlayerEnter(Player* player) OVERRIDE { if (GetData(TYPE_MEDIVH) == IN_PROGRESS) return; @@ -133,7 +133,7 @@ public: player->SendUpdateWorldState(WORLD_STATE_BM, 0); } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { if (creature->GetEntry() == NPC_MEDIVH) _medivhGUID = creature->GetGUID(); @@ -317,7 +317,7 @@ public: } } - void Update(uint32 diff) + void Update(uint32 diff) OVERRIDE { if (m_auiEncounter[1] != IN_PROGRESS) return; diff --git a/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp b/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp index eed8ab22eb1..f9a392bb4d3 100644 --- a/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp +++ b/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp @@ -48,7 +48,7 @@ public: //Eruption is a BFS graph problem //One map to remember all floor, one map to keep floor that still need to erupt and one queue to know what needs to be removed - void Initialize() + void Initialize() OVERRIDE { SetBossNumber(EncounterCount); @@ -61,7 +61,7 @@ public: achievSheDeepBreathMore = true; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -71,7 +71,7 @@ public: } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { if ((go->GetGOInfo()->displayId == 4392 || go->GetGOInfo()->displayId == 4472) && go->GetGOInfo()->trap.spellId == 17731) { @@ -93,7 +93,7 @@ public: } } - void OnGameObjectRemove(GameObject* go) + void OnGameObjectRemove(GameObject* go) OVERRIDE { if ((go->GetGOInfo()->displayId == 4392 || go->GetGOInfo()->displayId == 4472) && go->GetGOInfo()->trap.spellId == 17731) { @@ -133,7 +133,7 @@ public: FloorEruptionGUID[1].erase(floorEruptedGUID); } - bool SetBossState(uint32 type, EncounterState state) + bool SetBossState(uint32 type, EncounterState state) OVERRIDE { if (!InstanceScript::SetBossState(type, state)) return false; @@ -196,7 +196,7 @@ public: return 0; } - void Update(uint32 diff) + void Update(uint32 diff) OVERRIDE { if (GetBossState(DATA_ONYXIA) == IN_PROGRESS) { @@ -240,7 +240,7 @@ public: return false; } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; @@ -251,7 +251,7 @@ public: return saveStream.str(); } - void Load(const char* strIn) + void Load(const char* strIn) OVERRIDE { if (!strIn) { diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp index 0284cdfce62..091c7e46585 100644 --- a/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp +++ b/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp @@ -47,7 +47,7 @@ public: std::string str_data; - void Initialize() + void Initialize() OVERRIDE { uiGongGUID = 0; @@ -56,7 +56,7 @@ public: memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; @@ -71,7 +71,7 @@ public: return str_data; } - void Load(const char* in) + void Load(const char* in) OVERRIDE { if (!in) { @@ -101,7 +101,7 @@ public: OUT_LOAD_INST_DATA_COMPLETE; } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { diff --git a/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp b/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp index dc2995540df..b40429af794 100644 --- a/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp +++ b/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp @@ -47,7 +47,7 @@ public: uint64 DoorWardGUID; int WardKeeperDeath; - void Initialize() + void Initialize() OVERRIDE { WardKeeperDeath = 0; DoorWardGUID = 0; @@ -69,7 +69,7 @@ public: return NULL; } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp index 87e0afeb8cc..52ef2a5430b 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp @@ -39,7 +39,7 @@ class instance_ruins_of_ahnqiraj : public InstanceMapScript _paralyzedGUID = 0; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -101,7 +101,7 @@ class instance_ruins_of_ahnqiraj : public InstanceMapScript return 0; } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp index 29b38befe29..54845c6b746 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp @@ -56,7 +56,7 @@ class instance_temple_of_ahnqiraj : public InstanceMapScript uint32 CthunPhase; - void Initialize() + void Initialize() OVERRIDE { IsBossDied[0] = false; IsBossDied[1] = false; @@ -74,7 +74,7 @@ class instance_temple_of_ahnqiraj : public InstanceMapScript CthunPhase = 0; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -99,7 +99,7 @@ class instance_temple_of_ahnqiraj : public InstanceMapScript } } - bool IsEncounterInProgress() const + bool IsEncounterInProgress() const OVERRIDE { //not active in AQ40 return false; diff --git a/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp b/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp index c477a82d085..5c4fb7bbaba 100644 --- a/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp +++ b/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp @@ -48,7 +48,7 @@ public: bool yelled; uint64 NaralexGUID; - void Initialize() + void Initialize() OVERRIDE { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); @@ -56,7 +56,7 @@ public: NaralexGUID = 0; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { if (creature->GetEntry() == DATA_NARALEX) NaralexGUID = creature->GetGUID(); @@ -104,7 +104,7 @@ public: return 0; } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; @@ -117,7 +117,7 @@ public: return saveStream.str(); } - void Load(const char* in) + void Load(const char* in) OVERRIDE { if (!in) { diff --git a/src/server/scripts/Kalimdor/ZulFarrak/boss_zum_rah.cpp b/src/server/scripts/Kalimdor/ZulFarrak/boss_zum_rah.cpp new file mode 100644 index 00000000000..bc31fd118be --- /dev/null +++ b/src/server/scripts/Kalimdor/ZulFarrak/boss_zum_rah.cpp @@ -0,0 +1,160 @@ +/* +* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at your +* option) any later version. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along +* with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +/* +Name: Boss_Zum_Rah +Category: Tanaris, ZulFarrak +*/ + +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "zulfarrak.h" + +enum Says +{ + SAY_SANCT_INVADE = 0, + SAY_WARD = 1, + SAY_KILL = 2 +}; + +enum Spells +{ + SPELL_SHADOW_BOLT = 12739, + SPELL_SHADOWBOLT_VOLLEY = 15245, + SPELL_WARD_OF_ZUM_RAH = 11086, + SPELL_HEALING_WAVE = 12491 +}; + +enum Events +{ + EVENT_SHADOW_BOLT = 1, + EVENT_SHADOWBOLT_VOLLEY = 2, + EVENT_WARD_OF_ZUM_RAH = 3, + EVENT_HEALING_WAVE = 4 +}; + +enum Faction +{ + ZUMRAH_FRIENDLY_FACTION = 35 +}; + +class boss_zum_rah : public CreatureScript +{ +public: + boss_zum_rah() : CreatureScript("boss_zum_rah") { } + + struct boss_zum_rahAI : public BossAI + { + boss_zum_rahAI(Creature* creature) : BossAI(creature, DATA_ZUM_RAH) { } + + void Reset() OVERRIDE + { + me->setFaction(ZUMRAH_FRIENDLY_FACTION); // areatrigger sets faction to enemy + _ward80 = false; + _ward40 = false; + _heal30 = false; + } + + void EnterCombat(Unit* /*who*/) OVERRIDE + { + Talk(SAY_SANCT_INVADE); + events.ScheduleEvent(EVENT_SHADOW_BOLT, 1000); + events.ScheduleEvent(EVENT_SHADOWBOLT_VOLLEY, 10000); + } + + void JustDied(Unit* /*killer*/) OVERRIDE + { + if (instance) + instance->SetData(DATA_ZUM_RAH, DONE); + } + + void KilledUnit(Unit* /*victim*/) OVERRIDE + { + Talk(SAY_KILL); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + events.Update(diff); + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_SHADOW_BOLT: + DoCastVictim(SPELL_SHADOW_BOLT); + events.ScheduleEvent(EVENT_SHADOW_BOLT, 4000); + break; + case EVENT_WARD_OF_ZUM_RAH: + DoCast(me,SPELL_WARD_OF_ZUM_RAH); + break; + case EVENT_HEALING_WAVE: + DoCast(me,SPELL_HEALING_WAVE); + break; + case EVENT_SHADOWBOLT_VOLLEY: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + DoCast(target, SPELL_SHADOWBOLT_VOLLEY); + events.ScheduleEvent(EVENT_SHADOWBOLT_VOLLEY, 9000); + break; + default: + break; + } + } + + if (!_ward80 && HealthBelowPct(80)) + { + _ward80 = true; + Talk(SAY_WARD); + events.ScheduleEvent(EVENT_WARD_OF_ZUM_RAH, 1000); + } + + if (!_ward40 && HealthBelowPct(40)) + { + _ward40 = true; + Talk(SAY_WARD); + events.ScheduleEvent(EVENT_WARD_OF_ZUM_RAH, 1000); + } + + if (!_heal30 && HealthBelowPct(30)) + { + _heal30 = true; + events.ScheduleEvent(EVENT_HEALING_WAVE, 3000); + } + + DoMeleeAttackIfReady(); + } + + private: + bool _ward80; + bool _ward40; + bool _heal30; + + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_zum_rahAI(creature); + } +}; + +void AddSC_boss_zum_rah() +{ + new boss_zum_rah(); +} diff --git a/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp index de27368a227..8e2d393e6a6 100644 --- a/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp +++ b/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp @@ -124,7 +124,7 @@ public: uint32 addGroupSize; uint32 waypoint; - void Initialize() + void Initialize() OVERRIDE { GahzRillaEncounter = NOT_STARTED; ZumrahGUID = 0; @@ -141,11 +141,11 @@ public: waypoint = 0; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { - case ENTRY_ZUMRAH: + case ENTRY_ZUM_RAH: ZumrahGUID = creature->GetGUID(); break; case ENTRY_BLY: @@ -177,7 +177,7 @@ public: } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -201,7 +201,7 @@ public: { switch (data) { - case ENTRY_ZUMRAH: + case ENTRY_ZUM_RAH: return ZumrahGUID; case ENTRY_BLY: return BlyGUID; diff --git a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.h b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.h index f634d593f44..0d16c1d1ddd 100644 --- a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.h +++ b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.h @@ -7,19 +7,24 @@ enum zfEntries { - ENTRY_ZUMRAH = 7271, - ENTRY_BLY = 7604, - ENTRY_RAVEN = 7605, - ENTRY_ORO = 7606, - ENTRY_WEEGLI = 7607, - ENTRY_MURTA = 7608, + ENTRY_ZUM_RAH = 7271, + ENTRY_BLY = 7604, + ENTRY_RAVEN = 7605, + ENTRY_ORO = 7606, + ENTRY_WEEGLI = 7607, + ENTRY_MURTA = 7608, - GO_END_DOOR = 146084, + GO_END_DOOR = 146084, - EVENT_PYRAMID = 1, + EVENT_PYRAMID = 1, EVENT_GAHZRILLA }; +enum DataTypes +{ + DATA_ZUM_RAH = 0 +}; + enum zfPyramidPhases { PYRAMID_NOT_STARTED, //default diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/instance_ahnkahet.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/instance_ahnkahet.cpp index 655a1d94e59..a7b82583d08 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/instance_ahnkahet.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/instance_ahnkahet.cpp @@ -66,7 +66,7 @@ public: std::string str_data; - void Initialize() + void Initialize() OVERRIDE { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); InitiandGUIDs.clear(); @@ -86,7 +86,7 @@ public: JedogaTarget = 0; } - bool IsEncounterInProgress() const + bool IsEncounterInProgress() const OVERRIDE { for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) if (m_auiEncounter[i] == IN_PROGRESS) @@ -95,7 +95,7 @@ public: return false; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -108,7 +108,7 @@ public: } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -276,7 +276,7 @@ public: return 0; } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; @@ -291,7 +291,7 @@ public: return str_data; } - void Load(const char* in) + void Load(const char* in) OVERRIDE { if (!in) { diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp index 65f817f148d..261a2748579 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp @@ -48,7 +48,7 @@ public: uint32 auiEncounter[MAX_ENCOUNTER]; - void Initialize() + void Initialize() OVERRIDE { memset(&auiEncounter, 0, sizeof(auiEncounter)); memset(&uiAnubarakDoor, 0, sizeof(uiAnubarakDoor)); @@ -62,7 +62,7 @@ public: uiKrikthirDoor = 0; } - bool IsEncounterInProgress() const + bool IsEncounterInProgress() const OVERRIDE { for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) if (auiEncounter[i] == IN_PROGRESS) @@ -71,7 +71,7 @@ public: return false; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -84,7 +84,7 @@ public: } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -161,7 +161,7 @@ public: return 0; } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; @@ -173,7 +173,7 @@ public: return saveStream.str(); } - void Load(const char* in) + void Load(const char* in) OVERRIDE { if (!in) { diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp index b1d03b58bc9..f5ef0f7cab3 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp @@ -49,7 +49,7 @@ public: bool m_bShadronKilled; bool m_bVesperonKilled; - void Initialize() + void Initialize() OVERRIDE { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); @@ -63,7 +63,7 @@ public: m_bVesperonKilled = false; } - bool IsEncounterInProgress() const + bool IsEncounterInProgress() const OVERRIDE { for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) if (m_auiEncounter[i] == IN_PROGRESS) @@ -72,7 +72,7 @@ public: return false; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp index 15e7c8227e9..d6c71889962 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp @@ -67,7 +67,7 @@ class instance_ruby_sanctum : public InstanceMapScript } } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -112,7 +112,7 @@ class instance_ruby_sanctum : public InstanceMapScript } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -155,7 +155,7 @@ class instance_ruby_sanctum : public InstanceMapScript } } - void OnGameObjectRemove(GameObject* go) + void OnGameObjectRemove(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -167,7 +167,7 @@ class instance_ruby_sanctum : public InstanceMapScript } } - void OnUnitDeath(Unit* unit) + void OnUnitDeath(Unit* unit) OVERRIDE { Creature* creature = unit->ToCreature(); if (!creature) @@ -224,7 +224,7 @@ class instance_ruby_sanctum : public InstanceMapScript return 0; } - bool SetBossState(uint32 type, EncounterState state) + bool SetBossState(uint32 type, EncounterState state) OVERRIDE { if (!InstanceScript::SetBossState(type, state)) return false; @@ -294,7 +294,7 @@ class instance_ruby_sanctum : public InstanceMapScript return BaltharusSharedHealth; } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; @@ -305,14 +305,14 @@ class instance_ruby_sanctum : public InstanceMapScript return saveStream.str(); } - void FillInitialWorldStates(WorldPacket& data) + void FillInitialWorldStates(WorldPacket& data) OVERRIDE { data << uint32(WORLDSTATE_CORPOREALITY_MATERIAL) << uint32(50); data << uint32(WORLDSTATE_CORPOREALITY_TWILIGHT) << uint32(50); data << uint32(WORLDSTATE_CORPOREALITY_TOGGLE) << uint32(0); } - void Load(char const* str) + void Load(char const* str) OVERRIDE { if (!str) { diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp index 9bc9afa4fa8..0f8e9de89be 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp @@ -61,7 +61,7 @@ enum Spells SPELL_RADIANCE = 66935, SPELL_VENGEANCE = 66865, - //Paletress + // Paletress SPELL_SMITE = 66536, SPELL_SMITE_H = 67674, SPELL_HOLY_FIRE = 66538, @@ -73,7 +73,34 @@ enum Spells SPELL_CONFESS = 66680, SPELL_SUMMON_MEMORY = 66545, - //Memory + // Merory of X (Summon) + SPELL_MEMORY_ALGALON = 66715, + SPELL_MEMORY_ARCHIMONDE = 66704, + SPELL_MEMORY_CHROMAGGUS = 66697, + SPELL_MEMORY_CYANIGOSA = 66709, + SPELL_MEMORY_DELRISSA = 66706, + SPELL_MEMORY_ECK = 66710, + SPELL_MEMORY_ENTROPIUS = 66707, + SPELL_MEMORY_GRUUL = 66702, + SPELL_MEMORY_HAKKAR = 66698, + SPELL_MEMORY_HEIGAN = 66712, + SPELL_MEMORY_HEROD = 66694, + SPELL_MEMORY_HOGGER = 66543, + SPELL_MEMORY_IGNIS = 66713, + SPELL_MEMORY_ILLIDAN = 66705, + SPELL_MEMORY_INGVAR = 66708, + SPELL_MEMORY_KALITHRESH = 66700, + SPELL_MEMORY_LUCIFRON = 66695, + SPELL_MEMORY_MALCHEZAAR = 66701, + SPELL_MEMORY_MUTANUS = 66692, + SPELL_MEMORY_ONYXIA = 66711, + SPELL_MEMORY_THUNDERAAN = 66696, + SPELL_MEMORY_VANCLEEF = 66691, + SPELL_MEMORY_VASHJ = 66703, + SPELL_MEMORY_VEKNILASH = 66699, + SPELL_MEMORY_VEZAX = 66714, + + // Memory SPELL_OLD_WOUNDS = 66620, SPELL_OLD_WOUNDS_H = 67679, SPELL_SHADOWS_PAST = 66619, @@ -566,6 +593,84 @@ public: } }; +uint32 const memorySpellId[25] = +{ + SPELL_MEMORY_ALGALON, + SPELL_MEMORY_ARCHIMONDE, + SPELL_MEMORY_CHROMAGGUS, + SPELL_MEMORY_CYANIGOSA, + SPELL_MEMORY_DELRISSA, + SPELL_MEMORY_ECK, + SPELL_MEMORY_ENTROPIUS, + SPELL_MEMORY_GRUUL, + SPELL_MEMORY_HAKKAR, + SPELL_MEMORY_HEIGAN, + SPELL_MEMORY_HEROD, + SPELL_MEMORY_HOGGER, + SPELL_MEMORY_IGNIS, + SPELL_MEMORY_ILLIDAN, + SPELL_MEMORY_INGVAR, + SPELL_MEMORY_KALITHRESH, + SPELL_MEMORY_LUCIFRON, + SPELL_MEMORY_MALCHEZAAR, + SPELL_MEMORY_MUTANUS, + SPELL_MEMORY_ONYXIA, + SPELL_MEMORY_THUNDERAAN, + SPELL_MEMORY_VANCLEEF, + SPELL_MEMORY_VASHJ, + SPELL_MEMORY_VEKNILASH, + SPELL_MEMORY_VEZAX +}; + +// 66545 - Summon Memory +class spell_paletress_summon_memory : public SpellScriptLoader +{ + public: + spell_paletress_summon_memory() : SpellScriptLoader("spell_paletress_summon_memory") { } + + class spell_paletress_summon_memory_SpellScript : public SpellScript + { + PrepareSpellScript(spell_paletress_summon_memory_SpellScript); + + bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE + { + for (uint8 i = 0; i < 25; ++i) + if (!sSpellMgr->GetSpellInfo(memorySpellId[i])) + return false; + return true; + } + + void FilterTargets(std::list<WorldObject*>& targets) + { + if (targets.empty()) + return; + + WorldObject* target = Trinity::Containers::SelectRandomContainerElement(targets); + targets.clear(); + targets.push_back(target); + } + + void HandleScript(SpellEffIndex /*effIndex*/) + { + Unit* caster = GetCaster(); + + if (Player* target = GetHitPlayer()) + caster->CastSpell(target, memorySpellId[urand(0, 24)], true); + } + + void Register() OVERRIDE + { + OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_paletress_summon_memory_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY); + OnEffectHitTarget += SpellEffectFn(spell_paletress_summon_memory_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } + }; + + SpellScript* GetSpellScript() const OVERRIDE + { + return new spell_paletress_summon_memory_SpellScript(); + } +}; + void AddSC_boss_argent_challenge() { new boss_eadric(); @@ -573,4 +678,5 @@ void AddSC_boss_argent_challenge() new boss_paletress(); new npc_memory(); new npc_argent_soldier(); + new spell_paletress_summon_memory(); } diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp index 8aa5060609f..78ee6ba1c6b 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp @@ -66,7 +66,7 @@ public: bool bDone; - void Initialize() + void Initialize() OVERRIDE { uiMovementDone = 0; uiGrandChampionsDeaths = 0; @@ -90,7 +90,7 @@ public: memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); } - bool IsEncounterInProgress() const + bool IsEncounterInProgress() const OVERRIDE { for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { @@ -101,7 +101,7 @@ public: return false; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { Map::PlayerList const &players = instance->GetPlayers(); uint32 TeamInInstance = 0; @@ -152,7 +152,7 @@ public: } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -282,7 +282,7 @@ public: } } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; @@ -301,7 +301,7 @@ public: return str_data; } - void Load(const char* in) + void Load(const char* in) OVERRIDE { if (!in) { diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp index 6011b457a1c..43e696f3b3c 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp @@ -31,7 +31,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript { instance_trial_of_the_crusader_InstanceMapScript(Map* map) : InstanceScript(map) {} - void Initialize() + void Initialize() OVERRIDE { SetBossNumber(MAX_ENCOUNTERS); TrialCounter = 50; @@ -69,7 +69,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript FloorGUID = 0; } - bool IsEncounterInProgress() const + bool IsEncounterInProgress() const OVERRIDE { for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i) if (GetBossState(i) == IN_PROGRESS) @@ -82,7 +82,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript return false; } - void OnPlayerEnter(Player* player) + void OnPlayerEnter(Player* player) OVERRIDE { if (instance->IsHeroic()) { @@ -122,7 +122,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript go->SetGoState(GO_STATE_READY); } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -179,7 +179,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -227,7 +227,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript } } - bool SetBossState(uint32 type, EncounterState state) + bool SetBossState(uint32 type, EncounterState state) OVERRIDE { if (!InstanceScript::SetBossState(type, state)) return false; @@ -629,7 +629,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript return 0; } - void Update(uint32 diff) + void Update(uint32 diff) OVERRIDE { if (GetData(TYPE_NORTHREND_BEASTS) == SNAKES_SPECIAL && NotOneButTwoJormungarsTimer) { @@ -665,12 +665,12 @@ class instance_trial_of_the_crusader : public InstanceMapScript NeedSave = false; } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { return SaveDataBuffer; } - void Load(const char* strIn) + void Load(const char* strIn) OVERRIDE { if (!strIn) { @@ -697,7 +697,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript OUT_LOAD_INST_DATA_COMPLETE; } - bool CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target*/, uint32 /*miscvalue1*/) + bool CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target*/, uint32 /*miscvalue1*/) OVERRIDE { switch (criteria_id) { diff --git a/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp b/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp index e2ed883ad08..240e27ad026 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp @@ -170,7 +170,7 @@ class instance_drak_tharon_keep : public InstanceMapScript return saveStream.str(); } - void Load(char const* str) OVERRIDE + void Load(char const* str) OVERRIDE OVERRIDE { if (!str) { diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp index ca4a9c43e60..ae57732e9e2 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp @@ -43,7 +43,7 @@ class instance_forge_of_souls : public InstanceMapScript teamInInstance = 0; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { Map::PlayerList const &players = instance->GetPlayers(); if (!players.isEmpty()) @@ -101,7 +101,7 @@ class instance_forge_of_souls : public InstanceMapScript return 0; } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; @@ -112,7 +112,7 @@ class instance_forge_of_souls : public InstanceMapScript return saveStream.str(); } - void Load(const char* in) + void Load(const char* in) OVERRIDE { if (!in) { diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp index a026a6636d4..40110b8a509 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp @@ -510,7 +510,7 @@ public: return saveStream.str(); } - void Load(char const* in) OVERRIDE + void Load(char const* in) OVERRIDE OVERRIDE { if (!in) { diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp index 5efc2e6afaf..a789d0c6a70 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp @@ -53,13 +53,13 @@ class instance_pit_of_saron : public InstanceMapScript _teamInInstance = 0; } - void OnPlayerEnter(Player* player) + void OnPlayerEnter(Player* player) OVERRIDE { if (!_teamInInstance) _teamInInstance = player->GetTeam(); } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { if (!_teamInInstance) { @@ -164,7 +164,7 @@ class instance_pit_of_saron : public InstanceMapScript } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -175,7 +175,7 @@ class instance_pit_of_saron : public InstanceMapScript } } - void OnGameObjectRemove(GameObject* go) + void OnGameObjectRemove(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -186,7 +186,7 @@ class instance_pit_of_saron : public InstanceMapScript } } - bool SetBossState(uint32 type, EncounterState state) + bool SetBossState(uint32 type, EncounterState state) OVERRIDE { if (!InstanceScript::SetBossState(type, state)) return false; @@ -264,7 +264,7 @@ class instance_pit_of_saron : public InstanceMapScript return 0; } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; @@ -275,7 +275,7 @@ class instance_pit_of_saron : public InstanceMapScript return saveStream.str(); } - void Load(const char* in) + void Load(const char* in) OVERRIDE { if (!in) { diff --git a/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp b/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp index 681ffff46b3..780ab6358a6 100644 --- a/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp +++ b/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp @@ -89,7 +89,7 @@ public: std::string str_data; - void Initialize() + void Initialize() OVERRIDE { spawnSupport = false; @@ -133,7 +133,7 @@ public: memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); } - bool IsEncounterInProgress() const + bool IsEncounterInProgress() const OVERRIDE { for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) if (m_auiEncounter[i] == IN_PROGRESS) @@ -142,7 +142,7 @@ public: return false; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -168,7 +168,7 @@ public: } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -384,7 +384,7 @@ public: return 0; } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; @@ -401,7 +401,7 @@ public: return str_data; } - void Load(const char* in) + void Load(const char* in) OVERRIDE { if (!in) { @@ -440,7 +440,7 @@ public: OUT_LOAD_INST_DATA_COMPLETE; } - void Update(uint32 diff) + void Update(uint32 diff) OVERRIDE { // Spawn the support for the bridge if necessary if (spawnSupport) diff --git a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp index d1a0e1a3e26..9a2781a5bcb 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp @@ -151,7 +151,7 @@ class instance_icecrown_citadel : public InstanceMapScript BloodQuickeningMinutes = 0; } - void FillInitialWorldStates(WorldPacket& data) + void FillInitialWorldStates(WorldPacket& data) OVERRIDE { data << uint32(WORLDSTATE_SHOW_TIMER) << uint32(BloodQuickeningState == IN_PROGRESS); data << uint32(WORLDSTATE_EXECUTION_TIME) << uint32(BloodQuickeningMinutes); @@ -160,13 +160,13 @@ class instance_icecrown_citadel : public InstanceMapScript data << uint32(WORLDSTATE_ATTEMPTS_MAX) << uint32(MaxHeroicAttempts); } - void OnPlayerEnter(Player* player) + void OnPlayerEnter(Player* player) OVERRIDE { if (!TeamInInstance) TeamInInstance = player->GetTeam(); } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { if (!TeamInInstance) { @@ -309,7 +309,7 @@ class instance_icecrown_citadel : public InstanceMapScript } } - void OnCreatureRemove(Creature* creature) + void OnCreatureRemove(Creature* creature) OVERRIDE { if (creature->GetEntry() == NPC_SINDRAGOSA) SindragosaGUID = 0; @@ -348,7 +348,7 @@ class instance_icecrown_citadel : public InstanceMapScript return entry; } - void OnUnitDeath(Unit* unit) + void OnUnitDeath(Unit* unit) OVERRIDE { Creature* creature = unit->ToCreature(); if (!creature) @@ -406,7 +406,7 @@ class instance_icecrown_citadel : public InstanceMapScript } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -558,7 +558,7 @@ class instance_icecrown_citadel : public InstanceMapScript } } - void OnGameObjectRemove(GameObject* go) + void OnGameObjectRemove(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -683,7 +683,7 @@ class instance_icecrown_citadel : public InstanceMapScript return 0; } - bool SetBossState(uint32 type, EncounterState state) + bool SetBossState(uint32 type, EncounterState state) OVERRIDE { if (!InstanceScript::SetBossState(type, state)) return false; @@ -912,7 +912,7 @@ class instance_icecrown_citadel : public InstanceMapScript } } - bool CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target*/, uint32 /*miscvalue1*/) + bool CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target*/, uint32 /*miscvalue1*/) OVERRIDE { switch (criteria_id) { @@ -952,7 +952,7 @@ class instance_icecrown_citadel : public InstanceMapScript return false; } - bool CheckRequiredBosses(uint32 bossId, Player const* player = NULL) const + bool CheckRequiredBosses(uint32 bossId, Player const* player = NULL) const OVERRIDE { if (player && player->GetSession()->HasPermission(RBAC_PERM_SKIP_CHECK_INSTANCE_REQUIRED_BOSSES)) return true; @@ -1107,7 +1107,7 @@ class instance_icecrown_citadel : public InstanceMapScript } } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; @@ -1119,7 +1119,7 @@ class instance_icecrown_citadel : public InstanceMapScript return saveStream.str(); } - void Load(const char* str) + void Load(const char* str) OVERRIDE { if (!str) { @@ -1161,7 +1161,7 @@ class instance_icecrown_citadel : public InstanceMapScript OUT_LOAD_INST_DATA_COMPLETE; } - void Update(uint32 diff) + void Update(uint32 diff) OVERRIDE { if (BloodQuickeningState != IN_PROGRESS && GetBossState(DATA_THE_LICH_KING) != IN_PROGRESS) return; @@ -1219,7 +1219,7 @@ class instance_icecrown_citadel : public InstanceMapScript } } - void ProcessEvent(WorldObject* /*source*/, uint32 eventId) + void ProcessEvent(WorldObject* /*source*/, uint32 eventId) OVERRIDE { switch (eventId) { diff --git a/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp b/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp index fa50e478d5a..57f36ddc3a4 100644 --- a/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp +++ b/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp @@ -131,7 +131,7 @@ class instance_naxxramas : public InstanceMapScript memset(PortalsGUID, 0, sizeof(PortalsGUID)); } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -175,12 +175,12 @@ class instance_naxxramas : public InstanceMapScript AddMinion(creature, true); } - void OnCreatureRemove(Creature* creature) + void OnCreatureRemove(Creature* creature) OVERRIDE { AddMinion(creature, false); } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { if (go->GetGOInfo()->displayId == 6785 || go->GetGOInfo()->displayId == 1287) { @@ -220,7 +220,7 @@ class instance_naxxramas : public InstanceMapScript AddDoor(go, true); } - void OnGameObjectRemove(GameObject* go) + void OnGameObjectRemove(GameObject* go) OVERRIDE { if (go->GetGOInfo()->displayId == 6785 || go->GetGOInfo()->displayId == 1287) { @@ -247,7 +247,7 @@ class instance_naxxramas : public InstanceMapScript AddDoor(go, false); } - void OnUnitDeath(Unit* unit) + void OnUnitDeath(Unit* unit) OVERRIDE { if (unit->GetTypeId() == TYPEID_PLAYER && IsEncounterInProgress()) { @@ -344,7 +344,7 @@ class instance_naxxramas : public InstanceMapScript return 0; } - bool SetBossState(uint32 id, EncounterState state) + bool SetBossState(uint32 id, EncounterState state) OVERRIDE { if (!InstanceScript::SetBossState(id, state)) return false; @@ -427,7 +427,7 @@ class instance_naxxramas : public InstanceMapScript return false; } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; @@ -438,7 +438,7 @@ class instance_naxxramas : public InstanceMapScript return saveStream.str(); } - void Load(const char* strIn) + void Load(const char* strIn) OVERRIDE { if (!strIn) { diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp index ef3162d892e..4da66452d48 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp @@ -96,7 +96,7 @@ enum Spells SPELL_PORTAL_BEAM = 56046, // Malygos cast on portal to activate it during PHASE_NOT_STARTED //Phase I - SPELL_BERSEKER = 60670, + SPELL_BERSERK = 60670, SPELL_MALYGOS_BERSERK = 47008, // it's the berserk spell that will hit only Malygos after 10 min of 60670 SPELL_PORTAL_VISUAL_CLOSED = 55949, SPELL_SUMMON_POWER_PARK = 56142, @@ -580,7 +580,7 @@ public: } Talk(SAY_START_P_ONE); - DoCast(SPELL_BERSEKER); // periodic aura, first tick in 10 minutes + DoCast(SPELL_BERSERK); // periodic aura, first tick in 10 minutes if (instance) instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT); } diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp index 15d86cc9f25..a1511fb3dd8 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp @@ -48,7 +48,7 @@ public: alexstraszaBunnyGUID = 0; }; - bool SetBossState(uint32 type, EncounterState state) + bool SetBossState(uint32 type, EncounterState state) OVERRIDE { if (!InstanceScript::SetBossState(type, state)) return false; @@ -94,7 +94,7 @@ public: instance->AddToMap(go); } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -130,7 +130,7 @@ public: } } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -152,7 +152,7 @@ public: } } - void OnUnitDeath(Unit* unit) + void OnUnitDeath(Unit* unit) OVERRIDE { if (unit->GetTypeId() != TYPEID_PLAYER) return; @@ -278,7 +278,7 @@ public: return 0; } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; @@ -289,7 +289,7 @@ public: return saveStream.str(); } - void Load(const char* str) + void Load(const char* str) OVERRIDE { if (!str) { diff --git a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp index 507e75b95f4..4df7109c16c 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp @@ -53,7 +53,7 @@ public: std::string strInstData; - void Initialize() + void Initialize() OVERRIDE { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); @@ -64,7 +64,7 @@ public: TelestrasContainmentSphere = 0; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { Map::PlayerList const &players = instance->GetPlayers(); uint32 TeamInInstance = 0; @@ -126,7 +126,7 @@ public: } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -234,7 +234,7 @@ public: return 0; } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { return strInstData; } diff --git a/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp index d1f0105daf1..428d24a38ea 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp @@ -43,7 +43,7 @@ public: { instance_oculus_InstanceMapScript(Map* map) : InstanceScript(map) {} - void Initialize() + void Initialize() OVERRIDE { SetBossNumber(MAX_ENCOUNTER); @@ -65,7 +65,7 @@ public: verdisaGUID = 0; } - void OnUnitDeath(Unit* unit) + void OnUnitDeath(Unit* unit) OVERRIDE { Creature* creature = unit->ToCreature(); if (!creature) @@ -81,7 +81,7 @@ public: varos->RemoveAllAuras(); } - void OnPlayerEnter(Player* player) + void OnPlayerEnter(Player* player) OVERRIDE { if (GetBossState(DATA_DRAKOS_EVENT) == DONE && GetBossState(DATA_VAROS_EVENT) != DONE) { @@ -108,7 +108,7 @@ public: drake->AI()->DoAction(ACTION_CALL_DRAGON_EVENT); } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -171,7 +171,7 @@ public: } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -191,7 +191,7 @@ public: } } - bool SetBossState(uint32 type, EncounterState state) + bool SetBossState(uint32 type, EncounterState state) OVERRIDE { if (!InstanceScript::SetBossState(type, state)) return false; @@ -304,7 +304,7 @@ public: gwhelp->SetPhaseMask(1, true); } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; @@ -317,7 +317,7 @@ public: return str_data; } - void Load(const char* in) + void Load(const char* in) OVERRIDE { if (!in) { diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp index ab92d3e4616..e6d2ededd73 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp @@ -61,7 +61,7 @@ public: uint64 m_uiLokenDoorGUID; uint64 m_uiLokenGlobeGUID; - void Initialize() + void Initialize() OVERRIDE { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); @@ -77,7 +77,7 @@ public: m_uiLokenGlobeGUID = 0; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -96,7 +96,7 @@ public: } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -206,7 +206,7 @@ public: return 0; } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; @@ -218,7 +218,7 @@ public: return saveStream.str(); } - void Load(const char* in) + void Load(const char* in) OVERRIDE { if (!in) { diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp index b84d96a6712..d4b8750dbba 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp @@ -65,7 +65,7 @@ public: std::string str_data; - void Initialize() + void Initialize() OVERRIDE { uiMaidenOfGrief = 0; uiKrystallus = 0; @@ -90,7 +90,7 @@ public: m_auiEncounter[i] = NOT_STARTED; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -104,7 +104,7 @@ public: } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -221,7 +221,7 @@ public: return 0; } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; @@ -234,7 +234,7 @@ public: return str_data; } - void Load(const char* in) + void Load(const char* in) OVERRIDE { if (!in) { diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp index 13608285b08..8691f9769fa 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp @@ -110,7 +110,7 @@ class instance_ulduar : public InstanceMapScript std::set<uint64> mRubbleSpawns; - void Initialize() + void Initialize() OVERRIDE { SetBossNumber(MAX_ENCOUNTER); LoadDoorData(doorData); @@ -172,13 +172,13 @@ class instance_ulduar : public InstanceMapScript memset(_summonYSKeeper, false, sizeof(_summonYSKeeper)); } - void FillInitialWorldStates(WorldPacket& packet) + void FillInitialWorldStates(WorldPacket& packet) OVERRIDE { packet << uint32(WORLD_STATE_ALGALON_TIMER_ENABLED) << uint32(_algalonTimer && _algalonTimer <= 60); packet << uint32(WORLD_STATE_ALGALON_DESPAWN_TIMER) << uint32(std::min<uint32>(_algalonTimer, 60)); } - void OnPlayerEnter(Player* player) + void OnPlayerEnter(Player* player) OVERRIDE { if (!TeamInInstance) TeamInInstance = player->GetTeam(); @@ -226,7 +226,7 @@ class instance_ulduar : public InstanceMapScript instance->SummonCreature(NPC_MIMIRON_YS, YSKeepersPos[3]); } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { if (!TeamInInstance) { @@ -419,7 +419,7 @@ class instance_ulduar : public InstanceMapScript } } - void OnCreatureRemove(Creature* creature) + void OnCreatureRemove(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -569,7 +569,7 @@ class instance_ulduar : public InstanceMapScript } } - void OnGameObjectRemove(GameObject* gameObject) + void OnGameObjectRemove(GameObject* gameObject) OVERRIDE { switch (gameObject->GetEntry()) { @@ -587,7 +587,7 @@ class instance_ulduar : public InstanceMapScript } } - void OnUnitDeath(Unit* unit) + void OnUnitDeath(Unit* unit) OVERRIDE { Creature* creature = unit->ToCreature(); if (!creature) @@ -614,7 +614,7 @@ class instance_ulduar : public InstanceMapScript } } - void ProcessEvent(WorldObject* /*gameObject*/, uint32 eventId) + void ProcessEvent(WorldObject* /*gameObject*/, uint32 eventId) OVERRIDE { // Flame Leviathan's Tower Event triggers Creature* FlameLeviathan = instance->GetCreature(LeviathanGUID); @@ -648,7 +648,7 @@ class instance_ulduar : public InstanceMapScript } } - bool SetBossState(uint32 type, EncounterState state) + bool SetBossState(uint32 type, EncounterState state) OVERRIDE { if (!InstanceScript::SetBossState(type, state)) return false; @@ -951,7 +951,7 @@ class instance_ulduar : public InstanceMapScript return 0; } - bool CheckAchievementCriteriaMeet(uint32 criteriaId, Player const*, Unit const* /* = NULL */, uint32 /* = 0 */) + bool CheckAchievementCriteriaMeet(uint32 criteriaId, Player const*, Unit const* /* = NULL */, uint32 /* = 0 */) OVERRIDE { switch (criteriaId) { @@ -986,7 +986,7 @@ class instance_ulduar : public InstanceMapScript return false; } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; @@ -1000,7 +1000,7 @@ class instance_ulduar : public InstanceMapScript return saveStream.str(); } - void Load(char const* strIn) + void Load(char const* strIn) OVERRIDE { if (!strIn) { @@ -1066,7 +1066,7 @@ class instance_ulduar : public InstanceMapScript OUT_LOAD_INST_DATA_COMPLETE; } - void Update(uint32 diff) + void Update(uint32 diff) OVERRIDE { if (_events.Empty()) return; diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp index ad7817daeb0..92857ce06db 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp @@ -78,7 +78,7 @@ public: uint32 forge_event[3]; std::string str_data; - void Initialize() + void Initialize() OVERRIDE { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); @@ -99,7 +99,7 @@ public: portcullis[1] = 0; } - bool IsEncounterInProgress() const + bool IsEncounterInProgress() const OVERRIDE { for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) if (m_auiEncounter[i] == IN_PROGRESS) @@ -125,7 +125,7 @@ public: return NULL; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -136,7 +136,7 @@ public: } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -259,7 +259,7 @@ public: return 0; } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; @@ -273,7 +273,7 @@ public: return str_data; } - void Load(const char* in) + void Load(const char* in) OVERRIDE { if (!in) { diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_pinnacle.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_pinnacle.cpp index 4b73458e72f..0277c21cb83 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_pinnacle.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_pinnacle.cpp @@ -71,7 +71,7 @@ public: std::string str_data; - void Initialize() + void Initialize() OVERRIDE { for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) m_auiEncounter[i] = NOT_STARTED; @@ -95,7 +95,7 @@ public: uiSacrificedPlayer = 0; } - bool IsEncounterInProgress() const + bool IsEncounterInProgress() const OVERRIDE { for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) if (m_auiEncounter[i] == IN_PROGRESS) @@ -104,7 +104,7 @@ public: return false; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -121,7 +121,7 @@ public: } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -213,7 +213,7 @@ public: return 0; } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; @@ -227,7 +227,7 @@ public: return str_data; } - void Load(const char* in) + void Load(const char* in) OVERRIDE { if (!in) { diff --git a/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp index bdb2f7e88f1..77fc0877056 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp @@ -44,7 +44,7 @@ class instance_archavon : public InstanceMapScript KoralonDeath = 0; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -74,7 +74,7 @@ class instance_archavon : public InstanceMapScript return 0; } - bool SetBossState(uint32 type, EncounterState state) + bool SetBossState(uint32 type, EncounterState state) OVERRIDE { if (!InstanceScript::SetBossState(type, state)) return false; @@ -103,7 +103,7 @@ class instance_archavon : public InstanceMapScript return true; } - bool CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target*/, uint32 /*miscvalue1*/) + bool CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target*/, uint32 /*miscvalue1*/) OVERRIDE { switch (criteria_id) { diff --git a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp index 483d243c51d..025e93ac8d9 100644 --- a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp +++ b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp @@ -168,7 +168,7 @@ public: std::string str_data; - void Initialize() + void Initialize() OVERRIDE { uiMoragg = 0; uiErekem = 0; @@ -218,7 +218,7 @@ public: memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); } - bool IsEncounterInProgress() const + bool IsEncounterInProgress() const OVERRIDE { for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) if (m_auiEncounter[i] == IN_PROGRESS) @@ -227,7 +227,7 @@ public: return false; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -272,7 +272,7 @@ public: } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -615,7 +615,7 @@ public: } } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; @@ -632,7 +632,7 @@ public: return str_data; } - void Load(const char* in) + void Load(const char* in) OVERRIDE { if (!in) { @@ -681,7 +681,7 @@ public: return true; } - void Update(uint32 diff) + void Update(uint32 diff) OVERRIDE { if (!instance->HavePlayers()) return; diff --git a/src/server/scripts/Northrend/zone_zuldrak.cpp b/src/server/scripts/Northrend/zone_zuldrak.cpp index 5e9a19685bc..7281c8a5b1e 100644 --- a/src/server/scripts/Northrend/zone_zuldrak.cpp +++ b/src/server/scripts/Northrend/zone_zuldrak.cpp @@ -1460,9 +1460,9 @@ public: _events.ScheduleEvent(EVENT_TURN_TO_POT, urand(15000, 26000)); } - void SetData(uint32 Type, uint32 Data) OVERRIDE + void SetData(uint32 type, uint32 data) OVERRIDE { - if (Type == 1 && Data == 1) + if (type == 1 && data == 1) switch (_getingredienttry) { case 2: diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp index 67f4dc1423a..f380914506e 100644 --- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp +++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp @@ -44,13 +44,13 @@ public: SetBossNumber(EncounterCount); } - void Initialize() + void Initialize() OVERRIDE { SetBossState(DATA_ANZU, NOT_STARTED); iIkissDoorGUID = 0; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { if (creature->GetEntry() == NPC_ANZU) { @@ -61,13 +61,13 @@ public: } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { if (go->GetEntry() == GO_IKISS_DOOR) iIkissDoorGUID = go->GetGUID(); } - bool SetBossState(uint32 type, EncounterState state) + bool SetBossState(uint32 type, EncounterState state) OVERRIDE { if (!InstanceScript::SetBossState(type, state)) return false; @@ -89,7 +89,7 @@ public: return true; } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; @@ -100,7 +100,7 @@ public: return saveStream.str(); } - void Load(const char* str) + void Load(const char* str) OVERRIDE { if (!str) { diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp index 6e579003262..9a507979d8d 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp @@ -57,7 +57,7 @@ public: uint64 m_uiGrandmasterVorpil; uint32 m_uiFelOverseerCount; - void Initialize() + void Initialize() OVERRIDE { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); @@ -68,7 +68,7 @@ public: m_uiFelOverseerCount = 0; } - bool IsEncounterInProgress() const + bool IsEncounterInProgress() const OVERRIDE { for (uint8 i = 0; i < EncounterCount; ++i) if (m_auiEncounter[i] == IN_PROGRESS) @@ -77,7 +77,7 @@ public: return false; } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -94,7 +94,7 @@ public: } } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -194,12 +194,12 @@ public: return 0; } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { return str_data; } - void Load(const char* in) + void Load(const char* in) OVERRIDE { if (!in) { diff --git a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp index 2a82810a3c1..bd70ce012ba 100644 --- a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp +++ b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp @@ -83,7 +83,7 @@ public: uint64 IllidanGate; uint64 IllidanDoor[2]; - void Initialize() + void Initialize() OVERRIDE { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); @@ -115,7 +115,7 @@ public: IllidanDoor[1] = 0; } - bool IsEncounterInProgress() const + bool IsEncounterInProgress() const OVERRIDE { for (uint8 i = 0; i < EncounterCount; ++i) if (m_auiEncounter[i] == IN_PROGRESS) @@ -141,7 +141,7 @@ public: return NULL; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -160,7 +160,7 @@ public: } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -364,12 +364,12 @@ public: return 0; } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { return str_data; } - void Load(const char* in) + void Load(const char* in) OVERRIDE { if (!in) { diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp index 79e89740b2d..7590faee1db 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp @@ -89,7 +89,7 @@ class instance_serpent_shrine : public InstanceMapScript { } - void Initialize() + void Initialize() OVERRIDE { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); @@ -122,7 +122,7 @@ class instance_serpent_shrine : public InstanceMapScript } - bool IsEncounterInProgress() const + bool IsEncounterInProgress() const OVERRIDE { for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) if (m_auiEncounter[i] == IN_PROGRESS) @@ -131,7 +131,7 @@ class instance_serpent_shrine : public InstanceMapScript return false; } - void Update(uint32 diff) + void Update(uint32 diff) OVERRIDE { //Water checks if (WaterCheckTimer <= diff) @@ -191,7 +191,7 @@ class instance_serpent_shrine : public InstanceMapScript FrenzySpawnTimer -= diff; } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -216,7 +216,7 @@ class instance_serpent_shrine : public InstanceMapScript } } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -392,7 +392,7 @@ class instance_serpent_shrine : public InstanceMapScript return 0; } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; std::ostringstream stream; @@ -402,7 +402,7 @@ class instance_serpent_shrine : public InstanceMapScript return stream.str(); } - void Load(const char* in) + void Load(const char* in) OVERRIDE { if (!in) { diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp index f536f1af45b..56a0e3857fa 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp @@ -86,7 +86,7 @@ public: uint64 AccessPanelHydro; uint64 AccessPanelMek; - void Initialize() + void Initialize() OVERRIDE { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); @@ -98,7 +98,7 @@ public: AccessPanelMek = 0; } - bool IsEncounterInProgress() const + bool IsEncounterInProgress() const OVERRIDE { for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) if (m_auiEncounter[i] == IN_PROGRESS) @@ -107,7 +107,7 @@ public: return false; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -117,7 +117,7 @@ public: } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -127,7 +127,7 @@ public: } } - void SetData(uint32 type, uint32 data) + void SetData(uint32 type, uint32 data) OVERRIDE { switch (type) { @@ -167,7 +167,7 @@ public: SaveToDB(); } - uint32 GetData(uint32 type) const + uint32 GetData(uint32 type) const OVERRIDE { switch (type) { @@ -183,7 +183,7 @@ public: return 0; } - uint64 GetData64(uint32 data) const + uint64 GetData64(uint32 data) const OVERRIDE { switch (data) { @@ -197,7 +197,7 @@ public: return 0; } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; @@ -208,7 +208,7 @@ public: return stream.str(); } - void Load(const char* in) + void Load(const char* in) OVERRIDE { if (!in) { diff --git a/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp b/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp index 3fbdfe94c05..d8399793df4 100644 --- a/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp +++ b/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp @@ -60,7 +60,7 @@ public: uint64 MaulgarDoor; uint64 GruulDoor; - void Initialize() + void Initialize() OVERRIDE { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); @@ -75,7 +75,7 @@ public: GruulDoor = 0; } - bool IsEncounterInProgress() const + bool IsEncounterInProgress() const OVERRIDE { for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) if (m_auiEncounter[i] == IN_PROGRESS) @@ -84,7 +84,7 @@ public: return false; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -96,7 +96,7 @@ public: } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -166,7 +166,7 @@ public: return 0; } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; std::ostringstream stream; @@ -176,7 +176,7 @@ public: return stream.str(); } - void Load(const char* in) + void Load(const char* in) OVERRIDE { if (!in) { diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp index 22b1b776e40..2193d3841a6 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp @@ -77,7 +77,7 @@ class instance_blood_furnace : public InstanceMapScript uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string str_data; - void Initialize() + void Initialize() OVERRIDE { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); @@ -114,7 +114,7 @@ class instance_blood_furnace : public InstanceMapScript BroggokLeverGUID = 0; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -133,13 +133,13 @@ class instance_blood_furnace : public InstanceMapScript } } - void OnUnitDeath(Unit* unit) + void OnUnitDeath(Unit* unit) OVERRIDE { if (unit && unit->GetTypeId() == TYPEID_UNIT && unit->GetEntry() == 17398) PrisonerDied(unit->GetGUID()); } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { if (go->GetEntry() == 181766) //Final exit door Door1GUID = go->GetGUID(); @@ -247,7 +247,7 @@ class instance_blood_furnace : public InstanceMapScript return str_data.c_str(); } - void Load(const char* in) + void Load(const char* in) OVERRIDE { if (!in) { diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp index 98f6f194c0f..54ca34c2708 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp @@ -36,13 +36,13 @@ class instance_ramparts : public InstanceMapScript { instance_ramparts_InstanceMapScript(Map* map) : InstanceScript(map) {} - void Initialize() + void Initialize() OVERRIDE { SetBossNumber(EncounterCount); felIronChestGUID = 0; } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -53,7 +53,7 @@ class instance_ramparts : public InstanceMapScript } } - bool SetBossState(uint32 type, EncounterState state) + bool SetBossState(uint32 type, EncounterState state) OVERRIDE { if (!InstanceScript::SetBossState(type, state)) return false; @@ -72,7 +72,7 @@ class instance_ramparts : public InstanceMapScript return true; } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; @@ -83,7 +83,7 @@ class instance_ramparts : public InstanceMapScript return saveStream.str(); } - void Load(const char* strIn) + void Load(const char* strIn) OVERRIDE { if (!strIn) { diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp index efca48505a8..bfe829de9fd 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp @@ -66,7 +66,7 @@ class instance_magtheridons_lair : public InstanceMapScript uint32 CageTimer; uint32 RespawnTimer; - void Initialize() + void Initialize() OVERRIDE { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); @@ -79,7 +79,7 @@ class instance_magtheridons_lair : public InstanceMapScript RespawnTimer = 0; } - bool IsEncounterInProgress() const + bool IsEncounterInProgress() const OVERRIDE { for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) if (m_auiEncounter[i] == IN_PROGRESS) @@ -88,7 +88,7 @@ class instance_magtheridons_lair : public InstanceMapScript return false; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -101,7 +101,7 @@ class instance_magtheridons_lair : public InstanceMapScript } } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -218,7 +218,7 @@ class instance_magtheridons_lair : public InstanceMapScript return 0; } - void Update(uint32 diff) + void Update(uint32 diff) OVERRIDE { if (CageTimer) { diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp index 1919e74e4ee..1484c5e9127 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp @@ -41,7 +41,7 @@ class instance_shattered_halls : public InstanceMapScript { instance_shattered_halls_InstanceMapScript(Map* map) : InstanceScript(map) { } - void Initialize() + void Initialize() OVERRIDE { SetBossNumber(EncounterCount); nethekurseGUID = 0; @@ -114,7 +114,7 @@ class instance_shattered_halls : public InstanceMapScript return 0; } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; @@ -125,7 +125,7 @@ class instance_shattered_halls : public InstanceMapScript return saveStream.str(); } - void Load(const char* strIn) + void Load(const char* strIn) OVERRIDE { if (!strIn) { diff --git a/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp b/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp index e47995befff..9995efee99a 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp @@ -60,7 +60,7 @@ class instance_the_eye : public InstanceMapScript uint32 m_auiEncounter[MAX_ENCOUNTER]; - void Initialize() + void Initialize() OVERRIDE { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); @@ -76,7 +76,7 @@ class instance_the_eye : public InstanceMapScript AlarEventPhase = 0; } - bool IsEncounterInProgress() const + bool IsEncounterInProgress() const OVERRIDE { for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) if (m_auiEncounter[i] == IN_PROGRESS) @@ -85,7 +85,7 @@ class instance_the_eye : public InstanceMapScript return false; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -163,7 +163,7 @@ class instance_the_eye : public InstanceMapScript return 0; } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; @@ -174,7 +174,7 @@ class instance_the_eye : public InstanceMapScript return stream.str(); } - void Load(const char* in) + void Load(const char* in) OVERRIDE { if (!in) { diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp index 64ebef52a87..9c60c16d0af 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp @@ -57,7 +57,7 @@ class instance_mechanar : public InstanceMapScript } } - void OnGameObjectRemove(GameObject* gameObject) + void OnGameObjectRemove(GameObject* gameObject) OVERRIDE { switch (gameObject->GetEntry()) { @@ -71,7 +71,7 @@ class instance_mechanar : public InstanceMapScript } } - bool SetBossState(uint32 type, EncounterState state) + bool SetBossState(uint32 type, EncounterState state) OVERRIDE { if (!InstanceScript::SetBossState(type, state)) return false; @@ -91,7 +91,7 @@ class instance_mechanar : public InstanceMapScript return true; } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; @@ -102,7 +102,7 @@ class instance_mechanar : public InstanceMapScript return saveStream.str(); } - void Load(const char* str) + void Load(const char* str) OVERRIDE { if (!str) { diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp index 725c5c5aa17..41b87495c93 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp @@ -75,7 +75,7 @@ class instance_arcatraz : public InstanceMapScript uint64 GoSphereGUID; uint64 MellicharGUID; - void Initialize() + void Initialize() OVERRIDE { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); @@ -91,7 +91,7 @@ class instance_arcatraz : public InstanceMapScript MellicharGUID = 0; } - bool IsEncounterInProgress() const + bool IsEncounterInProgress() const OVERRIDE { for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) if (m_auiEncounter[i] == IN_PROGRESS) @@ -100,7 +100,7 @@ class instance_arcatraz : public InstanceMapScript return false; } - void OnGameObjectCreate(GameObject* go) + void OnGameObjectCreate(GameObject* go) OVERRIDE { switch (go->GetEntry()) { @@ -142,7 +142,7 @@ class instance_arcatraz : public InstanceMapScript } } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { if (creature->GetEntry() == MELLICHAR) MellicharGUID = creature->GetGUID(); diff --git a/src/server/scripts/Outland/TempestKeep/botanica/instance_the_botanica.cpp b/src/server/scripts/Outland/TempestKeep/botanica/instance_the_botanica.cpp index 443a8aa55fa..1bcfc9cbb21 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/instance_the_botanica.cpp +++ b/src/server/scripts/Outland/TempestKeep/botanica/instance_the_botanica.cpp @@ -35,7 +35,7 @@ class instance_the_botanica : public InstanceMapScript WarpSplinterGUID = 0; } - void OnCreatureCreate(Creature* creature) + void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { @@ -80,7 +80,7 @@ class instance_the_botanica : public InstanceMapScript return 0; } - bool SetBossState(uint32 type, EncounterState state) + bool SetBossState(uint32 type, EncounterState state) OVERRIDE { if (!InstanceScript::SetBossState(type, state)) return false; @@ -100,7 +100,7 @@ class instance_the_botanica : public InstanceMapScript return true; } - std::string GetSaveData() + std::string GetSaveData() OVERRIDE { OUT_SAVE_INST_DATA; @@ -111,7 +111,7 @@ class instance_the_botanica : public InstanceMapScript return saveStream.str(); } - void Load(char const* str) + void Load(char const* str) OVERRIDE { if (!str) { diff --git a/src/server/scripts/Pet/CMakeLists.txt b/src/server/scripts/Pet/CMakeLists.txt new file mode 100644 index 00000000000..b4a8eea77d8 --- /dev/null +++ b/src/server/scripts/Pet/CMakeLists.txt @@ -0,0 +1,20 @@ +# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# +# This file is free software; as a special exception the author gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +set(scripts_STAT_SRCS + ${scripts_STAT_SRCS} + Pet/pet_dk.cpp + Pet/pet_hunter.cpp + Pet/pet_mage.cpp + Pet/pet_priest.cpp + Pet/pet_shaman.cpp +) + +message(" -> Prepared: Pet") diff --git a/src/server/scripts/Pet/pet_dk.cpp b/src/server/scripts/Pet/pet_dk.cpp new file mode 100644 index 00000000000..31a6af2fc1c --- /dev/null +++ b/src/server/scripts/Pet/pet_dk.cpp @@ -0,0 +1,136 @@ +/* + * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Ordered alphabetically using scriptname. + * Scriptnames of files in this file should be prefixed with "npc_pet_dk_". + */ + +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "CombatAI.h" +#include "Cell.h" +#include "CellImpl.h" +#include "GridNotifiers.h" +#include "GridNotifiersImpl.h" + +enum DeathKnightSpells +{ + SPELL_DK_SUMMON_GARGOYLE_1 = 49206, + SPELL_DK_SUMMON_GARGOYLE_2 = 50514, + SPELL_DK_DISMISS_GARGOYLE = 50515, + SPELL_DK_SANCTUARY = 54661 +}; + +class npc_pet_dk_ebon_gargoyle : public CreatureScript +{ + public: + npc_pet_dk_ebon_gargoyle() : CreatureScript("npc_pet_dk_ebon_gargoyle") { } + + struct npc_pet_dk_ebon_gargoyleAI : CasterAI + { + npc_pet_dk_ebon_gargoyleAI(Creature* creature) : CasterAI(creature) { } + + void InitializeAI() OVERRIDE + { + CasterAI::InitializeAI(); + uint64 ownerGuid = me->GetOwnerGUID(); + if (!ownerGuid) + return; + + // Not needed to be despawned now + _despawnTimer = 0; + // Find victim of Summon Gargoyle spell + std::list<Unit*> targets; + Trinity::AnyUnfriendlyUnitInObjectRangeCheck u_check(me, me, 30.0f); + Trinity::UnitListSearcher<Trinity::AnyUnfriendlyUnitInObjectRangeCheck> searcher(me, targets, u_check); + me->VisitNearbyObject(30.0f, searcher); + for (std::list<Unit*>::const_iterator iter = targets.begin(); iter != targets.end(); ++iter) + if ((*iter)->GetAura(SPELL_DK_SUMMON_GARGOYLE_1, ownerGuid)) + { + me->Attack((*iter), false); + break; + } + } + + void JustDied(Unit* /*killer*/) OVERRIDE + { + // Stop Feeding Gargoyle when it dies + if (Unit* owner = me->GetOwner()) + owner->RemoveAurasDueToSpell(SPELL_DK_SUMMON_GARGOYLE_2); + } + + // Fly away when dismissed + void SpellHit(Unit* source, SpellInfo const* spell) OVERRIDE + { + if (spell->Id != SPELL_DK_DISMISS_GARGOYLE || !me->IsAlive()) + return; + + Unit* owner = me->GetOwner(); + if (!owner || owner != source) + return; + + // Stop Fighting + me->ApplyModFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE, true); + + // Sanctuary + me->CastSpell(me, SPELL_DK_SANCTUARY, true); + me->SetReactState(REACT_PASSIVE); + + //! HACK: Creature's can't have MOVEMENTFLAG_FLYING + // Fly Away + me->SetCanFly(true); + me->SetSpeed(MOVE_FLIGHT, 0.75f, true); + me->SetSpeed(MOVE_RUN, 0.75f, true); + float x = me->GetPositionX() + 20 * std::cos(me->GetOrientation()); + float y = me->GetPositionY() + 20 * std::sin(me->GetOrientation()); + float z = me->GetPositionZ() + 40; + me->GetMotionMaster()->Clear(false); + me->GetMotionMaster()->MovePoint(0, x, y, z); + + // Despawn as soon as possible + _despawnTimer = 4 * IN_MILLISECONDS; + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (_despawnTimer > 0) + { + if (_despawnTimer > diff) + _despawnTimer -= diff; + else + me->DespawnOrUnsummon(); + return; + } + + CasterAI::UpdateAI(diff); + } + + private: + uint32 _despawnTimer; + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new npc_pet_dk_ebon_gargoyleAI(creature); + } +}; + +void AddSC_deathknight_pet_scripts() +{ + new npc_pet_dk_ebon_gargoyle(); +} diff --git a/src/server/scripts/Pet/pet_hunter.cpp b/src/server/scripts/Pet/pet_hunter.cpp new file mode 100644 index 00000000000..80551be9131 --- /dev/null +++ b/src/server/scripts/Pet/pet_hunter.cpp @@ -0,0 +1,146 @@ +/* + * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Ordered alphabetically using scriptname. + * Scriptnames of files in this file should be prefixed with "npc_pet_hun_". + */ + +#include "ScriptMgr.h" +#include "ScriptedCreature.h" + +enum HunterSpells +{ + SPELL_HUNTER_CRIPPLING_POISON = 30981, // Viper + SPELL_HUNTER_DEADLY_POISON = 34655, // Venomous Snake + SPELL_HUNTER_MIND_NUMBING_POISON = 25810 // Viper +}; + +enum HunterCreatures +{ + NPC_HUNTER_VIPER = 19921 +}; + +class npc_pet_hunter_snake_trap : public CreatureScript +{ + public: + npc_pet_hunter_snake_trap() : CreatureScript("npc_pet_hunter_snake_trap") { } + + struct npc_pet_hunter_snake_trapAI : public ScriptedAI + { + npc_pet_hunter_snake_trapAI(Creature* creature) : ScriptedAI(creature) { } + + void EnterCombat(Unit* /*who*/) OVERRIDE { } + + void Reset() OVERRIDE + { + _spellTimer = 0; + + CreatureTemplate const* Info = me->GetCreatureTemplate(); + + _isViper = Info->Entry == NPC_HUNTER_VIPER ? true : false; + + me->SetMaxHealth(uint32(107 * (me->getLevel() - 40) * 0.025f)); + // Add delta to make them not all hit the same time + uint32 delta = (rand() % 7) * 100; + me->SetStatFloatValue(UNIT_FIELD_BASEATTACKTIME, float(Info->baseattacktime + delta)); + me->SetStatFloatValue(UNIT_FIELD_RANGED_ATTACK_POWER, float(Info->attackpower)); + + // Start attacking attacker of owner on first ai update after spawn - move in line of sight may choose better target + if (!me->GetVictim() && me->IsSummon()) + if (Unit* Owner = me->ToTempSummon()->GetSummoner()) + if (Owner->getAttackerForHelper()) + AttackStart(Owner->getAttackerForHelper()); + } + + // Redefined for random target selection: + void MoveInLineOfSight(Unit* who) OVERRIDE + { + if (!me->GetVictim() && me->CanCreatureAttack(who)) + { + if (me->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE) + return; + + float attackRadius = me->GetAttackDistance(who); + if (me->IsWithinDistInMap(who, attackRadius) && me->IsWithinLOSInMap(who)) + { + if (!(rand() % 5)) + { + me->setAttackTimer(BASE_ATTACK, (rand() % 10) * 100); + _spellTimer = (rand() % 10) * 100; + AttackStart(who); + } + } + } + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + if (me->GetVictim()->HasBreakableByDamageCrowdControlAura(me)) + { + me->InterruptNonMeleeSpells(false); + return; + } + + if (_spellTimer <= diff) + { + if (_isViper) // Viper + { + if (urand(0, 2) == 0) //33% chance to cast + { + uint32 spell; + if (urand(0, 1) == 0) + spell = SPELL_HUNTER_MIND_NUMBING_POISON; + else + spell = SPELL_HUNTER_CRIPPLING_POISON; + + DoCastVictim(spell); + } + + _spellTimer = 3000; + } + else // Venomous Snake + { + if (urand(0, 2) == 0) // 33% chance to cast + DoCastVictim(SPELL_HUNTER_DEADLY_POISON); + _spellTimer = 1500 + (rand() % 5) * 100; + } + } + else + _spellTimer -= diff; + + DoMeleeAttackIfReady(); + } + + private: + bool _isViper; + uint32 _spellTimer; + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new npc_pet_hunter_snake_trapAI(creature); + } +}; + +void AddSC_hunter_pet_scripts() +{ + new npc_pet_hunter_snake_trap(); +} diff --git a/src/server/scripts/Pet/pet_mage.cpp b/src/server/scripts/Pet/pet_mage.cpp new file mode 100644 index 00000000000..85247b29f84 --- /dev/null +++ b/src/server/scripts/Pet/pet_mage.cpp @@ -0,0 +1,83 @@ +/* + * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Ordered alphabetically using scriptname. + * Scriptnames of files in this file should be prefixed with "npc_pet_mag_". + */ + +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "CombatAI.h" +#include "Pet.h" + +enum MageSpells +{ + SPELL_MAGE_CLONE_ME = 45204, + SPELL_MAGE_MASTERS_THREAT_LIST = 58838 +}; + +class npc_pet_mage_mirror_image : public CreatureScript +{ + public: + npc_pet_mage_mirror_image() : CreatureScript("npc_pet_mage_mirror_image") { } + + struct npc_pet_mage_mirror_imageAI : CasterAI + { + npc_pet_mage_mirror_imageAI(Creature* creature) : CasterAI(creature) { } + + void InitializeAI() OVERRIDE + { + CasterAI::InitializeAI(); + Unit* owner = me->GetOwner(); + if (!owner) + return; + // Inherit Master's Threat List (not yet implemented) + owner->CastSpell((Unit*)NULL, SPELL_MAGE_MASTERS_THREAT_LIST, true); + // here mirror image casts on summoner spell (not present in client dbc) 49866 + // here should be auras (not present in client dbc): 35657, 35658, 35659, 35660 selfcasted by mirror images (stats related?) + // Clone Me! + owner->CastSpell(me, SPELL_MAGE_CLONE_ME, false); + } + + // Do not reload Creature templates on evade mode enter - prevent visual lost + void EnterEvadeMode() OVERRIDE + { + if (me->IsInEvadeMode() || !me->IsAlive()) + return; + + Unit* owner = me->GetCharmerOrOwner(); + + me->CombatStop(true); + if (owner && !me->HasUnitState(UNIT_STATE_FOLLOW)) + { + me->GetMotionMaster()->Clear(false); + me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, me->GetFollowAngle(), MOTION_SLOT_ACTIVE); + } + } + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new npc_pet_mage_mirror_imageAI(creature); + } +}; + +void AddSC_mage_pet_scripts() +{ + new npc_pet_mage_mirror_image(); +} diff --git a/src/server/scripts/Pet/pet_priest.cpp b/src/server/scripts/Pet/pet_priest.cpp new file mode 100644 index 00000000000..4b565aaec10 --- /dev/null +++ b/src/server/scripts/Pet/pet_priest.cpp @@ -0,0 +1,92 @@ +/* + * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Ordered alphabetically using scriptname. + * Scriptnames of files in this file should be prefixed with "npc_pet_pri_". + */ + +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "PassiveAI.h" +#include "PetAI.h" + +enum PriestSpells +{ + SPELL_PRIEST_GLYPH_OF_SHADOWFIEND = 58228, + SPELL_PRIEST_GLYPH_OF_SHADOWFIEND_MANA = 58227, + SPELL_PRIEST_LIGHTWELL_CHARGES = 59907 +}; + +class npc_pet_pri_lightwell : public CreatureScript +{ + public: + npc_pet_pri_lightwell() : CreatureScript("npc_pet_pri_lightwell") { } + + struct npc_pet_pri_lightwellAI : public PassiveAI + { + npc_pet_pri_lightwellAI(Creature* creature) : PassiveAI(creature) + { + DoCast(me, SPELL_PRIEST_LIGHTWELL_CHARGES, false); + } + + void EnterEvadeMode() OVERRIDE + { + if (!me->IsAlive()) + return; + + me->DeleteThreatList(); + me->CombatStop(true); + me->ResetPlayerDamageReq(); + } + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new npc_pet_pri_lightwellAI(creature); + } +}; + +class npc_pet_pri_shadowfiend : public CreatureScript +{ + public: + npc_pet_pri_shadowfiend() : CreatureScript("npc_pet_pri_shadowfiend") { } + + struct npc_pet_pri_shadowfiendAI : public PetAI + { + npc_pet_pri_shadowfiendAI(Creature* creature) : PetAI(creature) { } + + void JustDied(Unit* /*killer*/) OVERRIDE + { + if (me->IsSummon()) + if (Unit* owner = me->ToTempSummon()->GetSummoner()) + if (owner->HasAura(SPELL_PRIEST_GLYPH_OF_SHADOWFIEND)) + owner->CastSpell(owner, SPELL_PRIEST_GLYPH_OF_SHADOWFIEND_MANA, true); + } + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new npc_pet_pri_shadowfiendAI(creature); + } +}; + +void AddSC_priest_pet_scripts() +{ + new npc_pet_pri_lightwell(); + new npc_pet_pri_shadowfiend(); +} diff --git a/src/server/scripts/Pet/pet_shaman.cpp b/src/server/scripts/Pet/pet_shaman.cpp new file mode 100644 index 00000000000..989d6f46327 --- /dev/null +++ b/src/server/scripts/Pet/pet_shaman.cpp @@ -0,0 +1,153 @@ +/* + * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Ordered alphabetically using scriptname. + * Scriptnames of files in this file should be prefixed with "npc_pet_sha_". + */ + +#include "ScriptMgr.h" +#include "ScriptedCreature.h" + +enum ShamanSpells +{ + SPELL_SHAMAN_ANGEREDEARTH = 36213, + SPELL_SHAMAN_FIREBLAST = 57984, + SPELL_SHAMAN_FIRENOVA = 12470, + SPELL_SHAMAN_FIRESHIELD = 13376 +}; + +enum ShamanEvents +{ + // Earth Elemental + EVENT_SHAMAN_ANGEREDEARTH = 1, + // Fire Elemental + EVENT_SHAMAN_FIRENOVA = 1, + EVENT_SHAMAN_FIRESHIELD = 2, + EVENT_SHAMAN_FIREBLAST = 3 +}; + +class npc_pet_shaman_earth_elemental : public CreatureScript +{ + public: + npc_pet_shaman_earth_elemental() : CreatureScript("npc_pet_shaman_earth_elemental") { } + + struct npc_pet_shaman_earth_elementalAI : public ScriptedAI + { + npc_pet_shaman_earth_elementalAI(Creature* creature) : ScriptedAI(creature) { } + + + void Reset() OVERRIDE + { + _events.Reset(); + _events.ScheduleEvent(EVENT_SHAMAN_ANGEREDEARTH, 0); + me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + _events.Update(diff); + + if (_events.ExecuteEvent() == EVENT_SHAMAN_ANGEREDEARTH) + { + DoCastVictim(SPELL_SHAMAN_ANGEREDEARTH); + _events.ScheduleEvent(EVENT_SHAMAN_ANGEREDEARTH, urand(5000, 20000)); + } + + DoMeleeAttackIfReady(); + } + + private: + EventMap _events; + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new npc_pet_shaman_earth_elementalAI(creature); + } +}; + +class npc_pet_shaman_fire_elemental : public CreatureScript +{ + public: + npc_pet_shaman_fire_elemental() : CreatureScript("npc_pet_shaman_fire_elemental") { } + + struct npc_pet_shaman_fire_elementalAI : public ScriptedAI + { + npc_pet_shaman_fire_elementalAI(Creature* creature) : ScriptedAI(creature) { } + + void Reset() OVERRIDE + { + _events.Reset(); + _events.ScheduleEvent(EVENT_SHAMAN_FIRENOVA, urand(5000, 20000)); + _events.ScheduleEvent(EVENT_SHAMAN_FIREBLAST, urand(5000, 20000)); + _events.ScheduleEvent(EVENT_SHAMAN_FIRESHIELD, 0); + me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + _events.Update(diff); + + while (uint32 eventId = _events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_SHAMAN_FIRENOVA: + DoCastVictim(SPELL_SHAMAN_FIRENOVA); + _events.ScheduleEvent(EVENT_SHAMAN_FIRENOVA, urand(5000, 20000)); + break; + case EVENT_SHAMAN_FIRESHIELD: + DoCastVictim(SPELL_SHAMAN_FIRESHIELD); + _events.ScheduleEvent(EVENT_SHAMAN_FIRESHIELD, 2000); + break; + case EVENT_SHAMAN_FIREBLAST: + DoCastVictim(SPELL_SHAMAN_FIREBLAST); + _events.ScheduleEvent(EVENT_SHAMAN_FIREBLAST, urand(5000, 20000)); + break; + default: + break; + } + } + + DoMeleeAttackIfReady(); + } + + private: + EventMap _events; + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new npc_pet_shaman_fire_elementalAI(creature); + } +}; + +void AddSC_shaman_pet_scripts() +{ + new npc_pet_shaman_earth_elemental(); + new npc_pet_shaman_fire_elemental(); +} diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index fcf87e9bfac..ca94f871d03 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -1803,7 +1803,8 @@ class spell_q13011_bear_flank_master : public SpellScriptLoader bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE { - if (!sSpellMgr->GetSpellInfo(SPELL_BEAR_FLANK_MASTER) || !sSpellMgr->GetSpellInfo(SPELL_CREATE_BEAR_FLANK)) + if (!sSpellMgr->GetSpellInfo(SPELL_BEAR_FLANK_MASTER) || + !sSpellMgr->GetSpellInfo(SPELL_CREATE_BEAR_FLANK)) return false; return true; } @@ -1813,7 +1814,7 @@ class spell_q13011_bear_flank_master : public SpellScriptLoader return GetCaster()->GetTypeId() == TYPEID_UNIT; } - void HandleScript(SpellEffIndex effIndex) + void HandleScript(SpellEffIndex /*effIndex*/) { bool failed = RAND(0, 1); // 50% chance Creature* creature = GetCaster()->ToCreature(); diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp index f3d86c47b21..8e103f105c1 100644 --- a/src/server/scripts/World/npcs_special.cpp +++ b/src/server/scripts/World/npcs_special.cpp @@ -49,9 +49,7 @@ EndContentData */ #include "ObjectMgr.h" #include "ScriptMgr.h" #include "World.h" -#include "PetAI.h" #include "PassiveAI.h" -#include "CombatAI.h" #include "GameEventMgr.h" #include "GridNotifiers.h" #include "GridNotifiersImpl.h" @@ -1602,124 +1600,6 @@ public: }; -/*#### -## npc_snake_trap_serpents -####*/ - -enum SnakeTrapSerpents -{ - SPELL_MIND_NUMBING_POISON = 25810, // Viper - SPELL_DEADLY_POISON = 34655, // Venomous Snake - SPELL_CRIPPLING_POISON = 30981, // Viper - - NPC_VIPER = 19921 -}; - -class npc_snake_trap : public CreatureScript -{ -public: - npc_snake_trap() : CreatureScript("npc_snake_trap_serpents") { } - - struct npc_snake_trap_serpentsAI : public ScriptedAI - { - npc_snake_trap_serpentsAI(Creature* creature) : ScriptedAI(creature) {} - - uint32 SpellTimer; - bool IsViper; - - void EnterCombat(Unit* /*who*/) OVERRIDE {} - - void Reset() OVERRIDE - { - SpellTimer = 0; - - CreatureTemplate const* Info = me->GetCreatureTemplate(); - - IsViper = Info->Entry == NPC_VIPER ? true : false; - - me->SetMaxHealth(uint32(107 * (me->getLevel() - 40) * 0.025f)); - //Add delta to make them not all hit the same time - uint32 delta = (rand() % 7) * 100; - me->SetStatFloatValue(UNIT_FIELD_BASEATTACKTIME, float(Info->baseattacktime + delta)); - me->SetStatFloatValue(UNIT_FIELD_RANGED_ATTACK_POWER, float(Info->attackpower)); - - // Start attacking attacker of owner on first ai update after spawn - move in line of sight may choose better target - if (!me->GetVictim() && me->IsSummon()) - if (Unit* Owner = me->ToTempSummon()->GetSummoner()) - if (Owner->getAttackerForHelper()) - AttackStart(Owner->getAttackerForHelper()); - } - - //Redefined for random target selection: - void MoveInLineOfSight(Unit* who) OVERRIDE - - { - if (!me->GetVictim() && me->CanCreatureAttack(who)) - { - if (me->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE) - return; - - float attackRadius = me->GetAttackDistance(who); - if (me->IsWithinDistInMap(who, attackRadius) && me->IsWithinLOSInMap(who)) - { - if (!(rand() % 5)) - { - me->setAttackTimer(BASE_ATTACK, (rand() % 10) * 100); - SpellTimer = (rand() % 10) * 100; - AttackStart(who); - } - } - } - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - if (me->GetVictim()->HasBreakableByDamageCrowdControlAura(me)) - { - me->InterruptNonMeleeSpells(false); - return; - } - - if (SpellTimer <= diff) - { - if (IsViper) //Viper - { - if (urand(0, 2) == 0) //33% chance to cast - { - uint32 spell; - if (urand(0, 1) == 0) - spell = SPELL_MIND_NUMBING_POISON; - else - spell = SPELL_CRIPPLING_POISON; - - DoCastVictim(spell); - } - - SpellTimer = 3000; - } - else //Venomous Snake - { - if (urand(0, 2) == 0) //33% chance to cast - DoCastVictim(SPELL_DEADLY_POISON); - SpellTimer = 1500 + (rand() % 5) * 100; - } - } - else - SpellTimer -= diff; - - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new npc_snake_trap_serpentsAI(creature); - } -}; - #define SAY_RANDOM_MOJO0 "Now that's what I call froggy-style!" #define SAY_RANDOM_MOJO1 "Your lily pad or mine?" #define SAY_RANDOM_MOJO2 "This won't take long, did it?" @@ -1821,172 +1701,6 @@ public: } }; -class npc_mirror_image : public CreatureScript -{ -public: - npc_mirror_image() : CreatureScript("npc_mirror_image") { } - - struct npc_mirror_imageAI : CasterAI - { - npc_mirror_imageAI(Creature* creature) : CasterAI(creature) {} - - void InitializeAI() OVERRIDE - { - CasterAI::InitializeAI(); - Unit* owner = me->GetOwner(); - if (!owner) - return; - // Inherit Master's Threat List (not yet implemented) - owner->CastSpell((Unit*)NULL, 58838, true); - // here mirror image casts on summoner spell (not present in client dbc) 49866 - // here should be auras (not present in client dbc): 35657, 35658, 35659, 35660 selfcasted by mirror images (stats related?) - // Clone Me! - owner->CastSpell(me, 45204, false); - } - - // Do not reload Creature templates on evade mode enter - prevent visual lost - void EnterEvadeMode() OVERRIDE - { - if (me->IsInEvadeMode() || !me->IsAlive()) - return; - - Unit* owner = me->GetCharmerOrOwner(); - - me->CombatStop(true); - if (owner && !me->HasUnitState(UNIT_STATE_FOLLOW)) - { - me->GetMotionMaster()->Clear(false); - me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, me->GetFollowAngle(), MOTION_SLOT_ACTIVE); - } - } - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new npc_mirror_imageAI(creature); - } -}; - -class npc_ebon_gargoyle : public CreatureScript -{ -public: - npc_ebon_gargoyle() : CreatureScript("npc_ebon_gargoyle") { } - - struct npc_ebon_gargoyleAI : CasterAI - { - npc_ebon_gargoyleAI(Creature* creature) : CasterAI(creature) {} - - uint32 despawnTimer; - - void InitializeAI() OVERRIDE - { - CasterAI::InitializeAI(); - uint64 ownerGuid = me->GetOwnerGUID(); - if (!ownerGuid) - return; - // Not needed to be despawned now - despawnTimer = 0; - // Find victim of Summon Gargoyle spell - std::list<Unit*> targets; - Trinity::AnyUnfriendlyUnitInObjectRangeCheck u_check(me, me, 30); - Trinity::UnitListSearcher<Trinity::AnyUnfriendlyUnitInObjectRangeCheck> searcher(me, targets, u_check); - me->VisitNearbyObject(30, searcher); - for (std::list<Unit*>::const_iterator iter = targets.begin(); iter != targets.end(); ++iter) - if ((*iter)->GetAura(49206, ownerGuid)) - { - me->Attack((*iter), false); - break; - } - } - - void JustDied(Unit* /*killer*/) OVERRIDE - { - // Stop Feeding Gargoyle when it dies - if (Unit* owner = me->GetOwner()) - owner->RemoveAurasDueToSpell(50514); - } - - // Fly away when dismissed - void SpellHit(Unit* source, SpellInfo const* spell) OVERRIDE - { - if (spell->Id != 50515 || !me->IsAlive()) - return; - - Unit* owner = me->GetOwner(); - - if (!owner || owner != source) - return; - - // Stop Fighting - me->ApplyModFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE, true); - // Sanctuary - me->CastSpell(me, 54661, true); - me->SetReactState(REACT_PASSIVE); - - //! HACK: Creature's can't have MOVEMENTFLAG_FLYING - // Fly Away - me->SetCanFly(true); - me->SetSpeed(MOVE_FLIGHT, 0.75f, true); - me->SetSpeed(MOVE_RUN, 0.75f, true); - float x = me->GetPositionX() + 20 * std::cos(me->GetOrientation()); - float y = me->GetPositionY() + 20 * std::sin(me->GetOrientation()); - float z = me->GetPositionZ() + 40; - me->GetMotionMaster()->Clear(false); - me->GetMotionMaster()->MovePoint(0, x, y, z); - - // Despawn as soon as possible - despawnTimer = 4 * IN_MILLISECONDS; - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (despawnTimer > 0) - { - if (despawnTimer > diff) - despawnTimer -= diff; - else - me->DespawnOrUnsummon(); - return; - } - CasterAI::UpdateAI(diff); - } - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new npc_ebon_gargoyleAI(creature); - } -}; - -class npc_lightwell : public CreatureScript -{ - public: - npc_lightwell() : CreatureScript("npc_lightwell") { } - - struct npc_lightwellAI : public PassiveAI - { - npc_lightwellAI(Creature* creature) : PassiveAI(creature) - { - DoCast(me, 59907, false); - } - - void EnterEvadeMode() OVERRIDE - { - if (!me->IsAlive()) - return; - - me->DeleteThreatList(); - me->CombatStop(true); - me->ResetPlayerDamageReq(); - } - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new npc_lightwellAI(creature); - } -}; - enum TrainingDummy { NPC_ADVANCED_TARGET_DUMMY = 2674, @@ -2071,159 +1785,6 @@ public: }; /*###### -# npc_shadowfiend -######*/ -#define GLYPH_OF_SHADOWFIEND_MANA 58227 -#define GLYPH_OF_SHADOWFIEND 58228 - -class npc_shadowfiend : public CreatureScript -{ - public: - npc_shadowfiend() : CreatureScript("npc_shadowfiend") { } - - struct npc_shadowfiendAI : public PetAI - { - npc_shadowfiendAI(Creature* creature) : PetAI(creature) {} - - void JustDied(Unit* /*killer*/) OVERRIDE - { - if (me->IsSummon()) - if (Unit* owner = me->ToTempSummon()->GetSummoner()) - if (owner->HasAura(GLYPH_OF_SHADOWFIEND)) - owner->CastSpell(owner, GLYPH_OF_SHADOWFIEND_MANA, true); - } - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new npc_shadowfiendAI(creature); - } -}; - -/*###### -# npc_fire_elemental -######*/ - -enum FireElemental -{ - SPELL_FIRENOVA = 12470, - SPELL_FIRESHIELD = 13376, - SPELL_FIREBLAST = 57984 -}; - -class npc_fire_elemental : public CreatureScript -{ -public: - npc_fire_elemental() : CreatureScript("npc_fire_elemental") { } - - struct npc_fire_elementalAI : public ScriptedAI - { - npc_fire_elementalAI(Creature* creature) : ScriptedAI(creature) {} - - uint32 FireNova_Timer; - uint32 FireShield_Timer; - uint32 FireBlast_Timer; - - void Reset() OVERRIDE - { - FireNova_Timer = 5000 + rand() % 15000; // 5-20 sec cd - FireBlast_Timer = 5000 + rand() % 15000; // 5-20 sec cd - FireShield_Timer = 0; - me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - if (FireShield_Timer <= diff) - { - DoCastVictim(SPELL_FIRESHIELD); - FireShield_Timer = 2 * IN_MILLISECONDS; - } - else - FireShield_Timer -= diff; - - if (FireBlast_Timer <= diff) - { - DoCastVictim(SPELL_FIREBLAST); - FireBlast_Timer = 5000 + rand() % 15000; // 5-20 sec cd - } - else - FireBlast_Timer -= diff; - - if (FireNova_Timer <= diff) - { - DoCastVictim(SPELL_FIRENOVA); - FireNova_Timer = 5000 + rand() % 15000; // 5-20 sec cd - } - else - FireNova_Timer -= diff; - - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new npc_fire_elementalAI(creature); - } -}; - -/*###### -# npc_earth_elemental -######*/ - -enum EarthElemental -{ - SPELL_ANGEREDEARTH = 36213 -}; - -class npc_earth_elemental : public CreatureScript -{ -public: - npc_earth_elemental() : CreatureScript("npc_earth_elemental") { } - - struct npc_earth_elementalAI : public ScriptedAI - { - npc_earth_elementalAI(Creature* creature) : ScriptedAI(creature) {} - - uint32 AngeredEarth_Timer; - - void Reset() OVERRIDE - { - AngeredEarth_Timer = 0; - me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - if (AngeredEarth_Timer <= diff) - { - DoCastVictim(SPELL_ANGEREDEARTH); - AngeredEarth_Timer = 5000 + rand() % 15000; // 5-20 sec cd - } - else - AngeredEarth_Timer -= diff; - - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new npc_earth_elementalAI(creature); - } -}; - -/*###### # npc_wormhole ######*/ @@ -2993,19 +2554,12 @@ void AddSC_npcs_special() new npc_steam_tonk(); new npc_tonk_mine(); new npc_brewfest_reveler(); - new npc_snake_trap(); - new npc_mirror_image(); - new npc_ebon_gargoyle(); - new npc_lightwell(); new npc_mojo(); new npc_training_dummy(); - new npc_shadowfiend(); new npc_wormhole(); new npc_pet_trainer(); new npc_locksmith(); new npc_experience(); - new npc_fire_elemental(); - new npc_earth_elemental(); new npc_firework(); new npc_spring_rabbit(); } |