aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/AI/CoreAI/PetAI.cpp3
-rw-r--r--src/server/game/AI/CoreAI/UnitAI.cpp4
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedCreature.cpp12
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedCreature.h2
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp5
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp12
-rw-r--r--src/server/game/Battlefield/Battlefield.cpp12
-rw-r--r--src/server/game/Battlefield/Battlefield.h4
-rw-r--r--src/server/game/Battlegrounds/Battleground.cpp6
-rw-r--r--src/server/game/Battlegrounds/Battleground.h2
-rw-r--r--src/server/game/Chat/Channels/Channel.h2
-rw-r--r--src/server/game/DataStores/DBCStores.cpp2
-rw-r--r--src/server/game/DataStores/DBCStores.h1
-rw-r--r--src/server/game/DataStores/DBCStructure.h12
-rw-r--r--src/server/game/DataStores/DBCfmt.h1
-rw-r--r--src/server/game/Entities/Creature/Creature.cpp6
-rw-r--r--src/server/game/Entities/GameObject/GameObject.cpp2
-rw-r--r--src/server/game/Entities/Item/Item.cpp2
-rw-r--r--src/server/game/Entities/Pet/Pet.cpp2
-rw-r--r--src/server/game/Entities/Player/Player.cpp11
-rw-r--r--src/server/game/Entities/Player/Player.h8
-rw-r--r--src/server/game/Entities/Player/SocialMgr.cpp2
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp19
-rw-r--r--src/server/game/Entities/Unit/Unit.h3
-rwxr-xr-xsrc/server/game/Entities/Vehicle/Vehicle.cpp39
-rw-r--r--src/server/game/Handlers/CalendarHandler.cpp2
-rw-r--r--src/server/game/Handlers/ChatHandler.cpp2
-rw-r--r--src/server/game/Handlers/MiscHandler.cpp4
-rw-r--r--src/server/game/Handlers/VehicleHandler.cpp4
-rw-r--r--src/server/game/Maps/MapUpdater.cpp30
-rw-r--r--src/server/game/Miscellaneous/Language.h2
-rw-r--r--src/server/game/Miscellaneous/SharedDefines.h2
-rw-r--r--src/server/game/Reputation/ReputationMgr.cpp2
-rw-r--r--src/server/game/Server/Protocol/Opcodes.h19
-rw-r--r--src/server/game/Server/WorldSession.cpp230
-rw-r--r--src/server/game/Server/WorldSession.h14
-rw-r--r--src/server/game/Spells/Spell.cpp2
-rw-r--r--src/server/game/Spells/SpellEffects.cpp4
-rw-r--r--src/server/game/Spells/SpellScript.h4
-rw-r--r--src/server/game/Weather/Weather.cpp2
-rw-r--r--src/server/game/Weather/WeatherMgr.cpp2
-rw-r--r--src/server/scripts/Commands/cs_npc.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp30
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp14
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp14
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp24
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp32
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp18
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp246
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp18
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp18
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp14
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/zone_undercity.cpp2
-rw-r--r--src/server/scripts/Events/childrens_week.cpp2
-rw-r--r--src/server/scripts/Examples/example_spell.cpp10
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp2
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp12
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp2
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp6
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp2
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp8
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp32
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp72
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp4
-rw-r--r--src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp2
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp2
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp22
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp2
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp2
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp10
-rw-r--r--src/server/scripts/Kalimdor/boss_azuregos.cpp2
-rw-r--r--src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp2
-rw-r--r--src/server/scripts/Kalimdor/zone_durotar.cpp6
-rw-r--r--src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp6
-rw-r--r--src/server/scripts/Kalimdor/zone_feralas.cpp2
-rw-r--r--src/server/scripts/Kalimdor/zone_silithus.cpp4
-rw-r--r--src/server/scripts/Kalimdor/zone_tanaris.cpp2
-rw-r--r--src/server/scripts/Kalimdor/zone_the_barrens.cpp6
-rw-r--r--src/server/scripts/Kalimdor/zone_ungoro_crater.cpp2
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp2
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp2
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp2
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp4
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp4
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp20
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp2
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp18
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp4
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp8
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp2
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp8
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp10
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp8
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp26
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp4
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp4
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp9
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp2
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp28
-rw-r--r--src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp4
-rw-r--r--src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp2
-rw-r--r--src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp6
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp10
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp6
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp2
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp4
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp4
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp16
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp56
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp2
-rw-r--r--src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp8
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp20
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp14
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp18
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp8
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp32
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp4
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp12
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp42
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp34
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp26
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp60
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp18
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp14
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h2
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp12
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp24
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp4
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp2
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp2
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp2
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp4
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp22
-rw-r--r--src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp34
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp2
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp2
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp2
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp6
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp16
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp4
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp216
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp44
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp18
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp6
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp4
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp10
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp4
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp14
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp4
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp4
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp18
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp4
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp24
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp68
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp4
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp2
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp4
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp6
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp2
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp2
-rw-r--r--src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp2
-rw-r--r--src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp4
-rw-r--r--src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp6
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp6
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp2
-rw-r--r--src/server/scripts/Northrend/VioletHold/violet_hold.cpp2
-rw-r--r--src/server/scripts/Northrend/zone_borean_tundra.cpp22
-rw-r--r--src/server/scripts/Northrend/zone_crystalsong_forest.cpp2
-rw-r--r--src/server/scripts/Northrend/zone_dragonblight.cpp4
-rw-r--r--src/server/scripts/Northrend/zone_grizzly_hills.cpp28
-rw-r--r--src/server/scripts/Northrend/zone_howling_fjord.cpp2
-rw-r--r--src/server/scripts/Northrend/zone_icecrown.cpp42
-rw-r--r--src/server/scripts/Northrend/zone_sholazar_basin.cpp6
-rw-r--r--src/server/scripts/Northrend/zone_storm_peaks.cpp6
-rw-r--r--src/server/scripts/Northrend/zone_wintergrasp.cpp8
-rw-r--r--src/server/scripts/Northrend/zone_zuldrak.cpp10
-rw-r--r--src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp2
-rw-r--r--src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp2
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp6
-rw-r--r--src/server/scripts/Outland/BlackTemple/black_temple.cpp4
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp4
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_illidan.cpp20
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp2
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp8
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp10
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_supremus.cpp2
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp12
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp2
-rw-r--r--src/server/scripts/Outland/BlackTemple/illidari_council.cpp20
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp16
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp2
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp16
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp24
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_the_black_stalker.cpp4
-rw-r--r--src/server/scripts/Outland/GruulsLair/boss_gruul.cpp4
-rw-r--r--src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp2
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp2
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp10
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp10
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp6
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp4
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp22
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp4
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp2
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp4
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp34
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp2
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp4
-rw-r--r--src/server/scripts/Outland/TempestKeep/botanica/boss_commander_sarannis.cpp2
-rw-r--r--src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp2
-rw-r--r--src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp2
-rw-r--r--src/server/scripts/Outland/boss_doomlord_kazzak.cpp2
-rw-r--r--src/server/scripts/Outland/zone_blades_edge_mountains.cpp2
-rw-r--r--src/server/scripts/Outland/zone_hellfire_peninsula.cpp2
-rw-r--r--src/server/scripts/Outland/zone_netherstorm.cpp4
-rw-r--r--src/server/scripts/Outland/zone_shadowmoon_valley.cpp12
-rw-r--r--src/server/scripts/Spells/spell_dk.cpp48
-rw-r--r--src/server/scripts/Spells/spell_druid.cpp52
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp136
-rw-r--r--src/server/scripts/Spells/spell_holiday.cpp14
-rw-r--r--src/server/scripts/Spells/spell_hunter.cpp45
-rw-r--r--src/server/scripts/Spells/spell_item.cpp109
-rw-r--r--src/server/scripts/Spells/spell_mage.cpp24
-rw-r--r--src/server/scripts/Spells/spell_paladin.cpp50
-rw-r--r--src/server/scripts/Spells/spell_pet.cpp44
-rw-r--r--src/server/scripts/Spells/spell_priest.cpp36
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp104
-rw-r--r--src/server/scripts/Spells/spell_rogue.cpp24
-rw-r--r--src/server/scripts/Spells/spell_shaman.cpp40
-rw-r--r--src/server/scripts/Spells/spell_warlock.cpp38
-rw-r--r--src/server/scripts/Spells/spell_warrior.cpp38
-rw-r--r--src/server/scripts/World/areatrigger_scripts.cpp4
-rw-r--r--src/server/scripts/World/boss_emerald_dragons.cpp4
-rw-r--r--src/server/scripts/World/guards.cpp4
-rw-r--r--src/server/scripts/World/npcs_special.cpp12
-rw-r--r--src/server/shared/Logging/Log.cpp15
-rw-r--r--src/server/shared/Logging/Log.h54
274 files changed, 2004 insertions, 1840 deletions
diff --git a/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp
index e2eeaf880ad..f0a75403c8c 100644
--- a/src/server/game/AI/CoreAI/PetAI.cpp
+++ b/src/server/game/AI/CoreAI/PetAI.cpp
@@ -459,9 +459,6 @@ void PetAI::DoAttack(Unit* target, bool chase)
if (me->Attack(target, true))
{
- if (Unit* owner = me->GetOwner())
- owner->SetInCombatWith(target);
-
// Play sound to let the player know the pet is attacking something it picked on its own
if (me->HasReactState(REACT_AGGRESSIVE) && !me->GetCharmInfo()->IsCommandAttack())
me->SendPetAIReaction(me->GetGUID());
diff --git a/src/server/game/AI/CoreAI/UnitAI.cpp b/src/server/game/AI/CoreAI/UnitAI.cpp
index 9631b75fe06..cb32740e068 100644
--- a/src/server/game/AI/CoreAI/UnitAI.cpp
+++ b/src/server/game/AI/CoreAI/UnitAI.cpp
@@ -103,7 +103,7 @@ void UnitAI::DoAddAuraToAllHostilePlayers(uint32 spellid)
ThreatContainer::StorageType threatlist = me->getThreatManager().getThreatList();
for (ThreatContainer::StorageType::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
{
- if (Unit* unit = Unit::GetUnit(*me, (*itr)->getUnitGuid()))
+ if (Unit* unit = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid()))
if (unit->GetTypeId() == TYPEID_PLAYER)
me->AddAura(spellid, unit);
}
@@ -117,7 +117,7 @@ void UnitAI::DoCastToAllHostilePlayers(uint32 spellid, bool triggered)
ThreatContainer::StorageType threatlist = me->getThreatManager().getThreatList();
for (ThreatContainer::StorageType::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
{
- if (Unit* unit = Unit::GetUnit(*me, (*itr)->getUnitGuid()))
+ if (Unit* unit = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid()))
if (unit->GetTypeId() == TYPEID_PLAYER)
me->CastSpell(unit, spellid, triggered);
}
diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
index c205dd908c7..06820b03218 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
@@ -37,7 +37,7 @@ void SummonList::DoZoneInCombat(uint32 entry)
{
for (StorageType::iterator i = storage_.begin(); i != storage_.end();)
{
- Creature* summon = Unit::GetCreature(*me, *i);
+ Creature* summon = ObjectAccessor::GetCreature(*me, *i);
++i;
if (summon && summon->IsAIEnabled
&& (!entry || summon->GetEntry() == entry))
@@ -51,7 +51,7 @@ void SummonList::DespawnEntry(uint32 entry)
{
for (StorageType::iterator i = storage_.begin(); i != storage_.end();)
{
- Creature* summon = Unit::GetCreature(*me, *i);
+ Creature* summon = ObjectAccessor::GetCreature(*me, *i);
if (!summon)
i = storage_.erase(i);
else if (summon->GetEntry() == entry)
@@ -68,7 +68,7 @@ void SummonList::DespawnAll()
{
while (!storage_.empty())
{
- Creature* summon = Unit::GetCreature(*me, storage_.front());
+ Creature* summon = ObjectAccessor::GetCreature(*me, storage_.front());
storage_.pop_front();
if (summon)
summon->DespawnOrUnsummon();
@@ -79,7 +79,7 @@ void SummonList::RemoveNotExisting()
{
for (StorageType::iterator i = storage_.begin(); i != storage_.end();)
{
- if (Unit::GetCreature(*me, *i))
+ if (ObjectAccessor::GetCreature(*me, *i))
++i;
else
i = storage_.erase(i);
@@ -90,7 +90,7 @@ bool SummonList::HasEntry(uint32 entry) const
{
for (StorageType::const_iterator i = storage_.begin(); i != storage_.end(); ++i)
{
- Creature* summon = Unit::GetCreature(*me, *i);
+ Creature* summon = ObjectAccessor::GetCreature(*me, *i);
if (summon && summon->GetEntry() == entry)
return true;
}
@@ -271,7 +271,7 @@ void ScriptedAI::DoResetThreat()
for (ThreatContainer::StorageType::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
{
- Unit* unit = Unit::GetUnit(*me, (*itr)->getUnitGuid());
+ Unit* unit = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid());
if (unit && DoGetThreat(unit))
DoModifyThreatPercent(unit, -100);
}
diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.h b/src/server/game/AI/ScriptedAI/ScriptedCreature.h
index cee6ba3c379..c9f7f342183 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedCreature.h
+++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.h
@@ -98,7 +98,7 @@ public:
Trinity::Containers::RandomResizeList<uint64, Predicate>(listCopy, predicate, max);
for (StorageType::iterator i = listCopy.begin(); i != listCopy.end(); )
{
- Creature* summon = Unit::GetCreature(*me, *i++);
+ Creature* summon = ObjectAccessor::GetCreature(*me, *i++);
if (summon && summon->IsAIEnabled)
summon->AI()->DoAction(info);
}
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index e769b7c22a5..ecaa20284d7 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -437,8 +437,11 @@ void SmartAI::EnterEvadeMode()
}
else if (mFollowGuid)
{
- if (Unit* target = me->GetUnit(*me, mFollowGuid))
+ if (Unit* target = ObjectAccessor::GetUnit(*me, mFollowGuid))
me->GetMotionMaster()->MoveFollow(target, mFollowDist, mFollowAngle);
+
+ // evade is not cleared in MoveFollow, so we can't keep it
+ me->ClearUnitState(UNIT_STATE_EVADE);
}
else
me->GetMotionMaster()->MoveTargetedHome();
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index dff9ddbaf2f..2647368559c 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -429,7 +429,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
ThreatContainer::StorageType threatList = me->getThreatManager().getThreatList();
for (ThreatContainer::StorageType::const_iterator i = threatList.begin(); i != threatList.end(); ++i)
{
- if (Unit* target = Unit::GetUnit(*me, (*i)->getUnitGuid()))
+ if (Unit* target = ObjectAccessor::GetUnit(*me, (*i)->getUnitGuid()))
{
me->getThreatManager().modifyThreatPercent(target, e.action.threatPCT.threatINC ? (int32)e.action.threatPCT.threatINC : -(int32)e.action.threatPCT.threatDEC);
TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_THREAT_ALL_PCT: Creature guidLow %u modify threat for unit %u, value %i",
@@ -2602,7 +2602,7 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*
{
ThreatContainer::StorageType threatList = me->getThreatManager().getThreatList();
for (ThreatContainer::StorageType::const_iterator i = threatList.begin(); i != threatList.end(); ++i)
- if (Unit* temp = Unit::GetUnit(*me, (*i)->getUnitGuid()))
+ if (Unit* temp = ObjectAccessor::GetUnit(*me, (*i)->getUnitGuid()))
l->push_back(temp);
}
break;
@@ -3462,16 +3462,10 @@ void SmartScript::OnInitialize(WorldObject* obj, AreaTriggerEntry const* at)
void SmartScript::OnMoveInLineOfSight(Unit* who)
{
- ProcessEventsFor(SMART_EVENT_OOC_LOS, who);
-
if (!me)
return;
- if (me->GetVictim())
- return;
-
- ProcessEventsFor(SMART_EVENT_IC_LOS, who);
-
+ ProcessEventsFor(me->IsInCombat() ? SMART_EVENT_IC_LOS : SMART_EVENT_OOC_LOS, who);
}
/*
diff --git a/src/server/game/Battlefield/Battlefield.cpp b/src/server/game/Battlefield/Battlefield.cpp
index 96f13dcd0ac..3f9c6cf0617 100644
--- a/src/server/game/Battlefield/Battlefield.cpp
+++ b/src/server/game/Battlefield/Battlefield.cpp
@@ -54,7 +54,7 @@ Battlefield::Battlefield()
m_uiKickAfkPlayersTimer = 1000;
- m_LastResurectTimer = 30 * IN_MILLISECONDS;
+ m_LastResurrectTimer = 30 * IN_MILLISECONDS;
m_StartGroupingTimer = 0;
m_StartGrouping = false;
StalkerGuid = 0;
@@ -184,15 +184,15 @@ bool Battlefield::Update(uint32 diff)
}
- if (m_LastResurectTimer <= diff)
+ if (m_LastResurrectTimer <= diff)
{
for (uint8 i = 0; i < m_GraveyardList.size(); i++)
if (GetGraveyardById(i))
m_GraveyardList[i]->Resurrect();
- m_LastResurectTimer = RESURRECTION_INTERVAL;
+ m_LastResurrectTimer = RESURRECTION_INTERVAL;
}
else
- m_LastResurectTimer -= diff;
+ m_LastResurrectTimer -= diff;
return objective_changed;
}
@@ -632,7 +632,7 @@ void Battlefield::RemovePlayerFromResurrectQueue(uint64 playerGuid)
void Battlefield::SendAreaSpiritHealerQueryOpcode(Player* player, uint64 guid)
{
WorldPacket data(SMSG_AREA_SPIRIT_HEALER_TIME, 12);
- uint32 time = m_LastResurectTimer; // resurrect every 30 seconds
+ uint32 time = m_LastResurrectTimer; // resurrect every 30 seconds
data << guid << time;
ASSERT(player && player->GetSession());
@@ -711,7 +711,7 @@ void BfGraveyard::Resurrect()
if (Creature* spirit = m_Bf->GetCreature(m_SpiritGuide[m_ControlTeam]))
spirit->CastSpell(spirit, SPELL_SPIRIT_HEAL, true);
- // Resurect player
+ // Resurrect player
player->CastSpell(player, SPELL_RESURRECTION_VISUAL, true);
player->ResurrectPlayer(1.0f);
player->CastSpell(player, 6962, true);
diff --git a/src/server/game/Battlefield/Battlefield.h b/src/server/game/Battlefield/Battlefield.h
index 6c9e653c510..296c48b0697 100644
--- a/src/server/game/Battlefield/Battlefield.h
+++ b/src/server/game/Battlefield/Battlefield.h
@@ -173,7 +173,7 @@ class BfGraveyard
// Check if this graveyard has a spirit guide
bool HasNpc(uint64 guid);
- // Check if a player is in this graveyard's ressurect queue
+ // Check if a player is in this graveyard's resurrect queue
bool HasPlayer(uint64 guid) { return m_ResurrectQueue.find(guid) != m_ResurrectQueue.end(); }
// Get the graveyard's ID.
@@ -383,7 +383,7 @@ class Battlefield : public ZoneScript
// Graveyard variables
GraveyardVect m_GraveyardList; // Vector witch contain the different GY of the battle
- uint32 m_LastResurectTimer; // Timer for resurect player every 30 sec
+ uint32 m_LastResurrectTimer; // Timer for resurrect player every 30 sec
uint32 m_StartGroupingTimer; // Timer for invite players in area 15 minute before start battle
bool m_StartGrouping; // bool for know if all players in area has been invited
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp
index 97320373e16..ca48ffb3a14 100644
--- a/src/server/game/Battlegrounds/Battleground.cpp
+++ b/src/server/game/Battlegrounds/Battleground.cpp
@@ -269,7 +269,7 @@ void Battleground::Update(uint32 diff)
}
else
{
- _ProcessRessurect(diff);
+ _ProcessResurrect(diff);
if (sBattlegroundMgr->GetPrematureFinishTime() && (GetPlayersCountByTeam(ALLIANCE) < GetMinPlayersPerTeam() || GetPlayersCountByTeam(HORDE) < GetMinPlayersPerTeam()))
_ProcessProgress(diff);
else if (m_PrematureCountDown)
@@ -334,10 +334,10 @@ inline void Battleground::_ProcessOfflineQueue()
}
}
-inline void Battleground::_ProcessRessurect(uint32 diff)
+inline void Battleground::_ProcessResurrect(uint32 diff)
{
// *********************************************************
- // *** BATTLEGROUND RESSURECTION SYSTEM ***
+ // *** BATTLEGROUND RESURRECTION SYSTEM ***
// *********************************************************
// this should be handled by spell system
m_LastResurrectTime += diff;
diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h
index 2cbf8bd0918..4256e2fc094 100644
--- a/src/server/game/Battlegrounds/Battleground.h
+++ b/src/server/game/Battlegrounds/Battleground.h
@@ -556,7 +556,7 @@ class Battleground
Player* _GetPlayerForTeam(uint32 teamId, BattlegroundPlayerMap::const_iterator itr, const char* context) const;
void _ProcessOfflineQueue();
- void _ProcessRessurect(uint32 diff);
+ void _ProcessResurrect(uint32 diff);
void _ProcessProgress(uint32 diff);
void _ProcessLeave(uint32 diff);
void _ProcessJoin(uint32 diff);
diff --git a/src/server/game/Chat/Channels/Channel.h b/src/server/game/Chat/Channels/Channel.h
index 9ad6877d929..115e340762e 100644
--- a/src/server/game/Chat/Channels/Channel.h
+++ b/src/server/game/Chat/Channels/Channel.h
@@ -25,7 +25,7 @@
#include "Common.h"
-#include "Opcodes.h"
+#include "WorldSession.h"
#include "WorldPacket.h"
class Player;
diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp
index 9b0465a4536..44f03b6978d 100644
--- a/src/server/game/DataStores/DBCStores.cpp
+++ b/src/server/game/DataStores/DBCStores.cpp
@@ -139,6 +139,7 @@ DBCStorage <MovieEntry> sMovieStore(MovieEntryfmt);
DBCStorage <OverrideSpellDataEntry> sOverrideSpellDataStore(OverrideSpellDatafmt);
+DBCStorage <PowerDisplayEntry> sPowerDisplayStore(PowerDisplayfmt);
DBCStorage <PvPDifficultyEntry> sPvPDifficultyStore(PvPDifficultyfmt);
DBCStorage <QuestSortEntry> sQuestSortStore(QuestSortEntryfmt);
@@ -391,6 +392,7 @@ void LoadDBCStores(const std::string& dataPath)
LoadDBC(availableDbcLocales, bad_dbc_files, sOverrideSpellDataStore, dbcPath, "OverrideSpellData.dbc");
+ LoadDBC(availableDbcLocales, bad_dbc_files, sPowerDisplayStore, dbcPath, "PowerDisplay.dbc");
LoadDBC(availableDbcLocales, bad_dbc_files, sPvPDifficultyStore, dbcPath, "PvpDifficulty.dbc");
for (uint32 i = 0; i < sPvPDifficultyStore.GetNumRows(); ++i)
if (PvPDifficultyEntry const* entry = sPvPDifficultyStore.LookupEntry(i))
diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h
index b77db950541..fe775dfda19 100644
--- a/src/server/game/DataStores/DBCStores.h
+++ b/src/server/game/DataStores/DBCStores.h
@@ -141,6 +141,7 @@ extern DBCStorage <MapEntry> sMapStore;
extern MapDifficultyMap sMapDifficultyMap;
extern DBCStorage <MovieEntry> sMovieStore;
extern DBCStorage <OverrideSpellDataEntry> sOverrideSpellDataStore;
+extern DBCStorage <PowerDisplayEntry> sPowerDisplayStore;
extern DBCStorage <QuestSortEntry> sQuestSortStore;
extern DBCStorage <QuestXPEntry> sQuestXPStore;
extern DBCStorage <QuestFactionRewEntry> sQuestFactionRewardStore;
diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h
index abe7bde4bf5..5d6c8c7aa89 100644
--- a/src/server/game/DataStores/DBCStructure.h
+++ b/src/server/game/DataStores/DBCStructure.h
@@ -1398,6 +1398,16 @@ struct OverrideSpellDataEntry
//uint32 unk0; // 11
};
+struct PowerDisplayEntry
+{
+ uint32 Id; // 0
+ uint32 PowerType; // 1
+ //char* Name; // 2
+ //uint32 R; // 3
+ //uint32 G; // 4
+ //uint32 B; // 5
+};
+
struct PvPDifficultyEntry
{
//uint32 id; // 0 m_ID
@@ -1982,7 +1992,7 @@ struct VehicleEntry
uint32 m_uiLocomotionType; // 34
float m_msslTrgtImpactTexRadius; // 35
uint32 m_uiSeatIndicatorType; // 36
- uint32 m_powerType; // 37, new in 3.1
+ uint32 m_powerDisplayId; // 37, new in 3.1
// 38, new in 3.1
// 39, new in 3.1
};
diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h
index 35a8eecb708..222353467f4 100644
--- a/src/server/game/DataStores/DBCfmt.h
+++ b/src/server/game/DataStores/DBCfmt.h
@@ -91,6 +91,7 @@ char const OverrideSpellDatafmt[] = "niiiiiiiiiix";
char const QuestFactionRewardfmt[] = "niiiiiiiiii";
char const QuestSortEntryfmt[] = "nxxxxxxxxxxxxxxxxx";
char const QuestXPfmt[] = "niiiiiiiiii";
+char const PowerDisplayfmt[] = "nixxxx";
char const PvPDifficultyfmt[] = "diiiii";
char const RandomPropertiesPointsfmt[] = "niiiiiiiiiiiiiii";
char const ScalingStatDistributionfmt[] = "niiiiiiiiiiiiiiiiiiiii";
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index 36997eb884a..90527912efd 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -111,11 +111,11 @@ uint32 CreatureTemplate::GetFirstValidModelId() const
bool AssistDelayEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
{
- if (Unit* victim = Unit::GetUnit(m_owner, m_victim))
+ if (Unit* victim = ObjectAccessor::GetUnit(m_owner, m_victim))
{
while (!m_assistants.empty())
{
- Creature* assistant = Unit::GetCreature(m_owner, *m_assistants.begin());
+ Creature* assistant = ObjectAccessor::GetCreature(m_owner, *m_assistants.begin());
m_assistants.pop_front();
if (assistant && assistant->CanAssistTo(&m_owner, victim))
@@ -569,7 +569,7 @@ void Creature::Update(uint32 diff)
if (getPowerType() == POWER_ENERGY)
{
- if (!IsVehicle() || GetVehicleKit()->GetVehicleInfo()->m_powerType != POWER_PYRITE)
+ if (!IsVehicle() || GetVehicleKit()->GetVehicleInfo()->m_powerDisplayId != POWER_PYRITE)
Regenerate(POWER_ENERGY);
}
else
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index 306e4209e4d..e0374db3ece 100644
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -561,7 +561,7 @@ void GameObject::Update(uint32 diff)
CastSpell(NULL, goInfo->trap.spellId);
SetLootState(GO_JUST_DEACTIVATED);
}
- else if (Unit* target = Unit::GetUnit(*this, m_lootStateUnitGUID))
+ else if (Unit* target = ObjectAccessor::GetUnit(*this, m_lootStateUnitGUID))
{
// Some traps do not have a spell but should be triggered
if (goInfo->trap.spellId)
diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp
index ee389ed7311..4573b85c7f3 100644
--- a/src/server/game/Entities/Item/Item.cpp
+++ b/src/server/game/Entities/Item/Item.cpp
@@ -27,7 +27,7 @@
#include "ScriptMgr.h"
#include "ConditionMgr.h"
#include "Player.h"
-#include "Opcodes.h"
+#include "WorldSession.h"
void AddItemsSetItem(Player* player, Item* item)
{
diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp
index eb4e2fcf2ee..768f5907c19 100644
--- a/src/server/game/Entities/Pet/Pet.cpp
+++ b/src/server/game/Entities/Pet/Pet.cpp
@@ -30,7 +30,7 @@
#include "Unit.h"
#include "Util.h"
#include "Group.h"
-#include "Opcodes.h"
+#include "WorldSession.h"
#define PET_XP_FACTOR 0.05f
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 29a178b419f..f1a1524f504 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -144,6 +144,8 @@ enum CharacterCustomizeFlags
static uint32 copseReclaimDelay[MAX_DEATH_COUNT] = { 30, 60, 120 };
+uint32 const MAX_MONEY_AMOUNT = static_cast<uint32>(std::numeric_limits<int32>::max());
+
// == PlayerTaxi ================================================
PlayerTaxi::PlayerTaxi()
@@ -8199,7 +8201,12 @@ void Player::_ApplyWeaponDependentAuraDamageMod(Item* item, WeaponAttackType att
{
HandleStatModifier(unitMod, unitModType, float(aura->GetAmount()), apply);
if (unitModType == TOTAL_VALUE)
- ApplyModUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS, aura->GetAmount(), apply);
+ {
+ if (aura->GetAmount() > 0)
+ ApplyModUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS, aura->GetAmount(), apply);
+ else
+ ApplyModUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG, aura->GetAmount(), apply);
+ }
}
}
@@ -23925,7 +23932,7 @@ uint32 Player::GetBaseWeaponSkillValue (WeaponAttackType attType) const
return GetBaseSkillValue(skill);
}
-void Player::ResurectUsingRequestData()
+void Player::ResurrectUsingRequestData()
{
/// Teleport before resurrecting by player, otherwise the player might get attacked from creatures near his corpse
TeleportTo(m_resurrectMap, m_resurrectX, m_resurrectY, m_resurrectZ, GetOrientation());
diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h
index 39f3c804025..7e1d9be0f88 100644
--- a/src/server/game/Entities/Player/Player.h
+++ b/src/server/game/Entities/Player/Player.h
@@ -826,7 +826,7 @@ enum PlayerDelayedOperations
// Player summoning auto-decline time (in secs)
#define MAX_PLAYER_SUMMON_DELAY (2*MINUTE)
// Maximum money amount : 2^31 - 1
-auto constexpr MAX_MONEY_AMOUNT(static_cast<uint32>(std::numeric_limits<int32>::max()));
+extern uint32 const MAX_MONEY_AMOUNT;
struct InstancePlayerBind
{
@@ -1654,9 +1654,9 @@ class Player : public Unit, public GridObject<Player>
void setResurrectRequestData(uint64 guid, uint32 mapId, float X, float Y, float Z, uint32 health, uint32 mana);
void clearResurrectRequestData() { setResurrectRequestData(0, 0, 0.0f, 0.0f, 0.0f, 0, 0); }
- bool isRessurectRequestedBy(uint64 guid) const { return m_resurrectGUID == guid; }
- bool isRessurectRequested() const { return m_resurrectGUID != 0; }
- void ResurectUsingRequestData();
+ bool isResurrectRequestedBy(uint64 guid) const { return m_resurrectGUID == guid; }
+ bool isResurrectRequested() const { return m_resurrectGUID != 0; }
+ void ResurrectUsingRequestData();
uint8 getCinematic() { return m_cinematic; }
void setCinematic(uint8 cine) { m_cinematic = cine; }
diff --git a/src/server/game/Entities/Player/SocialMgr.cpp b/src/server/game/Entities/Player/SocialMgr.cpp
index 8c8e470f80b..25315a30da1 100644
--- a/src/server/game/Entities/Player/SocialMgr.cpp
+++ b/src/server/game/Entities/Player/SocialMgr.cpp
@@ -19,7 +19,7 @@
#include "SocialMgr.h"
#include "DatabaseEnv.h"
-#include "Opcodes.h"
+#include "WorldSession.h"
#include "WorldPacket.h"
#include "Player.h"
#include "ObjectMgr.h"
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 00172face5f..abc16256b73 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -12988,21 +12988,6 @@ float Unit::GetSpellMinRangeForTarget(Unit const* target, SpellInfo const* spell
return spellInfo->GetMinRange(!IsHostileTo(target));
}
-Unit* Unit::GetUnit(WorldObject& object, uint64 guid)
-{
- return ObjectAccessor::GetUnit(object, guid);
-}
-
-Player* Unit::GetPlayer(WorldObject& object, uint64 guid)
-{
- return ObjectAccessor::GetPlayer(object, guid);
-}
-
-Creature* Unit::GetCreature(WorldObject& object, uint64 guid)
-{
- return object.GetMap()->GetCreature(guid);
-}
-
uint32 Unit::GetCreatureType() const
{
if (GetTypeId() == TYPEID_PLAYER)
@@ -15248,8 +15233,8 @@ void Unit::Kill(Unit* victim, bool durabilityLoss)
// update get killing blow achievements, must be done before setDeathState to be able to require auras on target
// and before Spirit of Redemption as it also removes auras
- if (player)
- player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GET_KILLING_BLOWS, 1, 0, victim);
+ if (Player* killerPlayer = GetCharmerOrOwnerPlayerOrPlayerItself())
+ killerPlayer->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GET_KILLING_BLOWS, 1, 0, victim);
// if talent known but not triggered (check priest class for speedup check)
bool spiritOfRedemption = false;
diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h
index 9926403f7af..1735d1a8b8c 100644
--- a/src/server/game/Entities/Unit/Unit.h
+++ b/src/server/game/Entities/Unit/Unit.h
@@ -2028,9 +2028,6 @@ class Unit : public WorldObject
void addFollower(FollowerReference* pRef) { m_FollowingRefManager.insertFirst(pRef); }
void removeFollower(FollowerReference* /*pRef*/) { /* nothing to do yet */ }
- static Unit* GetUnit(WorldObject& object, uint64 guid);
- static Player* GetPlayer(WorldObject& object, uint64 guid);
- static Creature* GetCreature(WorldObject& object, uint64 guid);
MotionMaster* GetMotionMaster() { return i_motionMaster; }
const MotionMaster* GetMotionMaster() const { return i_motionMaster; }
diff --git a/src/server/game/Entities/Vehicle/Vehicle.cpp b/src/server/game/Entities/Vehicle/Vehicle.cpp
index fae4f0c6b6a..4c3724a8860 100755
--- a/src/server/game/Entities/Vehicle/Vehicle.cpp
+++ b/src/server/game/Entities/Vehicle/Vehicle.cpp
@@ -76,42 +76,9 @@ Vehicle::~Vehicle()
void Vehicle::Install()
{
- if (Creature* creature = _me->ToCreature())
- {
- switch (_vehicleInfo->m_powerType)
- {
- case POWER_STEAM:
- case POWER_HEAT:
- case POWER_BLOOD:
- case POWER_OOZE:
- case POWER_WRATH:
- _me->setPowerType(POWER_ENERGY);
- _me->SetMaxPower(POWER_ENERGY, 100);
- break;
- case POWER_PYRITE:
- _me->setPowerType(POWER_ENERGY);
- _me->SetMaxPower(POWER_ENERGY, 50);
- break;
- default:
- for (uint32 i = 0; i < MAX_SPELL_VEHICLE; ++i)
- {
- if (!creature->m_spells[i])
- continue;
-
- SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(creature->m_spells[i]);
- if (!spellInfo)
- continue;
-
- if (spellInfo->PowerType == POWER_ENERGY && spellInfo->CalcPowerCost(_me, spellInfo->GetSchoolMask()) > 0)
- {
- _me->setPowerType(POWER_ENERGY);
- _me->SetMaxPower(POWER_ENERGY, 100);
- break;
- }
- }
- break;
- }
- }
+ if (_me->GetTypeId() == TYPEID_UNIT)
+ if (PowerDisplayEntry const* powerDisplay = sPowerDisplayStore.LookupEntry(_vehicleInfo->m_powerDisplayId))
+ _me->setPowerType(Powers(powerDisplay->PowerType));
_status = STATUS_INSTALLED;
if (GetBase()->GetTypeId() == TYPEID_UNIT)
diff --git a/src/server/game/Handlers/CalendarHandler.cpp b/src/server/game/Handlers/CalendarHandler.cpp
index ebb1f9c8e57..278c180c380 100644
--- a/src/server/game/Handlers/CalendarHandler.cpp
+++ b/src/server/game/Handlers/CalendarHandler.cpp
@@ -260,7 +260,7 @@ void WorldSession::HandleCalendarAddEvent(WorldPacket& recvData)
trans = CharacterDatabase.BeginTransaction();
// client limits the amount of players to be invited to 100
- const int MaxPlayerInvites = 100;
+ const uint32 MaxPlayerInvites = 100;
for (uint32 i = 0; i < inviteCount && i < MaxPlayerInvites; ++i)
{
diff --git a/src/server/game/Handlers/ChatHandler.cpp b/src/server/game/Handlers/ChatHandler.cpp
index e0b29523a3a..eccf7a6fd38 100644
--- a/src/server/game/Handlers/ChatHandler.cpp
+++ b/src/server/game/Handlers/ChatHandler.cpp
@@ -269,7 +269,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
}
Player* receiver = sObjectAccessor->FindPlayerByName(to);
- if (!receiver || (!receiver->isAcceptWhispers() && receiver->GetSession()->HasPermission(rbac::RBAC_PERM_CAN_FILTER_WHISPERS) && !receiver->IsInWhisperWhiteList(sender->GetGUID())))
+ if (!receiver || (lang != LANG_ADDON && !receiver->isAcceptWhispers() && receiver->GetSession()->HasPermission(rbac::RBAC_PERM_CAN_FILTER_WHISPERS) && !receiver->IsInWhisperWhiteList(sender->GetGUID())))
{
SendPlayerNotFoundNotice(to);
return;
diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp
index 1b04c89b338..df86c9b4b83 100644
--- a/src/server/game/Handlers/MiscHandler.cpp
+++ b/src/server/game/Handlers/MiscHandler.cpp
@@ -793,10 +793,10 @@ void WorldSession::HandleResurrectResponseOpcode(WorldPacket& recvData)
return;
}
- if (!GetPlayer()->isRessurectRequestedBy(guid))
+ if (!GetPlayer()->isResurrectRequestedBy(guid))
return;
- GetPlayer()->ResurectUsingRequestData();
+ GetPlayer()->ResurrectUsingRequestData();
}
void WorldSession::SendAreaTriggerMessage(const char* Text, ...)
diff --git a/src/server/game/Handlers/VehicleHandler.cpp b/src/server/game/Handlers/VehicleHandler.cpp
index 3973b23eab4..b3fa240e2d2 100644
--- a/src/server/game/Handlers/VehicleHandler.cpp
+++ b/src/server/game/Handlers/VehicleHandler.cpp
@@ -96,7 +96,7 @@ void WorldSession::HandleChangeSeatsOnControlledVehicle(WorldPacket &recvData)
if (!accessory)
GetPlayer()->ChangeSeat(-1, seatId > 0); // prev/next
- else if (Unit* vehUnit = Unit::GetUnit(*GetPlayer(), accessory))
+ else if (Unit* vehUnit = ObjectAccessor::GetUnit(*GetPlayer(), accessory))
{
if (Vehicle* vehicle = vehUnit->GetVehicleKit())
if (vehicle->HasEmptySeat(seatId))
@@ -114,7 +114,7 @@ void WorldSession::HandleChangeSeatsOnControlledVehicle(WorldPacket &recvData)
if (vehicle_base->GetGUID() == guid)
GetPlayer()->ChangeSeat(seatId);
- else if (Unit* vehUnit = Unit::GetUnit(*GetPlayer(), guid))
+ else if (Unit* vehUnit = ObjectAccessor::GetUnit(*GetPlayer(), guid))
if (Vehicle* vehicle = vehUnit->GetVehicleKit())
if (vehicle->HasEmptySeat(seatId))
vehUnit->HandleSpellClick(GetPlayer(), seatId);
diff --git a/src/server/game/Maps/MapUpdater.cpp b/src/server/game/Maps/MapUpdater.cpp
index f3a5a66bf66..dd697719d54 100644
--- a/src/server/game/Maps/MapUpdater.cpp
+++ b/src/server/game/Maps/MapUpdater.cpp
@@ -6,34 +6,6 @@
#include <ace/Guard_T.h>
#include <ace/Method_Request.h>
-class WDBThreadStartReq1 : public ACE_Method_Request
-{
- public:
-
- WDBThreadStartReq1()
- {
- }
-
- virtual int call()
- {
- return 0;
- }
-};
-
-class WDBThreadEndReq1 : public ACE_Method_Request
-{
- public:
-
- WDBThreadEndReq1()
- {
- }
-
- virtual int call()
- {
- return 0;
- }
-};
-
class MapUpdateRequest : public ACE_Method_Request
{
private:
@@ -67,7 +39,7 @@ MapUpdater::~MapUpdater()
int MapUpdater::activate(size_t num_threads)
{
- return m_executor.start((int)num_threads, new WDBThreadStartReq1, new WDBThreadEndReq1);
+ return m_executor.start((int)num_threads);
}
int MapUpdater::deactivate()
diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h
index eabc15d6ee7..34871085157 100644
--- a/src/server/game/Miscellaneous/Language.h
+++ b/src/server/game/Miscellaneous/Language.h
@@ -1224,6 +1224,8 @@ enum TrinityStrings
LANG_BAN_ACCOUNT_YOUBANNEDMESSAGE_WORLD = 11006,
LANG_BAN_ACCOUNT_YOUPERMBANNEDMESSAGE_WORLD = 11007,
+ LANG_NPCINFO_INHABIT_TYPE = 11008
+
// NOT RESERVED IDS 12000-1999999999
// `db_script_string` table index 2000000000-2000009999 (MIN_DB_SCRIPT_STRING_ID-MAX_DB_SCRIPT_STRING_ID)
// For other tables maybe 2000010000-2147483647 (max index)
diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h
index b52e640afc7..0704c4eb9fe 100644
--- a/src/server/game/Miscellaneous/SharedDefines.h
+++ b/src/server/game/Miscellaneous/SharedDefines.h
@@ -1129,7 +1129,7 @@ enum SpellCustomErrors
SPELL_CUSTOM_ERROR_95 = 95, // ""
SPELL_CUSTOM_ERROR_MAX_NUMBER_OF_RECRUITS = 96, // You already have the max number of recruits.
SPELL_CUSTOM_ERROR_MAX_NUMBER_OF_VOLUNTEERS = 97, // You already have the max number of volunteers.
- SPELL_CUSTOM_ERROR_FROSTMOURNE_RENDERED_RESSURECT = 98, // Frostmourne has rendered you unable to ressurect.
+ SPELL_CUSTOM_ERROR_FROSTMOURNE_RENDERED_RESURRECT = 98, // Frostmourne has rendered you unable to resurrect.
SPELL_CUSTOM_ERROR_CANT_MOUNT_WITH_SHAPESHIFT = 99 // You can't mount while affected by that shapeshift.
};
diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp
index 69e677bd89d..46b73e74068 100644
--- a/src/server/game/Reputation/ReputationMgr.cpp
+++ b/src/server/game/Reputation/ReputationMgr.cpp
@@ -24,7 +24,7 @@
#include "World.h"
#include "ObjectMgr.h"
#include "ScriptMgr.h"
-#include "Opcodes.h"
+#include "WorldSession.h"
const int32 ReputationMgr::PointsInRank[MAX_REPUTATION_RANK] = {36000, 3000, 3000, 3000, 6000, 12000, 21000, 1000};
diff --git a/src/server/game/Server/Protocol/Opcodes.h b/src/server/game/Server/Protocol/Opcodes.h
index e581d7d1544..7b07abdf962 100644
--- a/src/server/game/Server/Protocol/Opcodes.h
+++ b/src/server/game/Server/Protocol/Opcodes.h
@@ -25,12 +25,6 @@
#include "Common.h"
-// Note: this include need for be sure have full definition of class WorldSession
-// if this class definition not complete then VS for x64 release use different size for
-// struct OpcodeHandler in this header and Opcode.cpp and get totally wrong data from
-// table opcodeTable in source when Opcode.h included but WorldSession.h not included
-#include "WorldSession.h"
-
/// List of Opcodes
enum Opcodes
{
@@ -1366,8 +1360,15 @@ enum PacketProcessing
PROCESS_THREADSAFE //packet is thread-safe - process it in Map::Update()
};
+class WorldSession;
class WorldPacket;
+#if defined(__GNUC__)
+#pragma pack(1)
+#else
+#pragma pack(push, 1)
+#endif
+
struct OpcodeHandler
{
char const* name;
@@ -1378,6 +1379,12 @@ struct OpcodeHandler
extern OpcodeHandler opcodeTable[NUM_MSG_TYPES];
+#if defined(__GNUC__)
+#pragma pack()
+#else
+#pragma pack(pop)
+#endif
+
/// Lookup opcode name for human understandable logging
inline const char* LookupOpcodeName(uint16 id)
{
diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp
index 89242bada6e..850aecbf164 100644
--- a/src/server/game/Server/WorldSession.cpp
+++ b/src/server/game/Server/WorldSession.cpp
@@ -277,12 +277,13 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
//! loop caused by re-enqueueing the same packets over and over again, we stop updating this session
//! and continue updating others. The re-enqueued packets will be handled in the next Update call for this session.
uint32 processedPackets = 0;
+ time_t currentTime = time(NULL);
while (m_Socket && !m_Socket->IsClosed() &&
!_recvQueue.empty() && _recvQueue.peek(true) != firstDelayedPacket &&
_recvQueue.next(packet, updater))
{
- if (!AntiDOS.EvaluateOpcode(*packet))
+ if (!AntiDOS.EvaluateOpcode(*packet, currentTime))
{
KickPlayer();
}
@@ -1236,14 +1237,38 @@ void WorldSession::InvalidateRBACData()
_RBACData = NULL;
}
-bool WorldSession::DosProtection::EvaluateOpcode(WorldPacket& p) const
+bool WorldSession::DosProtection::EvaluateOpcode(WorldPacket& p, time_t time) const
{
- if (IsOpcodeAllowed(p.GetOpcode()))
- return true;
+ PacketCounter& packetCounter = _PacketThrottlingMap[p.GetOpcode()];
+ if (packetCounter.lastReceiveTime != time)
+ {
+ packetCounter.lastReceiveTime = time;
+ packetCounter.amountCounter = 0;
+ }
+
+ uint32 maxPacketCounterAllowed = GetMaxPacketCounterAllowed(p.GetOpcode());
+
+ bool dosTriggered = false;
+ // Check if player is flooding some packets
+ if (++packetCounter.amountCounter > maxPacketCounterAllowed)
+ {
+ dosTriggered = true;
+ TC_LOG_WARN("network", "AntiDOS: Account %u, IP: %s, flooding packet (opc: %u, size: %u)",
+ Session->GetAccountId(), Session->GetRemoteAddress().c_str(), p.GetOpcode(), (uint32)p.size());
+ }
+
+ // Then check if player is sending packets not allowed
+ if (!IsOpcodeAllowed(p.GetOpcode()))
+ {
+ dosTriggered = true;
+ // Opcode not allowed, let the punishment begin
+ TC_LOG_WARN("network", "AntiDOS: Account %u, IP: %s, sent unacceptable packet (opc: %u, size: %u)",
+ Session->GetAccountId(), Session->GetRemoteAddress().c_str(), p.GetOpcode(), (uint32)p.size());
+ }
- // Opcode not allowed, let the punishment begin
- TC_LOG_INFO("network", "AntiDOS: Account %u, IP: %s, sent unacceptable packet (opc: %u, size: %u)",
- Session->GetAccountId(), Session->GetRemoteAddress().c_str(), p.GetOpcode(), (uint32)p.size());
+ // Return true if everything is fine, otherwise apply the configured policy
+ if (!dosTriggered)
+ return true;
switch (_policy)
{
@@ -1272,3 +1297,194 @@ bool WorldSession::DosProtection::EvaluateOpcode(WorldPacket& p) const
return true;
}
}
+
+
+uint32 WorldSession::DosProtection::GetMaxPacketCounterAllowed(uint16 opcode) const
+{
+ uint32 maxPacketCounterAllowed;
+ switch (opcode)
+ {
+ case CMSG_ITEM_QUERY_SINGLE:
+ case CMSG_ITEM_NAME_QUERY:
+ case CMSG_GUILD_QUERY:
+ case CMSG_NAME_QUERY:
+ case CMSG_PET_NAME_QUERY:
+ case CMSG_GAMEOBJECT_QUERY:
+ case CMSG_CREATURE_QUERY:
+ case CMSG_NPC_TEXT_QUERY:
+ case CMSG_ARENA_TEAM_QUERY:
+ case CMSG_TAXINODE_STATUS_QUERY:
+ case CMSG_TAXIQUERYAVAILABLENODES:
+ case CMSG_QUESTGIVER_QUERY_QUEST:
+ case CMSG_QUEST_QUERY:
+ case CMSG_QUESTGIVER_STATUS_MULTIPLE_QUERY:
+ case CMSG_QUERY_QUESTS_COMPLETED:
+ case CMSG_QUEST_POI_QUERY:
+ case CMSG_QUERY_TIME:
+ case CMSG_PAGE_TEXT_QUERY:
+ case CMSG_PETITION_QUERY:
+ case CMSG_QUERY_INSPECT_ACHIEVEMENTS:
+ case CMSG_AREA_SPIRIT_HEALER_QUERY:
+ case CMSG_CORPSE_MAP_POSITION_QUERY:
+ case CMSG_MOVE_TIME_SKIPPED:
+ case CMSG_GUILD_BANK_QUERY_TAB:
+ case MSG_GUILD_BANK_LOG_QUERY:
+ case MSG_QUERY_GUILD_BANK_TEXT:
+ case MSG_CORPSE_QUERY:
+ case MSG_QUERY_NEXT_MAIL_TIME:
+ case MSG_GUILD_EVENT_LOG_QUERY:
+ case MSG_MOVE_SET_FACING:
+ {
+ maxPacketCounterAllowed = 200;
+ break;
+ }
+
+ case CMSG_MESSAGECHAT:
+ case CMSG_WHO:
+ case CMSG_GAMEOBJ_USE:
+ case CMSG_GAMEOBJ_REPORT_USE:
+ case CMSG_SPELLCLICK:
+ case CMSG_PLAYER_LOGOUT:
+ case CMSG_LOGOUT_REQUEST:
+ case CMSG_LOGOUT_CANCEL:
+ case CMSG_CHANGE_SEATS_ON_CONTROLLED_VEHICLE:
+ case CMSG_REQUEST_VEHICLE_PREV_SEAT:
+ case CMSG_REQUEST_VEHICLE_NEXT_SEAT:
+ case CMSG_REQUEST_VEHICLE_SWITCH_SEAT:
+ case CMSG_TOGGLE_PVP:
+ case CMSG_CONTACT_LIST:
+ case CMSG_ADD_FRIEND:
+ case CMSG_DEL_FRIEND:
+ case CMSG_SET_CONTACT_NOTES:
+ case CMSG_RESET_INSTANCES:
+ case CMSG_HEARTH_AND_RESURRECT:
+ case CMSG_CHAR_CREATE:
+ case CMSG_READY_FOR_ACCOUNT_DATA_TIMES:
+ case CMSG_CHAR_ENUM:
+ case CMSG_REALM_SPLIT:
+ case CMSG_CHAR_DELETE:
+ case CMSG_PLAYER_LOGIN:
+ case CMSG_PET_ABANDON:
+ case CMSG_PET_RENAME:
+ case CMSG_CHAR_RENAME:
+ case CMSG_CHAR_CUSTOMIZE:
+ case CMSG_CHAR_RACE_CHANGE:
+ case CMSG_CHAR_FACTION_CHANGE:
+ case CMSG_GMTICKET_CREATE:
+ case CMSG_GMTICKET_UPDATETEXT:
+ case CMSG_GMTICKET_DELETETICKET:
+ case CMSG_GMSURVEY_SUBMIT:
+ case CMSG_GM_REPORT_LAG:
+ case CMSG_BUG:
+ case CMSG_GMRESPONSE_RESOLVE:
+ case CMSG_ACTIVATETAXIEXPRESS:
+ case CMSG_ACTIVATETAXI:
+ case CMSG_SELF_RES:
+ case CMSG_INITIATE_TRADE:
+ case CMSG_BEGIN_TRADE:
+ case CMSG_UNLEARN_SKILL:
+ case CMSG_DISMISS_CONTROLLED_VEHICLE:
+ case CMSG_REQUEST_VEHICLE_EXIT:
+ case CMSG_LEARN_PREVIEW_TALENTS:
+ case CMSG_LEARN_PREVIEW_TALENTS_PET:
+ case CMSG_PLAYER_VEHICLE_ENTER:
+ case CMSG_CONTROLLER_EJECT_PASSENGER:
+ case CMSG_EQUIPMENT_SET_SAVE:
+ case CMSG_DELETEEQUIPMENT_SET:
+ case CMSG_REMOVE_GLYPH:
+ case CMSG_ALTER_APPEARANCE:
+ case CMSG_QUESTGIVER_ACCEPT_QUEST:
+ case CMSG_QUESTGIVER_CHOOSE_REWARD:
+ case CMSG_QUESTGIVER_REQUEST_REWARD:
+ case CMSG_QUESTGIVER_CANCEL:
+ case CMSG_QUESTLOG_REMOVE_QUEST:
+ case CMSG_QUEST_CONFIRM_ACCEPT:
+ case CMSG_QUESTGIVER_COMPLETE_QUEST:
+ case CMSG_DISMISS_CRITTER:
+ case CMSG_REPOP_REQUEST:
+ case CMSG_PETITION_BUY:
+ case CMSG_PETITION_SIGN:
+ case CMSG_TURN_IN_PETITION:
+ case CMSG_COMPLETE_CINEMATIC:
+ case CMSG_ITEM_REFUND:
+ case CMSG_SOCKET_GEMS:
+ case CMSG_WRAP_ITEM:
+ case CMSG_BUY_BANK_SLOT:
+ case CMSG_GROUP_ACCEPT:
+ case CMSG_GROUP_DECLINE:
+ case CMSG_GROUP_UNINVITE_GUID:
+ case CMSG_GROUP_UNINVITE:
+ case CMSG_GROUP_SET_LEADER:
+ case CMSG_GROUP_DISBAND:
+ case CMSG_GROUP_RAID_CONVERT:
+ case CMSG_GROUP_CHANGE_SUB_GROUP:
+ case CMSG_GROUP_ASSISTANT_LEADER:
+ case CMSG_REQUEST_PARTY_MEMBER_STATS:
+ case CMSG_OPT_OUT_OF_LOOT:
+ case CMSG_BATTLEMASTER_JOIN_ARENA:
+ case CMSG_LEAVE_BATTLEFIELD:
+ case CMSG_REPORT_PVP_AFK:
+ case CMSG_DUEL_ACCEPTED:
+ case CMSG_DUEL_CANCELLED:
+ case CMSG_SETSHEATHED:
+ case CMSG_CALENDAR_GET_CALENDAR:
+ case CMSG_CALENDAR_ADD_EVENT:
+ case CMSG_CALENDAR_UPDATE_EVENT:
+ case CMSG_CALENDAR_REMOVE_EVENT:
+ case CMSG_CALENDAR_COPY_EVENT:
+ case CMSG_CALENDAR_EVENT_INVITE:
+ case CMSG_CALENDAR_EVENT_SIGNUP:
+ case CMSG_CALENDAR_EVENT_RSVP:
+ case CMSG_CALENDAR_EVENT_REMOVE_INVITE:
+ case CMSG_CALENDAR_EVENT_MODERATOR_STATUS:
+ case CMSG_CALENDAR_COMPLAIN:
+ case CMSG_ARENA_TEAM_INVITE:
+ case CMSG_ARENA_TEAM_ACCEPT:
+ case CMSG_ARENA_TEAM_DECLINE:
+ case CMSG_ARENA_TEAM_LEAVE:
+ case CMSG_ARENA_TEAM_DISBAND:
+ case CMSG_ARENA_TEAM_REMOVE:
+ case CMSG_ARENA_TEAM_LEADER:
+ case CMSG_LOOT_METHOD:
+ case CMSG_GUILD_INVITE:
+ case CMSG_GUILD_ACCEPT:
+ case CMSG_GUILD_DECLINE:
+ case CMSG_GUILD_LEAVE:
+ case CMSG_GUILD_DISBAND:
+ case CMSG_GUILD_LEADER:
+ case CMSG_GUILD_MOTD:
+ case CMSG_GUILD_SET_PUBLIC_NOTE:
+ case CMSG_GUILD_SET_OFFICER_NOTE:
+ case CMSG_GUILD_RANK:
+ case CMSG_GUILD_ADD_RANK:
+ case CMSG_GUILD_DEL_RANK:
+ case CMSG_GUILD_INFO_TEXT:
+ case CMSG_GUILD_BANK_DEPOSIT_MONEY:
+ case CMSG_GUILD_BANK_WITHDRAW_MONEY:
+ case CMSG_GUILD_BANK_BUY_TAB:
+ case CMSG_GUILD_BANK_UPDATE_TAB:
+ case CMSG_SET_GUILD_BANK_TEXT:
+ case MSG_SAVE_GUILD_EMBLEM:
+ case MSG_PETITION_RENAME:
+ case MSG_PETITION_DECLINE:
+ case MSG_TALENT_WIPE_CONFIRM:
+ case MSG_SET_DUNGEON_DIFFICULTY:
+ case MSG_SET_RAID_DIFFICULTY:
+ case MSG_RANDOM_ROLL:
+ case MSG_RAID_TARGET_UPDATE:
+ case MSG_PARTY_ASSIGNMENT:
+ case MSG_RAID_READY_CHECK:
+ {
+ maxPacketCounterAllowed = 3;
+ break;
+ }
+
+ default:
+ {
+ maxPacketCounterAllowed = 30;
+ break;
+ }
+ }
+
+ return maxPacketCounterAllowed;
+}
diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h
index 9d1a05ae753..7bea0ef9a85 100644
--- a/src/server/game/Server/WorldSession.h
+++ b/src/server/game/Server/WorldSession.h
@@ -28,6 +28,7 @@
#include "AddonMgr.h"
#include "DatabaseEnv.h"
#include "World.h"
+#include "Opcodes.h"
#include "WorldPacket.h"
#include "Cryptography/BigNumber.h"
#include "AccountMgr.h"
@@ -196,6 +197,12 @@ class CharacterCreateInfo
uint8 CharCount;
};
+struct PacketCounter
+{
+ time_t lastReceiveTime;
+ uint32 amountCounter;
+};
+
/// Player session in the World
class WorldSession
{
@@ -929,7 +936,7 @@ class WorldSession
friend class World;
public:
DosProtection(WorldSession* s) : Session(s), _policy((Policy)sWorld->getIntConfig(CONFIG_PACKET_SPOOF_POLICY)) { }
- bool EvaluateOpcode(WorldPacket& p) const;
+ bool EvaluateOpcode(WorldPacket& p, time_t time) const;
void AllowOpcode(uint16 opcode, bool allow) { _isOpcodeAllowed[opcode] = allow; }
protected:
enum Policy
@@ -948,12 +955,17 @@ class WorldSession
return itr->second;
}
+ uint32 GetMaxPacketCounterAllowed(uint16 opcode) const;
+
WorldSession* Session;
private:
typedef std::unordered_map<uint16, bool> OpcodeStatusMap;
OpcodeStatusMap _isOpcodeAllowed; // could be bool array, but wouldn't be practical for game versions with non-linear opcodes
Policy _policy;
+ typedef std::unordered_map<uint16, PacketCounter> PacketThrottlingMap;
+ // mark this member as "mutable" so it can be modified even in const functions
+ mutable PacketThrottlingMap _PacketThrottlingMap;
DosProtection(DosProtection const& right) = delete;
DosProtection& operator=(DosProtection const& right) = delete;
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 768c0b7e818..efdc3ca532f 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -4188,7 +4188,7 @@ void Spell::SendChannelStart(uint32 duration)
void Spell::SendResurrectRequest(Player* target)
{
- // get ressurector name for creature resurrections, otherwise packet will be not accepted
+ // get resurrector name for creature resurrections, otherwise packet will be not accepted
// for player resurrections the name is looked up by guid
std::string const sentName(m_caster->GetTypeId() == TYPEID_PLAYER
? ""
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 65530b4b282..5b68d244457 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -259,7 +259,7 @@ void Spell::EffectResurrectNew(SpellEffIndex effIndex)
Player* target = unitTarget->ToPlayer();
- if (target->isRessurectRequested()) // already have one active request
+ if (target->isResurrectRequested()) // already have one active request
return;
uint32 health = damage;
@@ -4542,7 +4542,7 @@ void Spell::EffectResurrect(SpellEffIndex effIndex)
Player* target = unitTarget->ToPlayer();
- if (target->isRessurectRequested()) // already have one active request
+ if (target->isResurrectRequested()) // already have one active request
return;
uint32 health = target->CountPctFromMaxHealth(damage);
diff --git a/src/server/game/Spells/SpellScript.h b/src/server/game/Spells/SpellScript.h
index 75a191a9801..32b8781fb89 100644
--- a/src/server/game/Spells/SpellScript.h
+++ b/src/server/game/Spells/SpellScript.h
@@ -249,7 +249,7 @@ class SpellScript : public _SpellScript
class HitHandlerFunction : public SpellScript::HitHandler { public: HitHandlerFunction(SpellHitFnType _pHitHandlerScript) : SpellScript::HitHandler((SpellScript::SpellHitFnType)_pHitHandlerScript) { } }; \
class ObjectAreaTargetSelectHandlerFunction : public SpellScript::ObjectAreaTargetSelectHandler { public: ObjectAreaTargetSelectHandlerFunction(SpellObjectAreaTargetSelectFnType _pObjectAreaTargetSelectHandlerScript, uint8 _effIndex, uint16 _targetType) : SpellScript::ObjectAreaTargetSelectHandler((SpellScript::SpellObjectAreaTargetSelectFnType)_pObjectAreaTargetSelectHandlerScript, _effIndex, _targetType) { } }; \
class ObjectTargetSelectHandlerFunction : public SpellScript::ObjectTargetSelectHandler { public: ObjectTargetSelectHandlerFunction(SpellObjectTargetSelectFnType _pObjectTargetSelectHandlerScript, uint8 _effIndex, uint16 _targetType) : SpellScript::ObjectTargetSelectHandler((SpellScript::SpellObjectTargetSelectFnType)_pObjectTargetSelectHandlerScript, _effIndex, _targetType) { } }; \
- class DestinationTargetSelectHandlerFunction : public SpellScript::DestinationTargetSelectHandler { public: DestinationTargetSelectHandlerFunction(SpellDestinationTargetSelectFnType _DestinationTargetSelectHandlerScript, uint8 _effIndex, uint16 _targetType) : SpellScript::DestinationTargetSelectHandler((SpellScript::SpellDestinationTargetSelectFnType)_DestinationTargetSelectHandlerScript, _effIndex, _targetType) { } };
+ class DestinationTargetSelectHandlerFunction : public SpellScript::DestinationTargetSelectHandler { public: DestinationTargetSelectHandlerFunction(SpellDestinationTargetSelectFnType _DestinationTargetSelectHandlerScript, uint8 _effIndex, uint16 _targetType) : SpellScript::DestinationTargetSelectHandler((SpellScript::SpellDestinationTargetSelectFnType)_DestinationTargetSelectHandlerScript, _effIndex, _targetType) { } }
#define PrepareSpellScript(CLASSNAME) SPELLSCRIPT_FUNCTION_TYPE_DEFINES(CLASSNAME) SPELLSCRIPT_FUNCTION_CAST_DEFINES(CLASSNAME)
public:
@@ -623,7 +623,7 @@ class AuraScript : public _SpellScript
class EffectSplitFunction : public AuraScript::EffectSplitHandler { public: EffectSplitFunction(AuraEffectSplitFnType _pEffectHandlerScript, uint8 _effIndex) : AuraScript::EffectSplitHandler((AuraScript::AuraEffectSplitFnType)_pEffectHandlerScript, _effIndex) { } }; \
class CheckProcHandlerFunction : public AuraScript::CheckProcHandler { public: CheckProcHandlerFunction(AuraCheckProcFnType handlerScript) : AuraScript::CheckProcHandler((AuraScript::AuraCheckProcFnType)handlerScript) { } }; \
class AuraProcHandlerFunction : public AuraScript::AuraProcHandler { public: AuraProcHandlerFunction(AuraProcFnType handlerScript) : AuraScript::AuraProcHandler((AuraScript::AuraProcFnType)handlerScript) { } }; \
- class EffectProcHandlerFunction : public AuraScript::EffectProcHandler { public: EffectProcHandlerFunction(AuraEffectProcFnType effectHandlerScript, uint8 effIndex, uint16 effName) : AuraScript::EffectProcHandler((AuraScript::AuraEffectProcFnType)effectHandlerScript, effIndex, effName) { } }; \
+ class EffectProcHandlerFunction : public AuraScript::EffectProcHandler { public: EffectProcHandlerFunction(AuraEffectProcFnType effectHandlerScript, uint8 effIndex, uint16 effName) : AuraScript::EffectProcHandler((AuraScript::AuraEffectProcFnType)effectHandlerScript, effIndex, effName) { } }
#define PrepareAuraScript(CLASSNAME) AURASCRIPT_FUNCTION_TYPE_DEFINES(CLASSNAME) AURASCRIPT_FUNCTION_CAST_DEFINES(CLASSNAME)
diff --git a/src/server/game/Weather/Weather.cpp b/src/server/game/Weather/Weather.cpp
index cb332df9a41..8d39f553910 100644
--- a/src/server/game/Weather/Weather.cpp
+++ b/src/server/game/Weather/Weather.cpp
@@ -28,7 +28,7 @@
#include "ObjectMgr.h"
#include "Util.h"
#include "ScriptMgr.h"
-#include "Opcodes.h"
+#include "WorldSession.h"
/// Create the Weather object
Weather::Weather(uint32 zone, WeatherData const* weatherChances)
diff --git a/src/server/game/Weather/WeatherMgr.cpp b/src/server/game/Weather/WeatherMgr.cpp
index 59dc591ccd0..5cf5cde75fd 100644
--- a/src/server/game/Weather/WeatherMgr.cpp
+++ b/src/server/game/Weather/WeatherMgr.cpp
@@ -27,7 +27,7 @@
#include "AutoPtr.h"
#include "Player.h"
#include "WorldPacket.h"
-#include "Opcodes.h"
+#include "WorldSession.h"
namespace WeatherMgr
{
diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp
index a0df1292210..28d49fe11aa 100644
--- a/src/server/scripts/Commands/cs_npc.cpp
+++ b/src/server/scripts/Commands/cs_npc.cpp
@@ -715,6 +715,7 @@ public:
handler->PSendSysMessage(LANG_NPCINFO_LEVEL, target->getLevel());
handler->PSendSysMessage(LANG_NPCINFO_EQUIPMENT, target->GetCurrentEquipmentId(), target->GetOriginalEquipmentId());
handler->PSendSysMessage(LANG_NPCINFO_HEALTH, target->GetCreateHealth(), target->GetMaxHealth(), target->GetHealth());
+ handler->PSendSysMessage(LANG_NPCINFO_INHABIT_TYPE, cInfo->InhabitType);
handler->PSendSysMessage(LANG_NPCINFO_UNIT_FIELD_FLAGS, target->GetUInt32Value(UNIT_FIELD_FLAGS));
for (uint8 i = 0; i < MAX_UNIT_FLAGS; ++i)
diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp
index 354e1204a50..47e91cac63d 100644
--- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp
+++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp
@@ -82,7 +82,7 @@ public:
// check if creature is not outside of building
if (resetTimer < diff)
{
- if (Creature* pBalinda = Unit::GetCreature(*me, balindaGUID))
+ if (Creature* pBalinda = ObjectAccessor::GetCreature(*me, balindaGUID))
if (me->GetDistance2d(pBalinda->GetHomePosition().GetPositionX(), pBalinda->GetHomePosition().GetPositionY()) > 50)
EnterEvadeMode();
resetTimer = 5 * IN_MILLISECONDS;
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp
index 1ab2d746aa5..3eab75cfd76 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp
@@ -229,7 +229,7 @@ public:
if (RingBossGUID)
{
- Creature* boss = Unit::GetCreature(*me, RingBossGUID);
+ Creature* boss = ObjectAccessor::GetCreature(*me, RingBossGUID);
if (boss && !boss->IsAlive() && boss->isDead())
{
RingBossGUID = 0;
@@ -242,7 +242,7 @@ public:
for (uint8 i = 0; i < MAX_NPC_AMOUNT; ++i)
{
- Creature* mob = Unit::GetCreature(*me, RingMobGUID[i]);
+ Creature* mob = ObjectAccessor::GetCreature(*me, RingMobGUID[i]);
if (mob && !mob->IsAlive() && mob->isDead())
{
RingMobGUID[i] = 0;
@@ -1304,7 +1304,7 @@ public:
DoGo(DATA_GO_BAR_KEG_TRAP, 0); //doesn't work very well, leaving code here for future
//spell by trap has effect61, this indicate the bar go hostile
- if (Unit* tmp = Unit::GetUnit(*me, instance->GetData64(DATA_PHALANX)))
+ if (Unit* tmp = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_PHALANX)))
tmp->setFaction(14);
//for later, this event(s) has alot more to it.
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp
index ab065f62bbb..94bf3e991f4 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp
@@ -243,37 +243,37 @@ public:
switch (eventId)
{
case EVENT_START_1:
- if (Creature* victor = me->GetCreature(*me, victorGUID))
+ if (Creature* victor = ObjectAccessor::GetCreature(*me, victorGUID))
victor->AI()->Talk(SAY_NEFARIUS_0);
events.ScheduleEvent(EVENT_START_2, 4000);
break;
case EVENT_START_2:
events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0);
- if (Creature* victor = me->GetCreature(*me, victorGUID))
+ if (Creature* victor = ObjectAccessor::GetCreature(*me, victorGUID))
victor->HandleEmoteCommand(EMOTE_ONESHOT_POINT);
events.ScheduleEvent(EVENT_START_3, 4000);
break;
case EVENT_START_3:
- if (Creature* victor = me->GetCreature(*me, victorGUID))
+ if (Creature* victor = ObjectAccessor::GetCreature(*me, victorGUID))
victor->AI()->Talk(SAY_NEFARIUS_1);
events.ScheduleEvent(EVENT_WAVE_1, 2000);
events.ScheduleEvent(EVENT_TURN_TO_REND, 4000);
events.ScheduleEvent(EVENT_WAVES_TEXT_1, 20000);
break;
case EVENT_TURN_TO_REND:
- if (Creature* victor = me->GetCreature(*me, victorGUID))
+ if (Creature* victor = ObjectAccessor::GetCreature(*me, victorGUID))
{
victor->SetFacingToObject(me);
victor->HandleEmoteCommand(EMOTE_ONESHOT_TALK);
}
break;
case EVENT_TURN_TO_PLAYER:
- if (Creature* victor = me->GetCreature(*me, victorGUID))
+ if (Creature* victor = ObjectAccessor::GetCreature(*me, victorGUID))
if (Unit* player = victor->SelectNearestPlayer(60.0f))
victor->SetFacingToObject(player);
break;
case EVENT_TURN_TO_FACING_1:
- if (Creature* victor = me->GetCreature(*me, victorGUID))
+ if (Creature* victor = ObjectAccessor::GetCreature(*me, victorGUID))
victor->SetFacingTo(1.518436f);
break;
case EVENT_TURN_TO_FACING_2:
@@ -283,7 +283,7 @@ public:
me->SetFacingTo(1.500983f);
break;
case EVENT_WAVES_EMOTE_1:
- if (Creature* victor = me->GetCreature(*me, victorGUID))
+ if (Creature* victor = ObjectAccessor::GetCreature(*me, victorGUID))
victor->HandleEmoteCommand(EMOTE_ONESHOT_QUESTION);
break;
case EVENT_WAVES_EMOTE_2:
@@ -291,7 +291,7 @@ public:
break;
case EVENT_WAVES_TEXT_1:
events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0);
- if (Creature* victor = me->GetCreature(*me, victorGUID))
+ if (Creature* victor = ObjectAccessor::GetCreature(*me, victorGUID))
victor->AI()->Talk(SAY_NEFARIUS_2);
me->HandleEmoteCommand(EMOTE_ONESHOT_TALK);
events.ScheduleEvent(EVENT_TURN_TO_FACING_1, 4000);
@@ -301,7 +301,7 @@ public:
break;
case EVENT_WAVES_TEXT_2:
events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0);
- if (Creature* victor = me->GetCreature(*me, victorGUID))
+ if (Creature* victor = ObjectAccessor::GetCreature(*me, victorGUID))
victor->AI()->Talk(SAY_NEFARIUS_3);
events.ScheduleEvent(EVENT_TURN_TO_FACING_1, 4000);
events.ScheduleEvent(EVENT_WAVE_3, 2000);
@@ -309,7 +309,7 @@ public:
break;
case EVENT_WAVES_TEXT_3:
events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0);
- if (Creature* victor = me->GetCreature(*me, victorGUID))
+ if (Creature* victor = ObjectAccessor::GetCreature(*me, victorGUID))
victor->AI()->Talk(SAY_NEFARIUS_4);
events.ScheduleEvent(EVENT_TURN_TO_FACING_1, 4000);
events.ScheduleEvent(EVENT_WAVE_4, 2000);
@@ -324,7 +324,7 @@ public:
break;
case EVENT_WAVES_TEXT_5:
events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0);
- if (Creature* victor = me->GetCreature(*me, victorGUID))
+ if (Creature* victor = ObjectAccessor::GetCreature(*me, victorGUID))
victor->AI()->Talk(SAY_NEFARIUS_5);
events.ScheduleEvent(EVENT_TURN_TO_FACING_1, 4000);
events.ScheduleEvent(EVENT_WAVE_6, 2000);
@@ -332,26 +332,26 @@ public:
break;
case EVENT_WAVES_COMPLETE_TEXT_1:
events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0);
- if (Creature* victor = me->GetCreature(*me, victorGUID))
+ if (Creature* victor = ObjectAccessor::GetCreature(*me, victorGUID))
victor->AI()->Talk(SAY_NEFARIUS_6);
events.ScheduleEvent(EVENT_TURN_TO_FACING_1, 4000);
events.ScheduleEvent(EVENT_WAVES_COMPLETE_TEXT_2, 13000);
break;
case EVENT_WAVES_COMPLETE_TEXT_2:
- if (Creature* victor = me->GetCreature(*me, victorGUID))
+ if (Creature* victor = ObjectAccessor::GetCreature(*me, victorGUID))
victor->AI()->Talk(SAY_NEFARIUS_7);
Talk(SAY_BLACKHAND_2);
events.ScheduleEvent(EVENT_PATH_REND, 1000);
events.ScheduleEvent(EVENT_WAVES_COMPLETE_TEXT_3, 4000);
break;
case EVENT_WAVES_COMPLETE_TEXT_3:
- if (Creature* victor = me->GetCreature(*me, victorGUID))
+ if (Creature* victor = ObjectAccessor::GetCreature(*me, victorGUID))
victor->AI()->Talk(SAY_NEFARIUS_8);
events.ScheduleEvent(EVENT_PATH_NEFARIUS, 1000);
events.ScheduleEvent(EVENT_PATH_REND, 1000);
break;
case EVENT_PATH_NEFARIUS:
- if (Creature* victor = me->GetCreature(*me, victorGUID))
+ if (Creature* victor = ObjectAccessor::GetCreature(*me, victorGUID))
victor->GetMotionMaster()->MovePath(NEFARIUS_PATH_1, true);
break;
case EVENT_PATH_REND:
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp
index b30973a64ae..8d4a84197b1 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp
@@ -167,7 +167,7 @@ public:
{
if (InstanceScript* instance = go->GetInstanceScript())
if (instance->GetData(DATA_EGG_EVENT) != DONE)
- if (Creature* razor = Unit::GetCreature(*go, instance->GetData64(DATA_RAZORGORE_THE_UNTAMED)))
+ if (Creature* razor = ObjectAccessor::GetCreature(*go, instance->GetData64(DATA_RAZORGORE_THE_UNTAMED)))
{
razor->Attack(player, true);
player->CastSpell(razor, SPELL_MINDCONTROL);
@@ -183,7 +183,7 @@ class spell_egg_event : public SpellScriptLoader
class spell_egg_eventSpellScript : public SpellScript
{
- PrepareSpellScript(spell_egg_eventSpellScript)
+ PrepareSpellScript(spell_egg_eventSpellScript);
void HandleOnHit()
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp
index c00029bea50..bbe70947901 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp
@@ -146,8 +146,8 @@ public:
break;
case EVENT_SPEECH_4:
me->setFaction(103);
- if (PlayerGUID && Unit::GetUnit(*me, PlayerGUID))
- AttackStart(Unit::GetUnit(*me, PlayerGUID));;
+ if (PlayerGUID && ObjectAccessor::GetUnit(*me, PlayerGUID))
+ AttackStart(ObjectAccessor::GetUnit(*me, PlayerGUID));;
break;
}
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp
index 048e6149b4b..6eafb41a8fa 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp
@@ -147,7 +147,7 @@ class boss_ragnaros : public CreatureScript
break;
case EVENT_INTRO_4:
Talk(SAY_ARRIVAL5_RAG);
- if (Creature* executus = Unit::GetCreature(*me, instance->GetData64(BOSS_MAJORDOMO_EXECUTUS)))
+ if (Creature* executus = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_MAJORDOMO_EXECUTUS)))
me->Kill(executus);
break;
case EVENT_INTRO_5:
diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp
index 1398f959e46..b171bf014c7 100644
--- a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp
+++ b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp
@@ -198,7 +198,7 @@ public:
if (!SummonList.empty())
for (std::list<uint64>::const_iterator itr = SummonList.begin(); itr != SummonList.end(); ++itr)
{
- if (Creature* summon = Unit::GetCreature(*me, *itr))
+ if (Creature* summon = ObjectAccessor::GetCreature(*me, *itr))
{
if (summon->IsAlive())
summon->DisappearAndDie();
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
index 59a04d6a457..b130ac74be3 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
@@ -101,7 +101,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
Talk(SAY_DEATH);
- if (Unit* midnight = Unit::GetUnit(*me, Midnight))
+ if (Unit* midnight = ObjectAccessor::GetUnit(*me, Midnight))
midnight->Kill(midnight);
}
@@ -149,7 +149,7 @@ public:
{
if (Phase == 2)
{
- if (Unit* unit = Unit::GetUnit(*me, Attumen))
+ if (Unit* unit = ObjectAccessor::GetUnit(*me, Attumen))
Talk(SAY_MIDNIGHT_KILL, unit);
}
}
@@ -172,7 +172,7 @@ public:
}
else if (Phase == 2 && HealthBelowPct(25))
{
- if (Unit* pAttumen = Unit::GetUnit(*me, Attumen))
+ if (Unit* pAttumen = ObjectAccessor::GetUnit(*me, Attumen))
Mount(pAttumen);
}
else if (Phase == 3)
@@ -184,7 +184,7 @@ public:
Mount_Timer = 0;
me->SetVisible(false);
me->GetMotionMaster()->MoveIdle();
- if (Unit* pAttumen = Unit::GetUnit(*me, Attumen))
+ if (Unit* pAttumen = ObjectAccessor::GetUnit(*me, Attumen))
{
pAttumen->SetDisplayId(MOUNTED_DISPLAYID);
pAttumen->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
@@ -242,7 +242,7 @@ void boss_attumen::boss_attumenAI::UpdateAI(uint32 diff)
if (ResetTimer <= diff)
{
ResetTimer = 0;
- Unit* pMidnight = Unit::GetUnit(*me, Midnight);
+ Unit* pMidnight = ObjectAccessor::GetUnit(*me, Midnight);
if (pMidnight)
{
pMidnight->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
@@ -288,7 +288,7 @@ void boss_attumen::boss_attumenAI::UpdateAI(uint32 diff)
std::vector<Unit*> target_list;
for (ThreatContainer::StorageType::const_iterator itr = t_list.begin(); itr != t_list.end(); ++itr)
{
- target = Unit::GetUnit(*me, (*itr)->getUnitGuid());
+ target = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid());
if (target && !target->IsWithinDist(me, ATTACK_DISTANCE, false))
target_list.push_back(target);
target = NULL;
@@ -304,7 +304,7 @@ void boss_attumen::boss_attumenAI::UpdateAI(uint32 diff)
{
if (HealthBelowPct(25))
{
- Creature* pMidnight = Unit::GetCreature(*me, Midnight);
+ Creature* pMidnight = ObjectAccessor::GetCreature(*me, Midnight);
if (pMidnight && pMidnight->GetTypeId() == TYPEID_UNIT)
{
CAST_AI(boss_midnight::boss_midnightAI, (pMidnight->AI()))->Mount(me);
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp
index 5d52cc62f8a..0ca7ee90986 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp
@@ -236,7 +236,7 @@ public:
{
if (AddGUID[i])
{
- Creature* temp = Creature::GetCreature((*me), AddGUID[i]);
+ Creature* temp = ObjectAccessor::GetCreature((*me), AddGUID[i]);
if (temp && temp->IsAlive())
{
temp->AI()->AttackStart(me->GetVictim());
@@ -270,7 +270,7 @@ public:
{
if (AddGUID[i])
{
- Creature* temp = Unit::GetCreature((*me), AddGUID[i]);
+ Creature* temp = ObjectAccessor::GetCreature((*me), AddGUID[i]);
if (temp && temp->IsAlive())
if (!temp->GetVictim())
temp->AI()->AttackStart(me->GetVictim());
@@ -350,7 +350,7 @@ struct boss_moroes_guestAI : public ScriptedAI
void AcquireGUID()
{
- if (Creature* Moroes = Unit::GetCreature(*me, instance->GetData64(DATA_MOROES)))
+ if (Creature* Moroes = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_MOROES)))
for (uint8 i = 0; i < 4; ++i)
if (uint64 GUID = CAST_AI(boss_moroes::boss_moroesAI, Moroes->AI())->AddGUID[i])
GuestGUID[i] = GUID;
@@ -361,7 +361,7 @@ struct boss_moroes_guestAI : public ScriptedAI
uint64 TempGUID = GuestGUID[rand()%4];
if (TempGUID)
{
- Unit* unit = Unit::GetUnit(*me, TempGUID);
+ Unit* unit = ObjectAccessor::GetUnit(*me, TempGUID);
if (unit && unit->IsAlive())
return unit;
}
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp
index 33ea71f81e1..010b7223f97 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp
@@ -158,9 +158,9 @@ public:
{
for (int i=0; i<3; ++i)
{
- if (Creature* portal = Unit::GetCreature(*me, PortalGUID[i]))
+ if (Creature* portal = ObjectAccessor::GetCreature(*me, PortalGUID[i]))
portal->DisappearAndDie();
- if (Creature* portal = Unit::GetCreature(*me, BeamerGUID[i]))
+ if (Creature* portal = ObjectAccessor::GetCreature(*me, BeamerGUID[i]))
portal->DisappearAndDie();
PortalGUID[i] = 0;
BeamTarget[i] = 0;
@@ -170,10 +170,10 @@ public:
void UpdatePortals() // Here we handle the beams' behavior
{
for (int j=0; j<3; ++j) // j = color
- if (Creature* portal = Unit::GetCreature(*me, PortalGUID[j]))
+ if (Creature* portal = ObjectAccessor::GetCreature(*me, PortalGUID[j]))
{
// the one who's been cast upon before
- Unit* current = Unit::GetUnit(*portal, BeamTarget[j]);
+ Unit* current = ObjectAccessor::GetUnit(*portal, BeamTarget[j]);
// temporary store for the best suitable beam reciever
Unit* target = me;
@@ -205,7 +205,7 @@ public:
{
BeamTarget[j] = target->GetGUID();
// remove currently beaming portal
- if (Creature* beamer = Unit::GetCreature(*portal, BeamerGUID[j]))
+ if (Creature* beamer = ObjectAccessor::GetCreature(*portal, BeamerGUID[j]))
{
beamer->CastSpell(target, PortalBeam[j], false);
beamer->DisappearAndDie();
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp
index cf13863f84b..befe72a6403 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp
@@ -146,7 +146,7 @@ public:
void KilledUnit(Unit* who) override
{
- if (Unit* unit = Unit::GetUnit(*me, malchezaar))
+ if (Unit* unit = ObjectAccessor::GetUnit(*me, malchezaar))
if (Creature* creature = unit->ToCreature())
creature->AI()->KilledUnit(who);
}
@@ -273,7 +273,7 @@ public:
{
//Infernal Cleanup
for (std::vector<uint64>::const_iterator itr = infernals.begin(); itr != infernals.end(); ++itr)
- if (Unit* pInfernal = Unit::GetUnit(*me, *itr))
+ if (Unit* pInfernal = ObjectAccessor::GetUnit(*me, *itr))
if (pInfernal->IsAlive())
{
pInfernal->SetVisible(false);
@@ -287,7 +287,7 @@ public:
{
for (uint8 i = 0; i < 2; ++i)
{
- Unit* axe = Unit::GetUnit(*me, axes[i]);
+ Unit* axe = ObjectAccessor::GetUnit(*me, axes[i]);
if (axe && axe->IsAlive())
axe->Kill(axe);
axes[i] = 0;
@@ -316,7 +316,7 @@ public:
ThreatContainer::StorageType::const_iterator itr = t_list.begin();
std::advance(itr, 1);
for (; itr != t_list.end(); ++itr) //store the threat list in a different container
- if (Unit* target = Unit::GetUnit(*me, (*itr)->getUnitGuid()))
+ if (Unit* target = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid()))
if (target->IsAlive() && target->GetTypeId() == TYPEID_PLAYER)
targets.push_back(target);
@@ -340,7 +340,7 @@ public:
{
for (uint8 i = 0; i < 5; ++i)
{
- Unit* target = Unit::GetUnit(*me, enfeeble_targets[i]);
+ Unit* target = ObjectAccessor::GetUnit(*me, enfeeble_targets[i]);
if (target && target->IsAlive())
target->SetHealth(enfeeble_health[i]);
enfeeble_targets[i] = 0;
@@ -480,7 +480,7 @@ public:
{
for (uint8 i = 0; i < 2; ++i)
{
- if (Unit* axe = Unit::GetUnit(*me, axes[i]))
+ if (Unit* axe = ObjectAccessor::GetUnit(*me, axes[i]))
{
if (axe->GetVictim())
DoModifyThreatPercent(axe->GetVictim(), -100);
@@ -583,7 +583,7 @@ public:
void netherspite_infernal::netherspite_infernalAI::Cleanup()
{
- Creature* pMalchezaar = Unit::GetCreature(*me, malchezaar);
+ Creature* pMalchezaar = ObjectAccessor::GetCreature(*me, malchezaar);
if (pMalchezaar && pMalchezaar->IsAlive())
CAST_AI(boss_malchezaar::boss_malchezaarAI, pMalchezaar->AI())->Cleanup(me, point);
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp
index 0a3a697c6a7..9bda41b03a1 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp
@@ -184,7 +184,7 @@ public:
//store the threat list in a different container
for (ThreatContainer::StorageType::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
{
- Unit* target = Unit::GetUnit(*me, (*itr)->getUnitGuid());
+ Unit* target = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid());
//only on alive players
if (target && target->IsAlive() && target->GetTypeId() == TYPEID_PLAYER)
targets.push_back(target);
@@ -450,7 +450,7 @@ public:
if (!FlameWreathTarget[i])
continue;
- Unit* unit = Unit::GetUnit(*me, FlameWreathTarget[i]);
+ Unit* unit = ObjectAccessor::GetUnit(*me, FlameWreathTarget[i]);
if (unit && !unit->IsWithinDist2d(FWTargPosX[i], FWTargPosY[i], 3))
{
unit->CastSpell(unit, 20476, true, 0, 0, me->GetGUID());
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp
index 65c3522ea9a..3b499b649cf 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp
@@ -103,7 +103,7 @@ public:
uint64 TerestianGUID = instance->GetData64(DATA_TERESTIAN);
if (TerestianGUID)
{
- Unit* Terestian = Unit::GetUnit(*me, TerestianGUID);
+ Unit* Terestian = ObjectAccessor::GetUnit(*me, TerestianGUID);
if (Terestian && Terestian->IsAlive())
DoCast(Terestian, SPELL_BROKEN_PACT, true);
}
@@ -158,7 +158,7 @@ public:
{
if (SacrificeGUID)
{
- Unit* Sacrifice = Unit::GetUnit(*me, SacrificeGUID);
+ Unit* Sacrifice = ObjectAccessor::GetUnit(*me, SacrificeGUID);
if (Sacrifice)
Sacrifice->RemoveAurasDueToSpell(SPELL_SACRIFICE);
}
@@ -280,7 +280,7 @@ public:
{
if (PortalGUID[i])
{
- if (Creature* pPortal = Unit::GetCreature(*me, PortalGUID[i]))
+ if (Creature* pPortal = ObjectAccessor::GetCreature(*me, PortalGUID[i]))
{
CAST_AI(npc_fiendish_portal::npc_fiendish_portalAI, pPortal->AI())->DespawnAllImp();
pPortal->DespawnOrUnsummon();
@@ -345,7 +345,7 @@ public:
{
if (PortalGUID[i])
{
- if (Creature* pPortal = Unit::GetCreature((*me), PortalGUID[i]))
+ if (Creature* pPortal = ObjectAccessor::GetCreature((*me), PortalGUID[i]))
pPortal->DespawnOrUnsummon();
PortalGUID[i] = 0;
@@ -396,7 +396,7 @@ public:
if (PortalGUID[0] && PortalGUID[1])
{
- if (Creature* pPortal = Unit::GetCreature(*me, PortalGUID[urand(0, 1)]))
+ if (Creature* pPortal = ObjectAccessor::GetCreature(*me, PortalGUID[urand(0, 1)]))
pPortal->CastSpell(me->GetVictim(), SPELL_SUMMON_FIENDISIMP, false);
SummonTimer = 5000;
}
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
index 870ae370366..c0e6a8d3b90 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
@@ -254,7 +254,7 @@ public:
{
if (DorotheeGUID)
{
- Creature* Dorothee = (Unit::GetCreature((*me), DorotheeGUID));
+ Creature* Dorothee = (ObjectAccessor::GetCreature((*me), DorotheeGUID));
if (Dorothee && Dorothee->IsAlive())
{
CAST_AI(boss_dorothee::boss_dorotheeAI, Dorothee->AI())->TitoDied = true;
@@ -893,7 +893,7 @@ public:
{
IsChasing = false;
- if (Unit* target = Unit::GetUnit(*me, HoodGUID))
+ if (Unit* target = ObjectAccessor::GetUnit(*me, HoodGUID))
{
HoodGUID = 0;
if (DoGetThreat(target))
@@ -1186,7 +1186,7 @@ public:
IsFakingDeath = true;
Phase = PHASE_BOTH;
- if (Creature* Julianne = (Unit::GetCreature((*me), JulianneGUID)))
+ if (Creature* Julianne = (ObjectAccessor::GetCreature((*me), JulianneGUID)))
{
CAST_AI(boss_julianne::boss_julianneAI, Julianne->AI())->RomuloDead = true;
CAST_AI(boss_julianne::boss_julianneAI, Julianne->AI())->ResurrectSelfTimer = 10000;
@@ -1200,7 +1200,7 @@ public:
{
if (JulianneDead)
{
- if (Creature* Julianne = (Unit::GetCreature((*me), JulianneGUID)))
+ if (Creature* Julianne = (ObjectAccessor::GetCreature((*me), JulianneGUID)))
{
Julianne->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
Julianne->GetMotionMaster()->Clear();
@@ -1212,7 +1212,7 @@ public:
return;
}
- if (Creature* Julianne = (Unit::GetCreature((*me), JulianneGUID)))
+ if (Creature* Julianne = (ObjectAccessor::GetCreature((*me), JulianneGUID)))
{
PretendToDie(me);
IsFakingDeath = true;
@@ -1231,7 +1231,7 @@ public:
Talk(SAY_ROMULO_AGGRO);
if (JulianneGUID)
{
- Creature* Julianne = (Unit::GetCreature((*me), JulianneGUID));
+ Creature* Julianne = (ObjectAccessor::GetCreature((*me), JulianneGUID));
if (Julianne && Julianne->GetVictim())
{
me->AddThreat(Julianne->GetVictim(), 1.0f);
@@ -1275,7 +1275,7 @@ public:
{
if (ResurrectTimer <= diff)
{
- Creature* Julianne = (Unit::GetCreature((*me), JulianneGUID));
+ Creature* Julianne = (ObjectAccessor::GetCreature((*me), JulianneGUID));
if (Julianne && CAST_AI(boss_julianne::boss_julianneAI, Julianne->AI())->IsFakingDeath)
{
Talk(SAY_ROMULO_RESURRECT);
@@ -1395,7 +1395,7 @@ void boss_julianne::boss_julianneAI::UpdateAI(uint32 diff)
{
if (ResurrectTimer <= diff)
{
- Creature* Romulo = (Unit::GetCreature((*me), RomuloGUID));
+ Creature* Romulo = (ObjectAccessor::GetCreature((*me), RomuloGUID));
if (Romulo && CAST_AI(boss_romulo::boss_romuloAI, Romulo->AI())->IsFakingDeath)
{
Talk(SAY_JULIANNE_RESURRECT);
@@ -1430,7 +1430,7 @@ void boss_julianne::boss_julianneAI::UpdateAI(uint32 diff)
{
if (urand(0, 1) && SummonedRomulo)
{
- Creature* Romulo = (Unit::GetCreature((*me), RomuloGUID));
+ Creature* Romulo = (ObjectAccessor::GetCreature((*me), RomuloGUID));
if (Romulo && Romulo->IsAlive() && !RomuloDead)
DoCast(Romulo, SPELL_ETERNAL_AFFECTION);
} else DoCast(me, SPELL_ETERNAL_AFFECTION);
@@ -1460,7 +1460,7 @@ void boss_julianne::boss_julianneAI::DamageTaken(Unit* /*done_by*/, uint32 &dama
DoCast(me, SPELL_DRINK_POISON);
IsFakingDeath = true;
- //IS THIS USEFULL? Creature* Julianne = (Unit::GetCreature((*me), JulianneGUID));
+ //IS THIS USEFULL? Creature* Julianne = (ObjectAccessor::GetCreature((*me), JulianneGUID));
return;
}
@@ -1476,7 +1476,7 @@ void boss_julianne::boss_julianneAI::DamageTaken(Unit* /*done_by*/, uint32 &dama
//if this is true then we have to kill romulo too
if (RomuloDead)
{
- if (Creature* Romulo = (Unit::GetCreature((*me), RomuloGUID)))
+ if (Creature* Romulo = (ObjectAccessor::GetCreature((*me), RomuloGUID)))
{
Romulo->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
Romulo->GetMotionMaster()->Clear();
@@ -1490,7 +1490,7 @@ void boss_julianne::boss_julianneAI::DamageTaken(Unit* /*done_by*/, uint32 &dama
}
//if not already returned, then romulo is alive and we can pretend die
- if (Creature* Romulo = (Unit::GetCreature((*me), RomuloGUID)))
+ if (Creature* Romulo = (ObjectAccessor::GetCreature((*me), RomuloGUID)))
{
PretendToDie(me);
IsFakingDeath = true;
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
index 9db4c4b2bfa..976a83a98c2 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
@@ -286,7 +286,7 @@ public:
{
if (TalkCount > 3)
{
- if (Creature* pSpotlight = Unit::GetCreature(*me, m_uiSpotlightGUID))
+ if (Creature* pSpotlight = ObjectAccessor::GetCreature(*me, m_uiSpotlightGUID))
pSpotlight->DespawnOrUnsummon();
SetEscortPaused(false);
@@ -539,7 +539,7 @@ public:
uint32 NextStep(uint32 Step)
{
- Creature* arca = Unit::GetCreature(*me, ArcanagosGUID);
+ Creature* arca = ObjectAccessor::GetCreature(*me, ArcanagosGUID);
Map* map = me->GetMap();
switch (Step)
{
@@ -630,7 +630,7 @@ public:
if (Step >= 7 && Step <= 12)
{
- Unit* arca = Unit::GetUnit(*me, ArcanagosGUID);
+ Unit* arca = ObjectAccessor::GetUnit(*me, ArcanagosGUID);
if (FireArcanagosTimer <= diff)
{
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
index e0c902427c2..3c4b372808b 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
@@ -196,7 +196,7 @@ public:
ThreatContainer::StorageType::const_iterator i = threatlist.begin();
for (i = threatlist.begin(); i != threatlist.end(); ++i)
{
- Unit* unit = Unit::GetUnit(*me, (*i)->getUnitGuid());
+ Unit* unit = ObjectAccessor::GetUnit(*me, (*i)->getUnitGuid());
if (unit && unit->IsAlive())
{
float threat = me->getThreatManager().getThreat(unit);
@@ -214,7 +214,7 @@ public:
ThreatContainer::StorageType::const_iterator i = threatlist.begin();
for (i = threatlist.begin(); i != threatlist.end(); ++i)
{
- Unit* unit = Unit::GetUnit(*me, (*i)->getUnitGuid());
+ Unit* unit = ObjectAccessor::GetUnit(*me, (*i)->getUnitGuid());
if (unit && (unit->GetTypeId() == TYPEID_PLAYER))
unit->CastSpell(unit, SPELL_TELEPORT_CENTER, true);
}
@@ -227,7 +227,7 @@ public:
ThreatContainer::StorageType::const_iterator i = threatlist.begin();
for (i = threatlist.begin(); i != threatlist.end(); ++i)
{
- Unit* unit = Unit::GetUnit(*me, (*i)->getUnitGuid());
+ Unit* unit = ObjectAccessor::GetUnit(*me, (*i)->getUnitGuid());
if (unit && (unit->GetTypeId() == TYPEID_PLAYER))
// Knockback into the air
unit->CastSpell(unit, SPELL_GRAVITY_LAPSE_DOT, true, 0, 0, me->GetGUID());
@@ -240,7 +240,7 @@ public:
ThreatContainer::StorageType::const_iterator i = threatlist.begin();
for (i = threatlist.begin(); i != threatlist.end(); ++i)
{
- Unit* unit = Unit::GetUnit(*me, (*i)->getUnitGuid());
+ Unit* unit = ObjectAccessor::GetUnit(*me, (*i)->getUnitGuid());
if (unit && (unit->GetTypeId() == TYPEID_PLAYER))
{
// Also needs an exception in spell system.
@@ -260,7 +260,7 @@ public:
ThreatContainer::StorageType::const_iterator i = threatlist.begin();
for (i = threatlist.begin(); i != threatlist.end(); ++i)
{
- Unit* unit = Unit::GetUnit(*me, (*i)->getUnitGuid());
+ Unit* unit = ObjectAccessor::GetUnit(*me, (*i)->getUnitGuid());
if (unit && (unit->GetTypeId() == TYPEID_PLAYER))
{
unit->RemoveAurasDueToSpell(SPELL_GRAVITY_LAPSE_FLY);
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp
index 046db7fc654..8dc8ff799ba 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp
@@ -162,7 +162,7 @@ public:
for (uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i)
{
- if (Unit* pAdd = Unit::GetUnit(*me, m_auiLackeyGUID[i]))
+ if (Unit* pAdd = ObjectAccessor::GetUnit(*me, m_auiLackeyGUID[i]))
{
if (!pAdd->GetVictim())
{
@@ -210,7 +210,7 @@ public:
{
for (std::vector<uint32>::const_iterator itr = LackeyEntryList.begin(); itr != LackeyEntryList.end(); ++itr)
{
- Unit* pAdd = Unit::GetUnit(*me, m_auiLackeyGUID[j]);
+ Unit* pAdd = ObjectAccessor::GetUnit(*me, m_auiLackeyGUID[j]);
//object already removed, not exist
if (!pAdd)
@@ -271,7 +271,7 @@ public:
Unit* target = me;
for (uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i)
{
- if (Unit* pAdd = Unit::GetUnit(*me, m_auiLackeyGUID[i]))
+ if (Unit* pAdd = ObjectAccessor::GetUnit(*me, m_auiLackeyGUID[i]))
{
if (pAdd->IsAlive() && pAdd->GetHealth() < health)
target = pAdd;
@@ -287,7 +287,7 @@ public:
Unit* target = me;
if (urand(0, 1))
- if (Unit* pAdd = Unit::GetUnit(*me, m_auiLackeyGUID[rand()%MAX_ACTIVE_LACKEY]))
+ if (Unit* pAdd = ObjectAccessor::GetUnit(*me, m_auiLackeyGUID[rand()%MAX_ACTIVE_LACKEY]))
if (pAdd->IsAlive())
target = pAdd;
@@ -300,7 +300,7 @@ public:
Unit* target = me;
if (urand(0, 1))
- if (Unit* pAdd = Unit::GetUnit(*me, m_auiLackeyGUID[rand()%MAX_ACTIVE_LACKEY]))
+ if (Unit* pAdd = ObjectAccessor::GetUnit(*me, m_auiLackeyGUID[rand()%MAX_ACTIVE_LACKEY]))
if (pAdd->IsAlive() && !pAdd->HasAura(SPELL_SHIELD))
target = pAdd;
@@ -319,7 +319,7 @@ public:
if (urand(0, 1))
target = me;
else
- if (Unit* pAdd = Unit::GetUnit(*me, m_auiLackeyGUID[rand()%MAX_ACTIVE_LACKEY]))
+ if (Unit* pAdd = ObjectAccessor::GetUnit(*me, m_auiLackeyGUID[rand()%MAX_ACTIVE_LACKEY]))
if (pAdd->IsAlive())
target = pAdd;
}
@@ -390,7 +390,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
for (uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i)
{
- if (Unit* pAdd = Unit::GetUnit(*me, m_auiLackeyGUIDs[i]))
+ if (Unit* pAdd = ObjectAccessor::GetUnit(*me, m_auiLackeyGUIDs[i]))
{
if (!pAdd->GetVictim() && pAdd != me)
{
@@ -400,7 +400,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
}
}
- if (Creature* pDelrissa = Unit::GetCreature(*me, instance->GetData64(DATA_DELRISSA)))
+ if (Creature* pDelrissa = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_DELRISSA)))
{
if (pDelrissa->IsAlive() && !pDelrissa->GetVictim())
{
@@ -412,7 +412,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
void JustDied(Unit* /*killer*/) override
{
- Creature* pDelrissa = Unit::GetCreature(*me, instance->GetData64(DATA_DELRISSA));
+ Creature* pDelrissa = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_DELRISSA));
uint32 uiLackeyDeathCount = instance->GetData(DATA_DELRISSA_DEATH_COUNT);
if (!pDelrissa)
@@ -441,13 +441,13 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
void KilledUnit(Unit* victim) override
{
- if (Creature* Delrissa = Unit::GetCreature(*me, instance->GetData64(DATA_DELRISSA)))
+ if (Creature* Delrissa = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_DELRISSA)))
Delrissa->AI()->KilledUnit(victim);
}
void AcquireGUIDs()
{
- if (Creature* Delrissa = (Unit::GetCreature(*me, instance->GetData64(DATA_DELRISSA))))
+ if (Creature* Delrissa = (ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_DELRISSA))))
{
for (uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i)
m_auiLackeyGUIDs[i] = CAST_AI(boss_priestess_delrissa::boss_priestess_delrissaAI, Delrissa->AI())->m_auiLackeyGUID[i];
@@ -832,7 +832,7 @@ public:
ThreatContainer::StorageType const &t_list = me->getThreatManager().getThreatList();
for (ThreatContainer::StorageType::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
{
- if (Unit* target = Unit::GetUnit(*me, (*itr)->getUnitGuid()))
+ if (Unit* target = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid()))
{
//if in melee range
if (target->IsWithinDistInMap(me, 5))
@@ -918,7 +918,7 @@ public:
ThreatContainer::StorageType const &t_list = me->getThreatManager().getThreatList();
for (ThreatContainer::StorageType::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
{
- if (Unit* target = Unit::GetUnit(*me, (*itr)->getUnitGuid()))
+ if (Unit* target = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid()))
{
//if in melee range
if (target->IsWithinDistInMap(me, ATTACK_DISTANCE))
@@ -1022,7 +1022,7 @@ public:
Wing_Clip_Timer = 4000;
Freezing_Trap_Timer = 15000;
- Unit* pPet = Unit::GetUnit(*me, m_uiPetGUID);
+ Unit* pPet = ObjectAccessor::GetUnit(*me, m_uiPetGUID);
if (!pPet)
me->SummonCreature(NPC_SLIVER, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0);
@@ -1171,7 +1171,7 @@ public:
// uint64 guid = (*itr)->guid;
// if (guid)
// {
- // Unit* pAdd = Unit::GetUnit(*me, (*itr)->guid);
+ // Unit* pAdd = ObjectAccessor::GetUnit(*me, (*itr)->guid);
// if (pAdd && pAdd->IsAlive())
// {
DoCast(me, SPELL_LESSER_HEALING_WAVE);
@@ -1256,7 +1256,7 @@ public:
{
for (uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i)
{
- if (Unit* pAdd = Unit::GetUnit(*me, m_auiLackeyGUIDs[i]))
+ if (Unit* pAdd = ObjectAccessor::GetUnit(*me, m_auiLackeyGUIDs[i]))
{
if (pAdd->IsPolymorphed())
{
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
index 74e9321d08c..d77f5db9cea 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
@@ -107,8 +107,8 @@ public:
//for (uint8 i = 0; i < CRYSTALS_NUMBER; ++i)
for (std::list<uint64>::const_iterator itr = Crystals.begin(); itr != Crystals.end(); ++itr)
{
- //Unit* unit = Unit::GetUnit(*me, FelCrystals[i]);
- if (Creature* creature = Unit::GetCreature(*me, *itr))
+ //Unit* unit = ObjectAccessor::GetUnit(*me, FelCrystals[i]);
+ if (Creature* creature = ObjectAccessor::GetCreature(*me, *itr))
{
if (!creature->IsAlive())
creature->Respawn(); // Let the core handle setting death state, etc.
@@ -148,8 +148,8 @@ public:
for (std::list<uint64>::const_iterator itr = Crystals.begin(); itr != Crystals.end(); ++itr)
{
pCrystal = NULL;
- //pCrystal = Unit::GetUnit(*me, FelCrystals[i]);
- pCrystal = Unit::GetUnit(*me, *itr);
+ //pCrystal = ObjectAccessor::GetUnit(*me, FelCrystals[i]);
+ pCrystal = ObjectAccessor::GetUnit(*me, *itr);
if (pCrystal && pCrystal->IsAlive())
{
// select nearest
@@ -184,8 +184,8 @@ public:
//for (uint8 i = 0; i < CRYSTALS_NUMBER; ++i)
for (std::list<uint64>::const_iterator itr = Crystals.begin(); itr != Crystals.end(); ++itr)
{
- //Creature* pCrystal = (Unit::GetCreature(*me, FelCrystals[i]));
- Creature* pCrystal = Unit::GetCreature(*me, *itr);
+ //Creature* pCrystal = (ObjectAccessor::GetCreature(*me, FelCrystals[i]));
+ Creature* pCrystal = ObjectAccessor::GetCreature(*me, *itr);
if (pCrystal && pCrystal->IsAlive())
pCrystal->Kill(pCrystal);
}
@@ -206,7 +206,7 @@ public:
{
if (type == POINT_MOTION_TYPE && id == 1)
{
- Unit* CrystalChosen = Unit::GetUnit(*me, CrystalGUID);
+ Unit* CrystalChosen = ObjectAccessor::GetUnit(*me, CrystalGUID);
if (CrystalChosen && CrystalChosen->IsAlive())
{
// Make the crystal attackable
@@ -292,7 +292,7 @@ public:
Talk(SAY_EMPOWERED);
- Unit* CrystalChosen = Unit::GetUnit(*me, CrystalGUID);
+ Unit* CrystalChosen = ObjectAccessor::GetUnit(*me, CrystalGUID);
if (CrystalChosen && CrystalChosen->IsAlive())
// Use Deal Damage to kill it, not setDeathState.
CrystalChosen->Kill(CrystalChosen);
@@ -335,7 +335,7 @@ public:
{
if (InstanceScript* instance = me->GetInstanceScript())
{
- Creature* Selin = (Unit::GetCreature(*me, instance->GetData64(DATA_SELIN)));
+ Creature* Selin = (ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_SELIN)));
if (Selin && Selin->IsAlive())
{
if (CAST_AI(boss_selin_fireheart::boss_selin_fireheartAI, Selin->AI())->CrystalGUID == me->GetGUID())
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
index 5602a2a50e0..46c566f62bd 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
@@ -314,7 +314,7 @@ public:
{
if (Creature* anchor = go->FindNearestCreature(29521, 15))
if (uint64 prisonerGUID = anchor->AI()->GetGUID())
- if (Creature* prisoner = Creature::GetCreature(*player, prisonerGUID))
+ if (Creature* prisoner = ObjectAccessor::GetCreature(*player, prisonerGUID))
CAST_AI(npc_unworthy_initiate::npc_unworthy_initiateAI, prisoner->AI())->EventStart(anchor, player);
return false;
@@ -467,7 +467,7 @@ public:
{
me->setFaction(FACTION_HOSTILE);
- if (Unit* unit = Unit::GetUnit(*me, m_uiDuelerGUID))
+ if (Unit* unit = ObjectAccessor::GetUnit(*me, m_uiDuelerGUID))
AttackStart(unit);
}
else
@@ -1047,14 +1047,14 @@ class npc_scarlet_miner : public CreatureScript
{
if (IntroPhase == 1)
{
- if (Creature* car = Unit::GetCreature(*me, carGUID))
+ if (Creature* car = ObjectAccessor::GetCreature(*me, carGUID))
DoCast(car, SPELL_CART_DRAG);
IntroTimer = 800;
IntroPhase = 2;
}
else
{
- if (Creature* car = Unit::GetCreature(*me, carGUID))
+ if (Creature* car = ObjectAccessor::GetCreature(*me, carGUID))
car->AI()->DoAction(0);
IntroPhase = 0;
}
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
index 88c30efdf71..09377f20bed 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
@@ -307,7 +307,7 @@ public:
break;
case 4:
{
- Creature* temp = Unit::GetCreature(*me, valrothGUID);
+ Creature* temp = ObjectAccessor::GetCreature(*me, valrothGUID);
if (!temp || !temp->IsAlive())
{
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
index 8d5e10679ec..40773c87b68 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
@@ -400,15 +400,15 @@ public:
//UpdateWorldState(me->GetMap(), WORLD_STATE_COUNTDOWN, 0);
UpdateWorldState(me->GetMap(), WORLD_STATE_EVENT_BEGIN, 0);
- if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiTirionGUID))
temp->setDeathState(JUST_DIED);
- if (Creature* temp = Unit::GetCreature(*me, uiKorfaxGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiKorfaxGUID))
temp->setDeathState(JUST_DIED);
- if (Creature* temp = Unit::GetCreature(*me, uiMaxwellGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiMaxwellGUID))
temp->setDeathState(JUST_DIED);
- if (Creature* temp = Unit::GetCreature(*me, uiEligorGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiEligorGUID))
temp->setDeathState(JUST_DIED);
- if (Creature* temp = Unit::GetCreature(*me, uiRayneGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiRayneGUID))
temp->setDeathState(JUST_DIED);
uiTirionGUID = 0;
@@ -419,24 +419,24 @@ public:
for (uint8 i = 0; i < ENCOUNTER_DEFENDER_NUMBER; ++i)
{
- if (Creature* temp = Unit::GetCreature(*me, uiDefenderGUID[i]))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiDefenderGUID[i]))
temp->setDeathState(JUST_DIED);
uiDefenderGUID[i] = 0;
}
for (uint8 i = 0; i < ENCOUNTER_EARTHSHATTER_NUMBER; ++i)
{
- if (Creature* temp = Unit::GetCreature(*me, uiEarthshatterGUID[i]))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiEarthshatterGUID[i]))
temp->setDeathState(JUST_DIED);
uiEarthshatterGUID[i] = 0;
}
- if (Creature* temp = Unit::GetCreature(*me, uiKoltiraGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiKoltiraGUID))
temp->Respawn();
- if (Creature* temp = Unit::GetCreature(*me, uiOrbazGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiOrbazGUID))
temp->Respawn();
- if (Creature* temp = Unit::GetCreature(*me, uiThassarianGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiThassarianGUID))
temp->Respawn();
- if (Creature* temp = Unit::GetCreature(*me, uiLichKingGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiLichKingGUID))
temp->Respawn();
uiKoltiraGUID = 0;
@@ -445,25 +445,25 @@ public:
uiLichKingGUID = 0;
for (uint8 i = 0; i < ENCOUNTER_ABOMINATION_NUMBER; ++i)
{
- if (Creature* temp = Unit::GetCreature(*me, uiAbominationGUID[i]))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiAbominationGUID[i]))
temp->setDeathState(JUST_DIED);
uiAbominationGUID[i] = 0;
}
for (uint8 i = 0; i < ENCOUNTER_BEHEMOTH_NUMBER; ++i)
{
- if (Creature* temp = Unit::GetCreature(*me, uiBehemothGUID[i]))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiBehemothGUID[i]))
temp->setDeathState(JUST_DIED);
uiBehemothGUID[i] = 0;
}
for (uint8 i = 0; i < ENCOUNTER_GHOUL_NUMBER; ++i)
{
- if (Creature* temp = Unit::GetCreature(*me, uiGhoulGUID[i]))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiGhoulGUID[i]))
temp->setDeathState(JUST_DIED);
uiGhoulGUID[i] = 0;
}
for (uint8 i = 0; i < ENCOUNTER_WARRIOR_NUMBER; ++i)
{
- if (Creature* temp = Unit::GetCreature(*me, uiWarriorGUID[i]))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiWarriorGUID[i]))
temp->setDeathState(JUST_DIED);
uiWarriorGUID[i] = 0;
}
@@ -514,9 +514,9 @@ public:
case 1:
SetHoldState(true);
SpawnNPC();
- if (Creature* temp = Unit::GetCreature(*me, uiKorfaxGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiKorfaxGUID))
temp->AI()->Talk(SAY_LIGHT_OF_DAWN07);
- if (Creature* temp = Unit::GetCreature(*me, uiMaxwellGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiMaxwellGUID))
temp->AI()->Talk(SAY_LIGHT_OF_DAWN08);
for (uint8 i = 0; i < ENCOUNTER_GHOUL_NUMBER; ++i)
@@ -534,9 +534,9 @@ public:
me->Dismount();
me->CastSpell(me, SPELL_THE_MIGHT_OF_MOGRAINE, true); // need to fix, on player only
- if (Creature* temp = Unit::GetCreature(*me, uiKoltiraGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiKoltiraGUID))
temp->Dismount();
- if (Creature* temp = Unit::GetCreature(*me, uiThassarianGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiThassarianGUID))
temp->Dismount();
bIsBattle = true;
@@ -547,37 +547,37 @@ public:
break;
case 3:
{
- //Unit* pTirion = Unit::GetCreature(*me, uiTirionGUID);
+ //Unit* pTirion = ObjectAccessor::GetCreature(*me, uiTirionGUID);
Talk(EMOTE_LIGHT_OF_DAWN05);
if (me->HasAura(SPELL_THE_LIGHT_OF_DAWN, 0))
me->RemoveAurasDueToSpell(SPELL_THE_LIGHT_OF_DAWN);
- if (Creature* temp = Unit::GetCreature(*me, uiKoltiraGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiKoltiraGUID))
{
if (temp->HasAura(SPELL_THE_LIGHT_OF_DAWN, 0))
temp->RemoveAurasDueToSpell(SPELL_THE_LIGHT_OF_DAWN);
temp->SetWalk(true);
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[19].x, LightofDawnLoc[19].y, LightofDawnLoc[19].z);
}
- if (Creature* temp = Unit::GetCreature(*me, uiThassarianGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiThassarianGUID))
{
if (temp->HasAura(SPELL_THE_LIGHT_OF_DAWN, 0))
temp->RemoveAurasDueToSpell(SPELL_THE_LIGHT_OF_DAWN);
temp->SetWalk(true);
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[21].x, LightofDawnLoc[21].y, LightofDawnLoc[21].z);
}
- if (Creature* temp = Unit::GetCreature(*me, uiKorfaxGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiKorfaxGUID))
{
temp->SetWalk(true);
temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY2H);
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[10].x, LightofDawnLoc[10].y, LightofDawnLoc[10].z);
}
- if (Creature* temp = Unit::GetCreature(*me, uiMaxwellGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiMaxwellGUID))
{
temp->SetWalk(true);
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[13].x, LightofDawnLoc[13].y, LightofDawnLoc[13].z);
}
- if (Creature* temp = Unit::GetCreature(*me, uiEligorGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiEligorGUID))
{
temp->SetWalk(true);
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[16].x, LightofDawnLoc[16].y, LightofDawnLoc[16].z);
@@ -589,9 +589,9 @@ public:
Talk(SAY_LIGHT_OF_DAWN27);
me->SetStandState(UNIT_STAND_STATE_KNEEL);
- if (Creature* temp = Unit::GetCreature(*me, uiKoltiraGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiKoltiraGUID))
temp->SetStandState(UNIT_STAND_STATE_KNEEL);
- if (Creature* temp = Unit::GetCreature(*me, uiThassarianGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiThassarianGUID))
temp->SetStandState(UNIT_STAND_STATE_KNEEL);
SetHoldState(true);
break;
@@ -610,7 +610,7 @@ public:
break;
case 8:
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, uint32(EQUIP_UNEQUIP));
- if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiTirionGUID))
me->CastSpell(temp, SPELL_ASHBRINGER, true);
Talk(EMOTE_LIGHT_OF_DAWN14);
SetHoldState(true);
@@ -743,51 +743,51 @@ public:
case 9: // charge begins
SetHoldState(false);
- if (Creature* temp = Unit::GetCreature(*me, uiKoltiraGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiKoltiraGUID))
{
temp->SetWalk(false);
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z);
}
- if (Creature* temp = Unit::GetCreature(*me, uiOrbazGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiOrbazGUID))
{
temp->SetWalk(false);
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z);
}
- if (Creature* temp = Unit::GetCreature(*me, uiThassarianGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiThassarianGUID))
{
temp->SetWalk(false);
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z);
}
for (uint8 i = 0; i < ENCOUNTER_ABOMINATION_NUMBER; ++i)
- if (Creature* temp = Unit::GetCreature(*me, uiAbominationGUID[i]))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiAbominationGUID[i]))
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z);
for (uint8 i = 0; i < ENCOUNTER_BEHEMOTH_NUMBER; ++i)
- if (Creature* temp = Unit::GetCreature(*me, uiBehemothGUID[i]))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiBehemothGUID[i]))
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z);
for (uint8 i = 0; i < ENCOUNTER_GHOUL_NUMBER; ++i)
- if (Creature* temp = Unit::GetCreature(*me, uiGhoulGUID[i]))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiGhoulGUID[i]))
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z);
for (uint8 i = 0; i < ENCOUNTER_WARRIOR_NUMBER; ++i)
- if (Creature* temp = Unit::GetCreature(*me, uiWarriorGUID[i]))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiWarriorGUID[i]))
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z);
JumpToNextStep(5000);
break;
// ******* After battle *****************************************************************
case 11: // Tirion starts to speak
- if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiTirionGUID))
temp->AI()->Talk(SAY_LIGHT_OF_DAWN28);
JumpToNextStep(21000);
break;
case 12:
- if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiTirionGUID))
temp->AI()->Talk(SAY_LIGHT_OF_DAWN29);
JumpToNextStep(13000);
break;
case 13:
- if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiTirionGUID))
temp->AI()->Talk(SAY_LIGHT_OF_DAWN30);
JumpToNextStep(13000);
break;
@@ -810,7 +810,7 @@ public:
break;
case 16: // Alexandros out
- if (Creature* temp = Unit::GetCreature(*me, uiAlexandrosGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiAlexandrosGUID))
{
temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[23].x, LightofDawnLoc[23].y, LightofDawnLoc[23].z);
@@ -837,7 +837,7 @@ public:
break;
case 19: // runs to father
- if (Creature* temp = Unit::GetCreature(*me, uiDarionGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiDarionGUID))
{
temp->AI()->Talk(EMOTE_LIGHT_OF_DAWN07);
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[25].x, LightofDawnLoc[25].y, LightofDawnLoc[25].z);
@@ -846,59 +846,59 @@ public:
break;
case 20:
- if (Creature* temp = Unit::GetCreature(*me, uiDarionGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiDarionGUID))
temp->AI()->Talk(SAY_LIGHT_OF_DAWN36);
JumpToNextStep(4000);
break;
case 21:
- if (Creature* temp = Unit::GetCreature(*me, uiDarionGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiDarionGUID))
temp->AI()->Talk(EMOTE_LIGHT_OF_DAWN08);
JumpToNextStep(4000);
break;
case 22:
- if (Creature* temp = Unit::GetCreature(*me, uiAlexandrosGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiAlexandrosGUID))
temp->AI()->Talk(SAY_LIGHT_OF_DAWN37);
JumpToNextStep(8000);
break;
case 23:
- if (Creature* temp = Unit::GetCreature(*me, uiDarionGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiDarionGUID))
temp->AI()->Talk(SAY_LIGHT_OF_DAWN38);
JumpToNextStep(8000);
break;
case 24:
- if (Creature* temp = Unit::GetCreature(*me, uiAlexandrosGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiAlexandrosGUID))
temp->AI()->Talk(SAY_LIGHT_OF_DAWN39);
- if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID)) // Tirion moves forward here
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiTirionGUID)) // Tirion moves forward here
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[1].x, LightofDawnLoc[1].y, LightofDawnLoc[1].z);
JumpToNextStep(15000);
break;
case 25:
- if (Creature* temp = Unit::GetCreature(*me, uiDarionGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiDarionGUID))
temp->AI()->Talk(SAY_LIGHT_OF_DAWN40);
JumpToNextStep(11000);
break;
case 26:
- if (Creature* temp = Unit::GetCreature(*me, uiAlexandrosGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiAlexandrosGUID))
temp->AI()->Talk(SAY_LIGHT_OF_DAWN41);
JumpToNextStep(5000);
break;
case 27:
- if (Creature* temp = Unit::GetCreature(*me, uiDarionGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiDarionGUID))
temp->setDeathState(JUST_DIED);
JumpToNextStep(24000);
break;
case 28:
- if (Creature* temp = Unit::GetCreature(*me, uiAlexandrosGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiAlexandrosGUID))
temp->AI()->Talk(SAY_LIGHT_OF_DAWN42);
JumpToNextStep(6000);
break;
@@ -908,19 +908,19 @@ public:
{
temp->AI()->Talk(SAY_LIGHT_OF_DAWN43);
uiLichKingGUID = temp->GetGUID();
- if (Unit* pAlex = Unit::GetCreature(*me, uiAlexandrosGUID))
+ if (Unit* pAlex = ObjectAccessor::GetCreature(*me, uiAlexandrosGUID))
temp->CastSpell(pAlex, SPELL_SOUL_FEAST_ALEX, false);
}
JumpToNextStep(2000);
break;
case 30:
- if (Creature* temp = Unit::GetCreature(*me, uiAlexandrosGUID)) // just hide him
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiAlexandrosGUID)) // just hide him
{
temp->AI()->Talk(EMOTE_LIGHT_OF_DAWN09);
temp->SetVisible(false);
}
- if (Creature* temp = Unit::GetCreature(*me, uiLichKingGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiLichKingGUID))
{
temp->InterruptNonMeleeSpells(false);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN45);
@@ -936,13 +936,13 @@ public:
break;
case 32:
- if (Creature* temp = Unit::GetCreature(*me, uiLichKingGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiLichKingGUID))
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[27].x, LightofDawnLoc[27].y, LightofDawnLoc[27].z);
JumpToNextStep(6000);
break;
case 33: // Darion supports to jump to lich king here
- if (Unit::GetCreature(*me, uiLichKingGUID))
+ if (ObjectAccessor::GetCreature(*me, uiLichKingGUID))
DoCast(me, SPELL_MOGRAINE_CHARGE); // jumping charge
// doesn't make it looks well, so workarounds, Darion charges, looks better
me->SetSpeed(MOVE_RUN, 3.0f);
@@ -952,7 +952,7 @@ public:
break;
case 35: // Lich king counterattacks
- if (Creature* temp = Unit::GetCreature(*me, uiLichKingGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiLichKingGUID))
{
temp->HandleEmoteCommand(EMOTE_ONESHOT_KICK);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN46);
@@ -969,29 +969,29 @@ public:
break;
case 38:
- if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiTirionGUID))
temp->AI()->Talk(SAY_LIGHT_OF_DAWN47);
JumpToNextStep(8000);
break;
case 39:
- if (Creature* temp = Unit::GetCreature(*me, uiLichKingGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiLichKingGUID))
temp->AI()->Talk(SAY_LIGHT_OF_DAWN48);
JumpToNextStep(15000);
break;
case 40:
- if (Creature* temp = Unit::GetCreature(*me, uiLichKingGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiLichKingGUID))
temp->AI()->Talk(SAY_LIGHT_OF_DAWN49);
JumpToNextStep(17000);
break;
case 41: // Lich king - Apocalypse
- if (Creature* temp = Unit::GetCreature(*me, uiLichKingGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiLichKingGUID))
{
temp->AI()->Talk(EMOTE_LIGHT_OF_DAWN11);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN51);
- if (Creature* pTirion = Unit::GetCreature(*me, uiTirionGUID))
+ if (Creature* pTirion = ObjectAccessor::GetCreature(*me, uiTirionGUID))
{
pTirion->SetStandState(UNIT_STAND_STATE_KNEEL);
//temp->CastSpell(pTirion, SPELL_APOCALYPSE, false); // not working
@@ -1007,7 +1007,7 @@ public:
float fLichPositionX = 0,
fLichPositionY = 0,
fLichPositionZ = 0;
- if (Creature* temp = Unit::GetCreature(*me, uiLichKingGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiLichKingGUID))
{
fLichPositionX = temp->GetPositionX();
fLichPositionY = temp->GetPositionY();
@@ -1032,7 +1032,7 @@ public:
temp->GetMotionMaster()->MovePoint(0, fLichPositionX, fLichPositionY, fLichPositionZ);
uiEarthshatterGUID[0] = temp->GetGUID();
}
- if (Creature* temp = Unit::GetCreature(*me, uiMaxwellGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiMaxwellGUID))
{
temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_ATTACK_UNARMED);
temp->SetWalk(false);
@@ -1040,7 +1040,7 @@ public:
temp->GetMotionMaster()->MovePoint(0, fLichPositionX, fLichPositionY, fLichPositionZ);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN50);
}
- if (Creature* temp = Unit::GetCreature(*me, uiKorfaxGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiKorfaxGUID))
{
temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_ATTACK_UNARMED);
temp->SetWalk(false);
@@ -1048,7 +1048,7 @@ public:
temp->HandleEmoteCommand(EMOTE_STATE_ATTACK_UNARMED);
temp->GetMotionMaster()->MovePoint(0, fLichPositionX, fLichPositionY, fLichPositionZ);
}
- if (Creature* temp = Unit::GetCreature(*me, uiEligorGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiEligorGUID))
{
temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_ATTACK_UNARMED);
temp->SetWalk(false);
@@ -1060,37 +1060,37 @@ public:
break;
case 43: // They all got kicked
- if (Creature* temp = Unit::GetCreature(*me, uiLichKingGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiLichKingGUID))
temp->AI()->Talk(EMOTE_LIGHT_OF_DAWN13);
- if (Creature* temp = Unit::GetCreature(*me, uiMaxwellGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiMaxwellGUID))
{
temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
temp->SetSpeed(MOVE_RUN, 6.0f);
temp->SetStandState(UNIT_STAND_STATE_DEAD);
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[14].x, LightofDawnLoc[14].y, LightofDawnLoc[14].z);
}
- if (Creature* temp = Unit::GetCreature(*me, uiKorfaxGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiKorfaxGUID))
{
temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
temp->SetSpeed(MOVE_RUN, 6.0f);
temp->SetStandState(UNIT_STAND_STATE_DEAD);
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[11].x, LightofDawnLoc[11].y, LightofDawnLoc[11].z);
}
- if (Creature* temp = Unit::GetCreature(*me, uiEligorGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiEligorGUID))
{
temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
temp->SetSpeed(MOVE_RUN, 6.0f);
temp->SetStandState(UNIT_STAND_STATE_DEAD);
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[17].x, LightofDawnLoc[17].y, LightofDawnLoc[17].z);
}
- if (Creature* temp = Unit::GetCreature(*me, uiDefenderGUID[0]))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiDefenderGUID[0]))
{
temp->SetSpeed(MOVE_RUN, 6.0f);
temp->SetStandState(UNIT_STAND_STATE_DEAD);
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x+rand()%10, LightofDawnLoc[0].y+rand()%10, LightofDawnLoc[0].z);
}
- if (Creature* temp = Unit::GetCreature(*me, uiEarthshatterGUID[0]))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiEarthshatterGUID[0]))
{
temp->SetSpeed(MOVE_RUN, 6.0f);
temp->SetStandState(UNIT_STAND_STATE_DEAD);
@@ -1100,11 +1100,11 @@ public:
break;
case 44: // make them stand up
- if (Creature* temp = Unit::GetCreature(*me, uiMaxwellGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiMaxwellGUID))
temp->SetStandState(UNIT_STAND_STATE_STAND);
- if (Creature* temp = Unit::GetCreature(*me, uiKorfaxGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiKorfaxGUID))
temp->SetStandState(UNIT_STAND_STATE_STAND);
- if (Creature* temp = Unit::GetCreature(*me, uiEligorGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiEligorGUID))
temp->SetStandState(UNIT_STAND_STATE_STAND);
JumpToNextStep(1000);
break;
@@ -1126,7 +1126,7 @@ public:
case 47: // Ashbringer rebirth
me->SetStandState(UNIT_STAND_STATE_KNEEL);
Talk(EMOTE_LIGHT_OF_DAWN15);
- if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiTirionGUID))
{
temp->SetStandState(UNIT_STAND_STATE_STAND);
temp->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, uint32(EQUIP_HIGHLORD_TIRION_FORDRING));
@@ -1139,38 +1139,38 @@ public:
//if (GameObject* go = me->GetMap()->GetGameObject(uiDawnofLightGUID))
// go->SetPhaseMask(128, true);
me->SummonGameObject(GO_LIGHT_OF_DAWN, 2283.896f, -5287.914f, 83.066f, 0, 0, 0, 0, 0, 30000);
- if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiTirionGUID))
{
if (temp->HasAura(SPELL_REBIRTH_OF_THE_ASHBRINGER, 0))
temp->RemoveAurasDueToSpell(SPELL_REBIRTH_OF_THE_ASHBRINGER);
temp->CastSpell(temp, 41542, false); // workarounds, light expoded, makes it cool
temp->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
}
- if (Creature* temp = Unit::GetCreature(*me, uiLichKingGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiLichKingGUID))
temp->InterruptNonMeleeSpells(false);
JumpToNextStep(2500);
break;
case 49:
- if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiTirionGUID))
temp->AI()->Talk(SAY_LIGHT_OF_DAWN54);
JumpToNextStep(4000);
break;
case 50:
- if (Creature* temp = Unit::GetCreature(*me, uiLichKingGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiLichKingGUID))
temp->AI()->Talk(SAY_LIGHT_OF_DAWN55);
JumpToNextStep(5000);
break;
case 51:
- if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiTirionGUID))
temp->AI()->Talk(SAY_LIGHT_OF_DAWN56);
JumpToNextStep(1000);
break;
case 52: // Tiron charges
- if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiTirionGUID))
{
temp->AI()->Talk(EMOTE_LIGHT_OF_DAWN16);
temp->CastSpell(temp, SPELL_TIRION_CHARGE, false); // jumping charge
@@ -1178,20 +1178,20 @@ public:
temp->SetSpeed(MOVE_RUN, 3.0f); // workarounds, make Tirion still running
temp->SetWalk(false);
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[2].x, LightofDawnLoc[2].y, LightofDawnLoc[2].z);
- if (Creature* lktemp = Unit::GetCreature(*me, uiLichKingGUID))
+ if (Creature* lktemp = ObjectAccessor::GetCreature(*me, uiLichKingGUID))
lktemp->Relocate(LightofDawnLoc[28].x, LightofDawnLoc[28].y, LightofDawnLoc[28].z); // workarounds, he should kick back by Tirion, but here we relocate him
}
JumpToNextStep(1500);
break;
case 53:
- if (Creature* temp = Unit::GetCreature(*me, uiLichKingGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiLichKingGUID))
temp->AI()->Talk(SAY_LIGHT_OF_DAWN57);
JumpToNextStep(1000);
break;
case 54:
- if (Creature* temp = Unit::GetCreature(*me, uiLichKingGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiLichKingGUID))
{
temp->SetSpeed(MOVE_RUN, 1.0f);
me->SetWalk(true);
@@ -1201,33 +1201,33 @@ public:
break;
case 55:
- if (Creature* temp = Unit::GetCreature(*me, uiLichKingGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiLichKingGUID))
temp->SetStandState(UNIT_STAND_STATE_KNEEL);
JumpToNextStep(2000);
break;
case 56:
- if (Creature* temp = Unit::GetCreature(*me, uiLichKingGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiLichKingGUID))
temp->SetStandState(UNIT_STAND_STATE_STAND);
JumpToNextStep(1500);
break;
case 57:
- if (Creature* temp = Unit::GetCreature(*me, uiLichKingGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiLichKingGUID))
temp->AI()->Talk(SAY_LIGHT_OF_DAWN58);
JumpToNextStep(10000);
break;
case 58:
- if (Creature* temp = Unit::GetCreature(*me, uiLichKingGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiLichKingGUID))
temp->AI()->Talk(SAY_LIGHT_OF_DAWN59);
JumpToNextStep(10000);
break;
case 59:
- if (Creature* temp = Unit::GetCreature(*me, uiLichKingGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiLichKingGUID))
temp->CastSpell(temp, SPELL_TELEPORT_VISUAL, false);
- if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID)) // Tirion runs to Darion
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiTirionGUID)) // Tirion runs to Darion
{
temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
temp->SetSpeed(MOVE_RUN, 1.0f);
@@ -1237,7 +1237,7 @@ public:
break;
case 60:
- if (Creature* temp = Unit::GetCreature(*me, uiLichKingGUID)) // Lich king disappears here
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiLichKingGUID)) // Lich king disappears here
{
temp->AI()->Talk(EMOTE_LIGHT_OF_DAWN17);
temp->Kill(temp);
@@ -1246,13 +1246,13 @@ public:
break;
case 61:
- if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiTirionGUID))
temp->AI()->Talk(SAY_LIGHT_OF_DAWN60);
JumpToNextStep(3000);
break;
case 62:
- if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiTirionGUID))
{
temp->SetWalk(true);
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[7].x, LightofDawnLoc[7].y, LightofDawnLoc[7].z);
@@ -1261,7 +1261,7 @@ public:
break;
case 63:
- if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiTirionGUID))
{
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[8].x, LightofDawnLoc[8].y, LightofDawnLoc[8].z);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN61);
@@ -1270,37 +1270,37 @@ public:
break;
case 64:
- if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiTirionGUID))
temp->AI()->Talk(SAY_LIGHT_OF_DAWN62);
JumpToNextStep(7000);
break;
case 65:
- if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiTirionGUID))
temp->AI()->Talk(SAY_LIGHT_OF_DAWN63);
JumpToNextStep(10000);
break;
case 66:
- if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiTirionGUID))
temp->AI()->Talk(SAY_LIGHT_OF_DAWN64);
JumpToNextStep(11000);
break;
case 67:
- if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiTirionGUID))
temp->AI()->Talk(SAY_LIGHT_OF_DAWN65);
JumpToNextStep(10000);
break;
case 68:
- if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiTirionGUID))
temp->AI()->Talk(SAY_LIGHT_OF_DAWN66);
JumpToNextStep(8000);
break;
case 69:
- if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiTirionGUID))
temp->AI()->Talk(SAY_LIGHT_OF_DAWN67);
JumpToNextStep(10000);
break;
@@ -1335,13 +1335,13 @@ public:
break;
case 73:
- if (Creature* temp = Unit::GetCreature(*me, uiKoltiraGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiKoltiraGUID))
temp->DespawnOrUnsummon();
- if (Creature* temp = Unit::GetCreature(*me, uiOrbazGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiOrbazGUID))
temp->DespawnOrUnsummon();
- if (Creature* temp = Unit::GetCreature(*me, uiThassarianGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiThassarianGUID))
temp->DespawnOrUnsummon();
- if (Creature* temp = Unit::GetCreature(*me, uiLichKingGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiLichKingGUID))
temp->DespawnOrUnsummon();
me->DespawnOrUnsummon();
break;
@@ -1452,7 +1452,7 @@ public:
for (uint8 i = 0; i < ENCOUNTER_WARRIOR_NUMBER; ++i)
DespawnNPC(uiWarriorGUID[i]);
- if (Creature* temp = Unit::GetCreature(*me, uiKorfaxGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiKorfaxGUID))
{
temp->RemoveAllAuras();
temp->DeleteThreatList();
@@ -1463,7 +1463,7 @@ public:
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[9].x, LightofDawnLoc[9].y, LightofDawnLoc[9].z);
}
- if (Creature* temp = Unit::GetCreature(*me, uiMaxwellGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiMaxwellGUID))
{
temp->RemoveAllAuras();
temp->DeleteThreatList();
@@ -1474,7 +1474,7 @@ public:
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[12].x, LightofDawnLoc[12].y, LightofDawnLoc[12].z);
}
- if (Creature* temp = Unit::GetCreature(*me, uiEligorGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiEligorGUID))
{
temp->RemoveAllAuras();
temp->DeleteThreatList();
@@ -1486,7 +1486,7 @@ public:
}
DespawnNPC(uiRayneGUID);
- if (Creature* temp = Unit::GetCreature(*me, uiKoltiraGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiKoltiraGUID))
{
temp->RemoveAllAuras();
temp->DeleteThreatList();
@@ -1498,10 +1498,10 @@ public:
temp->CastSpell(temp, SPELL_THE_LIGHT_OF_DAWN, false);
}
- if (Creature* temp = Unit::GetCreature(*me, uiOrbazGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiOrbazGUID))
temp->AI()->Talk(EMOTE_LIGHT_OF_DAWN04);
- if (Creature* temp = Unit::GetCreature(*me, uiThassarianGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiThassarianGUID))
{
temp->RemoveAllAuras();
temp->DeleteThreatList();
@@ -1513,7 +1513,7 @@ public:
temp->CastSpell(temp, SPELL_THE_LIGHT_OF_DAWN, false);
}
- if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiTirionGUID))
temp->AI()->Talk(SAY_LIGHT_OF_DAWN26);
SetHoldState(false);
@@ -1532,7 +1532,7 @@ public:
void NPCChangeTarget(uint64 ui_GUID)
{
- if (Creature* temp = Unit::GetCreature(*me, ui_GUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, ui_GUID))
if (temp->IsAlive())
if (Unit* pTarger = SelectTarget(SELECT_TARGET_RANDOM, 0))
if (pTarger->IsAlive())
@@ -1553,7 +1553,7 @@ public:
// Death
for (uint8 i = 0; i < ENCOUNTER_GHOUL_NUMBER; ++i)
{
- temp = Unit::GetCreature(*me, uiGhoulGUID[i]);
+ temp = ObjectAccessor::GetCreature(*me, uiGhoulGUID[i]);
if (!temp)
{
temp = me->SummonCreature(NPC_ACHERUS_GHOUL, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
@@ -1563,7 +1563,7 @@ public:
}
for (uint8 i = 0; i < ENCOUNTER_ABOMINATION_NUMBER; ++i)
{
- temp = Unit::GetCreature(*me, uiAbominationGUID[i]);
+ temp = ObjectAccessor::GetCreature(*me, uiAbominationGUID[i]);
if (!temp)
{
temp = me->SummonCreature(NPC_WARRIOR_OF_THE_FROZEN_WASTES, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
@@ -1573,7 +1573,7 @@ public:
}
for (uint8 i = 0; i < ENCOUNTER_WARRIOR_NUMBER; ++i)
{
- temp = Unit::GetCreature(*me, uiWarriorGUID[i]);
+ temp = ObjectAccessor::GetCreature(*me, uiWarriorGUID[i]);
if (!temp)
{
temp = me->SummonCreature(NPC_RAMPAGING_ABOMINATION, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
@@ -1583,7 +1583,7 @@ public:
}
for (uint8 i = 0; i < ENCOUNTER_BEHEMOTH_NUMBER; ++i)
{
- temp = Unit::GetCreature(*me, uiBehemothGUID[i]);
+ temp = ObjectAccessor::GetCreature(*me, uiBehemothGUID[i]);
if (!temp)
{
temp = me->SummonCreature(NPC_FLESH_BEHEMOTH, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
@@ -1595,7 +1595,7 @@ public:
// Dawn
for (uint8 i = 0; i < ENCOUNTER_DEFENDER_NUMBER; ++i)
{
- temp = Unit::GetCreature(*me, uiDefenderGUID[i]);
+ temp = ObjectAccessor::GetCreature(*me, uiDefenderGUID[i]);
if (!temp)
{
temp = me->SummonCreature(NPC_DEFENDER_OF_THE_LIGHT, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
@@ -1606,7 +1606,7 @@ public:
}
for (uint8 i = 0; i < ENCOUNTER_EARTHSHATTER_NUMBER; ++i)
{
- temp = Unit::GetCreature(*me, uiEarthshatterGUID[i]);
+ temp = ObjectAccessor::GetCreature(*me, uiEarthshatterGUID[i]);
if (!temp)
{
temp = me->SummonCreature(NPC_RIMBLAT_EARTHSHATTER, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
@@ -1615,7 +1615,7 @@ public:
uiEarthshatterGUID[i] = temp->GetGUID();
}
}
- temp = Unit::GetCreature(*me, uiKorfaxGUID);
+ temp = ObjectAccessor::GetCreature(*me, uiKorfaxGUID);
if (!temp)
{
temp = me->SummonCreature(NPC_KORFAX_CHAMPION_OF_THE_LIGHT, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000);
@@ -1623,7 +1623,7 @@ public:
me->AddThreat(temp, 0.0f);
uiKorfaxGUID = temp->GetGUID();
}
- temp = Unit::GetCreature(*me, uiMaxwellGUID);
+ temp = ObjectAccessor::GetCreature(*me, uiMaxwellGUID);
if (!temp)
{
temp = me->SummonCreature(NPC_LORD_MAXWELL_TYROSUS, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000);
@@ -1631,7 +1631,7 @@ public:
me->AddThreat(temp, 0.0f);
uiMaxwellGUID = temp->GetGUID();
}
- temp = Unit::GetCreature(*me, uiEligorGUID);
+ temp = ObjectAccessor::GetCreature(*me, uiEligorGUID);
if (!temp)
{
temp = me->SummonCreature(NPC_COMMANDER_ELIGOR_DAWNBRINGER, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000);
@@ -1639,7 +1639,7 @@ public:
me->AddThreat(temp, 0.0f);
uiEligorGUID = temp->GetGUID();
}
- temp = Unit::GetCreature(*me, uiRayneGUID);
+ temp = ObjectAccessor::GetCreature(*me, uiRayneGUID);
if (!temp)
{
temp = me->SummonCreature(NPC_RAYNE, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
@@ -1651,7 +1651,7 @@ public:
void DespawnNPC(uint64 pGUID)
{
- if (Creature* temp = Unit::GetCreature(*me, pGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, pGUID))
if (temp->IsAlive())
{
temp->SetVisible(false);
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp
index e5be2cb6eb7..43dee1338ef 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp
@@ -99,7 +99,7 @@ public:
FlyBackTimer = 4500;
break;
case 2:
- if (!player->isRessurectRequested())
+ if (!player->isResurrectRequested())
{
me->HandleEmoteCommand(EMOTE_ONESHOT_CUSTOM_SPELL_01);
DoCast(player, SPELL_REVIVE, true);
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
index 423f8f26130..0be681af915 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
@@ -356,7 +356,7 @@ public:
if (wait <= diff)
{
die = false;
- if (Unit* body = Unit::GetUnit(*me, bodyGUID))
+ if (Unit* body = ObjectAccessor::GetUnit(*me, bodyGUID))
body->Kill(body);
me->Kill(me);
}
@@ -428,7 +428,7 @@ public:
DoCast(me, SPELL_HEAD);
if (headGUID)
{
- if (Creature* Head = Unit::GetCreature((*me), headGUID))
+ if (Creature* Head = ObjectAccessor::GetCreature((*me), headGUID))
Head->DisappearAndDie();
headGUID = 0;
@@ -483,7 +483,7 @@ public:
wp_reached = false;
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
SaySound(SAY_ENTRANCE);
- if (Unit* player = Unit::GetUnit(*me, PlayerGUID))
+ if (Unit* player = ObjectAccessor::GetUnit(*me, PlayerGUID))
DoStartMovement(player);
break;
}
@@ -516,7 +516,7 @@ public:
if (withhead)
SaySound(SAY_PLAYER_DEATH);
//maybe possible when player dies from conflagration
- else if (Creature* Head = Unit::GetCreature((*me), headGUID))
+ else if (Creature* Head = ObjectAccessor::GetCreature((*me), headGUID))
CAST_AI(npc_head::npc_headAI, Head->AI())->SaySound(SAY_PLAYER_DEATH);
}
}
@@ -601,7 +601,7 @@ public:
ThreatContainer::StorageType threatlist = caster->getThreatManager().getThreatList();
for (ThreatContainer::StorageType::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
{
- Unit* unit = Unit::GetUnit(*me, (*itr)->getUnitGuid());
+ Unit* unit = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid());
if (unit && unit->IsAlive() && unit != caster)
me->AddThreat(unit, caster->getThreatManager().getThreat(unit));
}
@@ -621,7 +621,7 @@ public:
if (!headGUID)
headGUID = DoSpawnCreature(HEAD, float(rand()%6), float(rand()%6), 0, 0, TEMPSUMMON_DEAD_DESPAWN, 0)->GetGUID();
- Unit* Head = Unit::GetUnit(*me, headGUID);
+ Unit* Head = ObjectAccessor::GetUnit(*me, headGUID);
if (Head && Head->IsAlive())
{
Head->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
@@ -746,7 +746,7 @@ public:
--Phase;
else
Phase = 1;
- Creature* Head = Unit::GetCreature((*me), headGUID);
+ Creature* Head = ObjectAccessor::GetCreature((*me), headGUID);
if (Head && Head->IsAlive())
{
CAST_AI(npc_head::npc_headAI, Head->AI())->Phase = Phase;
@@ -837,7 +837,7 @@ public:
if (!debuffGUID)
return;
- Unit* debuff = Unit::GetUnit(*me, debuffGUID);
+ Unit* debuff = ObjectAccessor::GetUnit(*me, debuffGUID);
if (debuff)
{
debuff->SetVisible(false);
@@ -909,7 +909,7 @@ void npc_head::npc_headAI::Disappear()
if (bodyGUID)
{
- Creature* body = Unit::GetCreature((*me), bodyGUID);
+ Creature* body = ObjectAccessor::GetCreature((*me), bodyGUID);
if (body && body->IsAlive())
{
withbody = true;
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp
index e345dc60074..a7c795a81f6 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp
@@ -84,7 +84,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
//Any other Actions to do with vorrel? setStandState?
- if (Creature* vorrel = Creature::GetCreature(*me, instance->GetData64(DATA_VORREL)))
+ if (Creature* vorrel = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_VORREL)))
vorrel->AI()->Talk(SAY_TRIGGER_VORREL);
}
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp
index a8d1f91c443..25bb08620a1 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp
@@ -33,12 +33,12 @@ enum Says
//Mograine says
SAY_MO_AGGRO = 0,
SAY_MO_KILL = 1,
- SAY_MO_RESSURECTED = 2,
+ SAY_MO_RESURRECTED = 2,
//Whitemane says
SAY_WH_INTRO = 0,
SAY_WH_KILL = 1,
- SAY_WH_RESSURECT = 2,
+ SAY_WH_RESURRECT = 2,
};
enum Spells
@@ -127,7 +127,7 @@ public:
return;
//On first death, fake death and open door, as well as initiate whitemane if exist
- if (Unit* Whitemane = Unit::GetUnit(*me, instance->GetData64(DATA_WHITEMANE)))
+ if (Unit* Whitemane = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_WHITEMANE)))
{
instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, IN_PROGRESS);
@@ -157,10 +157,10 @@ public:
void SpellHit(Unit* /*who*/, const SpellInfo* spell) override
{
- //When hit with ressurection say text
+ //When hit with resurrection say text
if (spell->Id == SPELL_SCARLETRESURRECTION)
{
- Talk(SAY_MO_RESSURECTED);
+ Talk(SAY_MO_RESURRECTED);
_bFakeDeath = false;
instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, SPECIAL);
@@ -174,8 +174,8 @@ public:
if (_bHasDied && !_bHeal && instance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) == SPECIAL)
{
- //On ressurection, stop fake death and heal whitemane and resume fight
- if (Unit* Whitemane = Unit::GetUnit(*me, instance->GetData64(DATA_WHITEMANE)))
+ //On resurrection, stop fake death and heal whitemane and resume fight
+ if (Unit* Whitemane = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_WHITEMANE)))
{
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->SetStandState(UNIT_STAND_STATE_STAND);
@@ -294,7 +294,7 @@ public:
if (Creature* mograine = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_MOGRAINE)))
{
DoCast(mograine, SPELL_SCARLETRESURRECTION);
- Talk(SAY_WH_RESSURECT);
+ Talk(SAY_WH_RESURRECT);
_bCanResurrect = false;
}
}
@@ -325,7 +325,7 @@ public:
if (!HealthAbovePct(75))
target = me;
- if (Creature* mograine = Unit::GetCreature(*me, instance->GetData64(DATA_MOGRAINE)))
+ if (Creature* mograine = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_MOGRAINE)))
{
// checking _bCanResurrectCheck prevents her healing Mograine while he is "faking death"
if (_bCanResurrectCheck && mograine->IsAlive() && !mograine->HealthAbovePct(75))
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp
index 82f0fc14490..9a1f8f14557 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp
@@ -160,7 +160,7 @@ class spell_shadow_portal : public SpellScriptLoader
class spell_shadow_portal_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_shadow_portal_SpellScript)
+ PrepareSpellScript(spell_shadow_portal_SpellScript);
void HandleCast(SpellEffIndex /*effIndex*/)
{
@@ -274,7 +274,7 @@ class spell_shadow_portal_rooms : public SpellScriptLoader
class spell_shadow_portal_rooms_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_shadow_portal_rooms_SpellScript)
+ PrepareSpellScript(spell_shadow_portal_rooms_SpellScript);
void HandleSendEvent(SpellEffIndex effIndex)
{
diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp
index bbb56d09f43..fb839650b86 100644
--- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp
+++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp
@@ -208,7 +208,7 @@ class spell_shadowfang_keep_haunting_spirits : public SpellScriptLoader
class spell_shadowfang_keep_haunting_spirits_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_shadowfang_keep_haunting_spirits_AuraScript)
+ PrepareAuraScript(spell_shadowfang_keep_haunting_spirits_AuraScript);
void CalcPeriodic(AuraEffect const* /*aurEff*/, bool& isPeriodic, int32& amplitude)
{
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp
index 9bcf67bce8c..4109328afda 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp
@@ -187,7 +187,7 @@ public:
{
if (Die_Timer <= diff)
{
- if (Unit* temp = Unit::GetUnit(*me, Tagger))
+ if (Unit* temp = ObjectAccessor::GetUnit(*me, Tagger))
{
if (Player* player = temp->ToPlayer())
player->KilledMonsterCredit(NPC_RESTLESS, me->GetGUID());
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp
index 5bca936d5b4..8a9699ed1be 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp
@@ -280,7 +280,7 @@ public:
{
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
if (!target)
- target = Unit::GetUnit(*me, instance->GetData64(DATA_PLAYER_GUID));
+ target = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_PLAYER_GUID));
if (!target)
{
@@ -306,7 +306,7 @@ public:
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
if (!target)
- target = Unit::GetUnit(*me, instance->GetData64(DATA_PLAYER_GUID));
+ target = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_PLAYER_GUID));
if (!target)
{
@@ -335,7 +335,7 @@ public:
{
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
if (!target)
- target = Unit::GetUnit(*me, instance->GetData64(DATA_PLAYER_GUID));
+ target = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_PLAYER_GUID));
if (!target)
{
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
index 28bb24f49a9..d300703152c 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
@@ -766,7 +766,7 @@ public:
ThreatContainer::StorageType threatlist = me->getThreatManager().getThreatList();
for (ThreatContainer::StorageType::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
{
- if (Unit* unit = Unit::GetUnit(*me, (*itr)->getUnitGuid()))
+ if (Unit* unit = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid()))
if (unit->GetPositionZ() > me->GetPositionZ() + 5)
me->getThreatManager().modifyThreatPercent(unit, -100);
}
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
index 179a649aab4..565d40a802e 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
@@ -956,7 +956,7 @@ public:
ThreatContainer::StorageType const &threatlist = me->getThreatManager().getThreatList();
for (ThreatContainer::StorageType::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
{
- Unit* unit = Unit::GetUnit(*me, (*itr)->getUnitGuid());
+ Unit* unit = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid());
if (unit)
pPortal->AddThreat(unit, 1.0f);
}
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp
index 9d9232b774d..faecb2ca2f0 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp
@@ -603,7 +603,7 @@ public:
{
if (SpellTimer <= diff)
{
- Unit* Victim = Unit::GetUnit(*me, instance->GetData64(DATA_PLAYER_GUID));
+ Unit* Victim = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_PLAYER_GUID));
switch (NeedForAHack)
{
case 0:
diff --git a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp
index 9134f15959f..f06dc247883 100644
--- a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp
+++ b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp
@@ -94,7 +94,7 @@ class boss_archaedas : public CreatureScript
void ActivateMinion(uint64 uiGuid, bool flag)
{
- Unit* minion = Unit::GetUnit(*me, uiGuid);
+ Unit* minion = ObjectAccessor::GetUnit(*me, uiGuid);
if (minion && minion->IsAlive())
{
@@ -139,7 +139,7 @@ class boss_archaedas : public CreatureScript
} else if (bWakingUp && iAwakenTimer <= 0)
{
bWakingUp = false;
- AttackStart(Unit::GetUnit(*me, instance->GetData64(0)));
+ AttackStart(ObjectAccessor::GetUnit(*me, instance->GetData64(0)));
return; // dont want to continue until we finish the AttackStart method
}
@@ -285,7 +285,7 @@ class npc_archaedas_minions : public CreatureScript
{
bWakingUp = false;
bAmIAwake = true;
- // AttackStart(Unit::GetUnit(*me, instance->GetData64(0))); // whoWokeArchaedasGUID
+ // AttackStart(ObjectAccessor::GetUnit(*me, instance->GetData64(0))); // whoWokeArchaedasGUID
return; // dont want to continue until we finish the AttackStart method
}
diff --git a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp
index 717406e6750..56c84677181 100644
--- a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp
+++ b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp
@@ -252,7 +252,7 @@ class instance_uldaman : public InstanceMapScript
if (!archaedas)
return;
- if (Unit::GetUnit(*archaedas, target))
+ if (ObjectAccessor::GetUnit(*archaedas, target))
{
archaedas->CastSpell(archaedas, SPELL_ARCHAEDAS_AWAKEN, false);
whoWokeuiArchaedasGUID = target;
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
index 3adca160720..9810c42bdfb 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
@@ -304,13 +304,13 @@ class boss_akilzon : public CreatureScript
break;
case EVENT_STORM_SEQUENCE:
{
- Unit* target = Unit::GetUnit(*me, CloudGUID);
+ Unit* target = ObjectAccessor::GetUnit(*me, CloudGUID);
if (!target || !target->IsAlive())
{
EnterEvadeMode();
return;
}
- else if (Unit* Cyclone = Unit::GetUnit(*me, CycloneGUID))
+ else if (Unit* Cyclone = ObjectAccessor::GetUnit(*me, CycloneGUID))
Cyclone->CastSpell(target, SPELL_SAND_STORM, true); // keep casting or...
HandleStormSequence(target);
break;
@@ -323,7 +323,7 @@ class boss_akilzon : public CreatureScript
for (uint8 i = 0; i < 8; ++i)
{
- Unit* bird = Unit::GetUnit(*me, BirdGUIDs[i]);
+ Unit* bird = ObjectAccessor::GetUnit(*me, BirdGUIDs[i]);
if (!bird) //they despawned on die
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
@@ -406,7 +406,7 @@ class npc_akilzon_eagle : public CreatureScript
arrived = true;
if (TargetGUID)
{
- if (Unit* target = Unit::GetUnit(*me, TargetGUID))
+ if (Unit* target = ObjectAccessor::GetUnit(*me, TargetGUID))
DoCast(target, SPELL_EAGLE_SWOOP, true);
TargetGUID = 0;
me->SetSpeed(MOVE_RUN, 1.2f);
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp
index 2da0201e060..74ce267441f 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp
@@ -152,7 +152,7 @@ class boss_halazzi : public CreatureScript
me->Attack(me->GetVictim(), true);
me->GetMotionMaster()->MoveChase(me->GetVictim());
}
- if (Creature* Lynx = Unit::GetCreature(*me, LynxGUID))
+ if (Creature* Lynx = ObjectAccessor::GetCreature(*me, LynxGUID))
Lynx->DisappearAndDie();
me->SetMaxHealth(600000);
me->SetHealth(600000 - 150000 * TransformCount);
@@ -174,7 +174,7 @@ class boss_halazzi : public CreatureScript
TotemTimer = 12000;
break;
case PHASE_MERGE:
- if (Unit* pLynx = Unit::GetUnit(*me, LynxGUID))
+ if (Unit* pLynx = ObjectAccessor::GetUnit(*me, LynxGUID))
{
Talk(SAY_MERGE);
pLynx->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
@@ -259,7 +259,7 @@ class boss_halazzi : public CreatureScript
EnterPhase(PHASE_MERGE);
else
{
- Unit* Lynx = Unit::GetUnit(*me, LynxGUID);
+ Unit* Lynx = ObjectAccessor::GetUnit(*me, LynxGUID);
if (Lynx && !Lynx->HealthAbovePct(20) /*Lynx->HealthBelowPct(10)*/)
EnterPhase(PHASE_MERGE);
}
@@ -272,7 +272,7 @@ class boss_halazzi : public CreatureScript
{
if (CheckTimer <= diff)
{
- Unit* Lynx = Unit::GetUnit(*me, LynxGUID);
+ Unit* Lynx = ObjectAccessor::GetUnit(*me, LynxGUID);
if (Lynx)
{
Lynx->GetMotionMaster()->MoveFollow(me, 0, 0);
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp
index b93a2475027..6e5517e82a6 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp
@@ -303,7 +303,7 @@ class boss_hexlord_malacrass : public CreatureScript
for (uint8 i = 0; i < 4; ++i)
{
- Creature* creature = Unit::GetCreature(*me, AddGUID[i]);
+ Creature* creature = ObjectAccessor::GetCreature(*me, AddGUID[i]);
if (creature && creature->IsAlive())
creature->AI()->AttackStart(me->GetVictim());
else
@@ -338,7 +338,7 @@ class boss_hexlord_malacrass : public CreatureScript
for (uint8 i = 0; i < 4; ++i)
{
- Unit* Temp = Unit::GetUnit(*me, AddGUID[i]);
+ Unit* Temp = ObjectAccessor::GetUnit(*me, AddGUID[i]);
if (Temp && Temp->IsAlive())
Temp->DealDamage(Temp, Temp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
}
@@ -363,7 +363,7 @@ class boss_hexlord_malacrass : public CreatureScript
{
for (uint8 i = 0; i < 4; ++i)
{
- Creature* creature = (Unit::GetCreature((*me), AddGUID[i]));
+ Creature* creature = (ObjectAccessor::GetCreature((*me), AddGUID[i]));
if (!creature || !creature->IsAlive())
{
if (creature) creature->setDeathState(DEAD);
@@ -397,7 +397,7 @@ class boss_hexlord_malacrass : public CreatureScript
if (CheckAddState_Timer <= diff)
{
for (uint8 i = 0; i < 4; ++i)
- if (Creature* temp = Unit::GetCreature(*me, AddGUID[i]))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, AddGUID[i]))
if (temp->IsAlive() && !temp->GetVictim())
temp->AI()->AttackStart(me->GetVictim());
@@ -462,7 +462,7 @@ class boss_hexlord_malacrass : public CreatureScript
if (PlayerAbility_Timer <= diff)
{
- //Unit* target = Unit::GetUnit(*me, PlayerGUID);
+ //Unit* target = ObjectAccessor::GetUnit(*me, PlayerGUID);
//if (target && target->IsAlive())
//{
UseAbility();
@@ -959,7 +959,7 @@ class spell_hexlord_unstable_affliction : public SpellScriptLoader
class spell_hexlord_unstable_affliction_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_hexlord_unstable_affliction_AuraScript)
+ PrepareAuraScript(spell_hexlord_unstable_affliction_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override
{
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp
index 47ca91ec591..f264b12ca23 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp
@@ -292,7 +292,7 @@ class boss_janalai : public CreatureScript
{
if (BombCount < 40)
{
- if (Unit* FireBomb = Unit::GetUnit(*me, FireBombGUIDs[BombCount]))
+ if (Unit* FireBomb = ObjectAccessor::GetUnit(*me, FireBombGUIDs[BombCount]))
{
FireBomb->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
DoCast(FireBomb, SPELL_FIRE_BOMB_THROW, true);
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp
index 179b29b70d8..6b0fc05ba3d 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp
@@ -229,7 +229,7 @@ class boss_zuljin : public CreatureScript
Talk(YELL_DEATH);
Summons.DespawnEntry(CREATURE_COLUMN_OF_FIRE);
- if (Unit* Temp = Unit::GetUnit(*me, SpiritGUID[3]))
+ if (Unit* Temp = ObjectAccessor::GetUnit(*me, SpiritGUID[3]))
Temp->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_DEAD);
}
@@ -284,7 +284,7 @@ class boss_zuljin : public CreatureScript
{
if (SpiritGUID[i])
{
- if (Unit* temp = Unit::GetUnit(*me, SpiritGUID[i]))
+ if (Unit* temp = ObjectAccessor::GetUnit(*me, SpiritGUID[i]))
{
temp->SetVisible(false);
temp->setDeathState(DEAD);
@@ -322,10 +322,10 @@ class boss_zuljin : public CreatureScript
Talk(Transform[Phase].text);
if (Phase > 0)
{
- if (Unit* Temp = Unit::GetUnit(*me, SpiritGUID[Phase - 1]))
+ if (Unit* Temp = ObjectAccessor::GetUnit(*me, SpiritGUID[Phase - 1]))
Temp->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_DEAD);
}
- if (Unit* Temp = Unit::GetUnit(*me, SpiritGUID[NextPhase - 1]))
+ if (Unit* Temp = ObjectAccessor::GetUnit(*me, SpiritGUID[NextPhase - 1]))
Temp->CastSpell(me, SPELL_SIPHON_SOUL, false); // should m cast on temp
if (NextPhase == 2)
{
@@ -442,7 +442,7 @@ class boss_zuljin : public CreatureScript
if (Claw_Loop_Timer <= diff)
{
Unit* target = me->GetVictim();
- if (!target || !target->isTargetableForAttack()) target = Unit::GetUnit(*me, TankGUID);
+ if (!target || !target->isTargetableForAttack()) target = ObjectAccessor::GetUnit(*me, TankGUID);
if (!target || !target->isTargetableForAttack()) target = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (target)
{
@@ -455,7 +455,7 @@ class boss_zuljin : public CreatureScript
{
Claw_Rage_Timer = urand(15000, 20000);
me->SetSpeed(MOVE_RUN, 1.2f);
- AttackStart(Unit::GetUnit(*me, TankGUID));
+ AttackStart(ObjectAccessor::GetUnit(*me, TankGUID));
TankGUID = 0;
return;
}
@@ -503,7 +503,7 @@ class boss_zuljin : public CreatureScript
{
Lynx_Rush_Timer = urand(15000, 20000);
me->SetSpeed(MOVE_RUN, 1.2f);
- AttackStart(Unit::GetUnit(*me, TankGUID));
+ AttackStart(ObjectAccessor::GetUnit(*me, TankGUID));
TankGUID = 0;
}
else
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
index 77bf23fa3a1..b2eec0574f3 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
@@ -464,7 +464,7 @@ class spell_banging_the_gong : public SpellScriptLoader
class spell_banging_the_gong_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_banging_the_gong_SpellScript)
+ PrepareSpellScript(spell_banging_the_gong_SpellScript);
void Activate(SpellEffIndex index)
{
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
index efd18472a52..4ac34615498 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
@@ -344,7 +344,7 @@ class npc_zulian_prowler : public CreatureScript
DoCast(me, SPELL_SNEAK_RANK_1_1);
DoCast(me, SPELL_SNEAK_RANK_1_2);
- if (Unit* arlokk = me->GetUnit(*me, _instance->GetData64(NPC_ARLOKK)))
+ if (Unit* arlokk = ObjectAccessor::GetUnit(*me, _instance->GetData64(NPC_ARLOKK)))
me->GetMotionMaster()->MovePoint(0, arlokk->GetPositionX(), arlokk->GetPositionY(), arlokk->GetPositionZ());
_events.ScheduleEvent(EVENT_ATTACK, 6000);
}
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
index 4b08ad06dda..72ba9db3637 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
@@ -408,7 +408,7 @@ class spell_threatening_gaze : public SpellScriptLoader
class spell_threatening_gaze_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_threatening_gaze_AuraScript)
+ PrepareAuraScript(spell_threatening_gaze_AuraScript);
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
diff --git a/src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp b/src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp
index c08ea7f8dcc..293a6b90915 100644
--- a/src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp
@@ -44,7 +44,7 @@ class spell_razelikh_teleport_group : public SpellScriptLoader
class spell_razelikh_teleport_group_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_razelikh_teleport_group_SpellScript)
+ PrepareSpellScript(spell_razelikh_teleport_group_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
diff --git a/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp b/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp
index ecf2bd95cbe..e7e374ea26e 100644
--- a/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp
@@ -252,7 +252,7 @@ public:
{
me->DisappearAndDie();
- if (Creature* pMarzon = Unit::GetCreature(*me, MarzonGUID))
+ if (Creature* pMarzon = ObjectAccessor::GetCreature(*me, MarzonGUID))
{
if (pMarzon->IsAlive())
pMarzon->DisappearAndDie();
@@ -261,7 +261,7 @@ public:
void EnterCombat(Unit* who) override
{
- if (Creature* pMarzon = Unit::GetCreature(*me, MarzonGUID))
+ if (Creature* pMarzon = ObjectAccessor::GetCreature(*me, MarzonGUID))
{
if (pMarzon->IsAlive() && !pMarzon->IsInCombat())
pMarzon->AI()->AttackStart(who);
@@ -335,7 +335,7 @@ public:
uiPhase = 0;
break;
case 5:
- if (Creature* pMarzon = Unit::GetCreature(*me, MarzonGUID))
+ if (Creature* pMarzon = ObjectAccessor::GetCreature(*me, MarzonGUID))
pMarzon->AI()->Talk(SAY_MARZON_1);
uiTimer = 3000;
uiPhase = 6;
@@ -350,7 +350,7 @@ public:
case 7:
if (Creature* pTyrion = me->FindNearestCreature(NPC_TYRION, 20.0f, true))
pTyrion->AI()->Talk(SAY_TYRION_2);
- if (Creature* pMarzon = Unit::GetCreature(*me, MarzonGUID))
+ if (Creature* pMarzon = ObjectAccessor::GetCreature(*me, MarzonGUID))
pMarzon->setFaction(14);
me->setFaction(14);
uiTimer = 0;
diff --git a/src/server/scripts/EasternKingdoms/zone_undercity.cpp b/src/server/scripts/EasternKingdoms/zone_undercity.cpp
index 07cdcefcbbb..0958a9141f0 100644
--- a/src/server/scripts/EasternKingdoms/zone_undercity.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_undercity.cpp
@@ -130,7 +130,7 @@ public:
{
if (summoned->GetEntry() == ENTRY_HIGHBORNE_BUNNY)
{
- if (Creature* target = Unit::GetCreature(*summoned, targetGUID))
+ if (Creature* target = ObjectAccessor::GetCreature(*summoned, targetGUID))
{
target->MonsterMoveWithSpeed(target->GetPositionX(), target->GetPositionY(), me->GetPositionZ()+15.0f, 0);
target->SetPosition(target->GetPositionX(), target->GetPositionY(), me->GetPositionZ()+15.0f, 0.0f);
diff --git a/src/server/scripts/Events/childrens_week.cpp b/src/server/scripts/Events/childrens_week.cpp
index eeda208f0e1..353b5ab9501 100644
--- a/src/server/scripts/Events/childrens_week.cpp
+++ b/src/server/scripts/Events/childrens_week.cpp
@@ -1036,7 +1036,7 @@ class npc_grizzlemaw_cw_trigger : public CreatureScript
if (who && who->GetDistance2d(me) < 10.0f)
if (Player* player = who->ToPlayer())
if (player->GetQuestStatus(QUEST_HOME_OF_THE_BEAR_MEN) == QUEST_STATUS_INCOMPLETE)
- if (Creature* orphan = Creature::GetCreature(*me, getOrphanGUID(player, ORPHAN_WOLVAR)))
+ if (Creature* orphan = ObjectAccessor::GetCreature(*me, getOrphanGUID(player, ORPHAN_WOLVAR)))
{
player->AreaExploredOrEventHappens(QUEST_HOME_OF_THE_BEAR_MEN);
orphan->AI()->Talk(TEXT_WOLVAR_ORPHAN_10);
diff --git a/src/server/scripts/Examples/example_spell.cpp b/src/server/scripts/Examples/example_spell.cpp
index 28c2a0cf71e..9097f7cd650 100644
--- a/src/server/scripts/Examples/example_spell.cpp
+++ b/src/server/scripts/Examples/example_spell.cpp
@@ -43,7 +43,7 @@ class spell_ex_5581 : public SpellScriptLoader
// initialize script, this macro does compile time check for type of the function - prevents possible issues
// if you have assigned wrong type of function to a hook you'll receive type conversion error during build
// this line is required, otherwise you'll get XXXHandlerFunction - identifier not found errors
- PrepareSpellScript(spell_ex_5581SpellScript)
+ PrepareSpellScript(spell_ex_5581SpellScript);
std::string localVariable;
char* localVariable2;
@@ -205,7 +205,7 @@ class spell_ex_66244 : public SpellScriptLoader
class spell_ex_66244AuraScript : public AuraScript
{
- PrepareAuraScript(spell_ex_66244AuraScript)
+ PrepareAuraScript(spell_ex_66244AuraScript);
// function called on server startup
// checks if script has data required for it to work
bool Validate(SpellInfo const* /*spellInfo*/) override
@@ -364,7 +364,7 @@ class spell_ex_absorb_aura : public SpellScriptLoader
class spell_ex_absorb_auraAuraScript : public AuraScript
{
- PrepareAuraScript(spell_ex_absorb_auraAuraScript)
+ PrepareAuraScript(spell_ex_absorb_auraAuraScript);
void HandleOnEffectAbsorb(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount)
{
@@ -400,7 +400,7 @@ class spell_ex_463 : public SpellScriptLoader
class spell_ex_463AuraScript : public AuraScript
{
- PrepareAuraScript(spell_ex_463AuraScript)
+ PrepareAuraScript(spell_ex_463AuraScript);
bool CheckAreaTarget(Unit* target)
{
@@ -438,7 +438,7 @@ class spell_ex : public SpellScriptLoader
class spell_ex_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_ex_SpellScript)
+ PrepareSpellScript(spell_ex_SpellScript);
//bool Validate(SpellInfo const* spellEntry){return true;} override
//bool Load(){return true;}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp
index ebe9939390f..7aaa2239745 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp
@@ -94,7 +94,7 @@ public:
{
if (waypointId == 7)
{
- Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_JAINAPROUDMOORE));
+ Unit* target = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_JAINAPROUDMOORE));
if (target && target->IsAlive())
me->AddThreat(target, 0.0f);
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp
index c0f3ea35004..d86e3342cf0 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp
@@ -118,7 +118,7 @@ public:
{
if (CheckTimer <= diff)
{
- if (Unit* Archimonde = Unit::GetUnit(*me, ArchimondeGUID))
+ if (Unit* Archimonde = ObjectAccessor::GetUnit(*me, ArchimondeGUID))
{
if (Archimonde->HealthBelowPct(2) || !Archimonde->IsAlive())
DoCast(me, SPELL_DENOUEMENT_WISP);
@@ -205,7 +205,7 @@ public:
{
if (ChangeTargetTimer <= diff)
{
- if (Unit* temp = Unit::GetUnit(*me, TargetGUID))
+ if (Unit* temp = ObjectAccessor::GetUnit(*me, TargetGUID))
{
me->GetMotionMaster()->MoveFollow(temp, 0.0f, 0.0f);
TargetGUID = 0;
@@ -364,7 +364,7 @@ public:
ThreatContainer::StorageType::const_iterator itr = threatlist.begin();
for (; itr != threatlist.end(); ++itr)
{
- Unit* unit = Unit::GetUnit(*me, (*itr)->getUnitGuid());
+ Unit* unit = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid());
if (unit && unit->IsAlive())
targets.push_back(unit);
}
@@ -406,7 +406,7 @@ public:
summoned->CastSpell(summoned, SPELL_DOOMFIRE_SPAWN, false);
summoned->CastSpell(summoned, SPELL_DOOMFIRE, true, 0, 0, me->GetGUID());
- if (Unit* DoomfireSpirit = Unit::GetUnit(*me, DoomfireSpiritGUID))
+ if (Unit* DoomfireSpirit = ObjectAccessor::GetUnit(*me, DoomfireSpiritGUID))
{
summoned->GetMotionMaster()->MoveFollow(DoomfireSpirit, 0.0f, 0.0f);
DoomfireSpiritGUID = 0;
@@ -487,7 +487,7 @@ public:
if (temp)
WorldTreeGUID = temp->GetGUID();
- if (Unit* Nordrassil = Unit::GetUnit(*me, WorldTreeGUID))
+ if (Unit* Nordrassil = ObjectAccessor::GetUnit(*me, WorldTreeGUID))
{
Nordrassil->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
Nordrassil->SetDisplayId(11686);
@@ -496,7 +496,7 @@ public:
}
}
- if (Unit* Nordrassil = Unit::GetUnit(*me, WorldTreeGUID))
+ if (Unit* Nordrassil = ObjectAccessor::GetUnit(*me, WorldTreeGUID))
{
Nordrassil->CastSpell(me, SPELL_DRAIN_WORLD_TREE_2, true);
DrainNordrassilTimer = 1000;
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp
index d7c48541315..c9e010e4159 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp
@@ -99,7 +99,7 @@ public:
{
if (waypointId == 7 && instance)
{
- Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_THRALL));
+ Unit* target = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_THRALL));
if (target && target->IsAlive())
me->AddThreat(target, 0.0f);
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp
index 0ba6ead0742..5266f2b22c5 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp
@@ -94,7 +94,7 @@ public:
{
if (waypointId == 7 && instance)
{
- Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_THRALL));
+ Unit* target = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_THRALL));
if (target && target->IsAlive())
me->AddThreat(target, 0.0f);
}
@@ -181,7 +181,7 @@ class spell_mark_of_kazrogal : public SpellScriptLoader
class spell_mark_of_kazrogal_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_mark_of_kazrogal_SpellScript)
+ PrepareSpellScript(spell_mark_of_kazrogal_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets)
{
@@ -196,7 +196,7 @@ class spell_mark_of_kazrogal : public SpellScriptLoader
class spell_mark_of_kazrogal_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_mark_of_kazrogal_AuraScript)
+ PrepareAuraScript(spell_mark_of_kazrogal_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override
{
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp
index 21fe3ab946b..9ac5034d954 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp
@@ -89,7 +89,7 @@ public:
{
if (waypointId == 7 && instance)
{
- Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_JAINAPROUDMOORE));
+ Unit* target = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_JAINAPROUDMOORE));
if (target && target->IsAlive())
me->AddThreat(target, 0.0f);
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
index c8006158ef1..4e6da7dcac2 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
@@ -665,7 +665,7 @@ void hyjalAI::DeSpawnVeins()
{
if (Faction == 1)
{
- Creature* unit=Unit::GetCreature((*me), instance->GetData64(DATA_JAINAPROUDMOORE));
+ Creature* unit=ObjectAccessor::GetCreature((*me), instance->GetData64(DATA_JAINAPROUDMOORE));
if (!unit)return;
hyjalAI* ai = CAST_AI(hyjalAI, unit->AI());
if (!ai)return;
@@ -676,7 +676,7 @@ void hyjalAI::DeSpawnVeins()
}
} else if (Faction)
{
- Creature* unit=Unit::GetCreature((*me), instance->GetData64(DATA_THRALL));
+ Creature* unit=ObjectAccessor::GetCreature((*me), instance->GetData64(DATA_THRALL));
if (!unit)return;
hyjalAI* ai = CAST_AI(hyjalAI, unit->AI());
if (!ai)return;
@@ -804,7 +804,7 @@ void hyjalAI::UpdateAI(uint32 diff)
{
if (BossGUID[i])
{
- Unit* unit = Unit::GetUnit(*me, BossGUID[i]);
+ Unit* unit = ObjectAccessor::GetUnit(*me, BossGUID[i]);
if (unit && (!unit->IsAlive()))
{
if (BossGUID[i] == BossGUID[0])
@@ -937,7 +937,7 @@ void hyjalAI::WaypointReached(uint32 waypointId)
DoCast(me, SPELL_MASS_TELEPORT, false);
if (me->GetEntry() == THRALL && DummyGuid)
{
- if (Creature* creature = Unit::GetCreature(*me, DummyGuid))
+ if (Creature* creature = ObjectAccessor::GetCreature(*me, DummyGuid))
{
hyjalAI* ai = CAST_AI(hyjalAI, creature->AI());
ai->DoMassTeleport = true;
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp
index 038b7ab69ce..85de43cb4c4 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp
@@ -447,7 +447,7 @@ public:
{
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
{
- Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_THRALL));
+ Unit* target = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_THRALL));
if (target && target->IsAlive())
me->AddThreat(target, 0.0f);
}
@@ -486,7 +486,7 @@ public:
CanMove = true;
if (instance->GetData(DATA_ALLIANCE_RETREAT) && !instance->GetData(DATA_HORDE_RETREAT))
{
- Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_THRALL));
+ Unit* target = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_THRALL));
if (target && target->IsAlive())
me->AddThreat(target, 0.0f);
} else if (instance->GetData(DATA_ALLIANCE_RETREAT) && instance->GetData(DATA_HORDE_RETREAT)){
@@ -563,13 +563,13 @@ public:
{
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
{
- Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_THRALL));
+ Unit* target = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_THRALL));
if (target && target->IsAlive())
me->AddThreat(target, 0.0f);
}
else
{
- Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_JAINAPROUDMOORE));
+ Unit* target = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_JAINAPROUDMOORE));
if (target && target->IsAlive())
me->AddThreat(target, 0.0f);
}
@@ -662,13 +662,13 @@ public:
{
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
{
- Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_THRALL));
+ Unit* target = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_THRALL));
if (target && target->IsAlive())
me->AddThreat(target, 0.0f);
}
else
{
- Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_JAINAPROUDMOORE));
+ Unit* target = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_JAINAPROUDMOORE));
if (target && target->IsAlive())
me->AddThreat(target, 0.0f);
}
@@ -773,13 +773,13 @@ public:
{
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
{
- Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_THRALL));
+ Unit* target = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_THRALL));
if (target && target->IsAlive())
me->AddThreat(target, 0.0f);
}
else
{
- Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_JAINAPROUDMOORE));
+ Unit* target = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_JAINAPROUDMOORE));
if (target && target->IsAlive())
me->AddThreat(target, 0.0f);
}
@@ -886,13 +886,13 @@ public:
{
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
{
- Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_THRALL));
+ Unit* target = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_THRALL));
if (target && target->IsAlive())
me->AddThreat(target, 0.0f);
}
else
{
- Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_JAINAPROUDMOORE));
+ Unit* target = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_JAINAPROUDMOORE));
if (target && target->IsAlive())
me->AddThreat(target, 0.0f);
}
@@ -982,13 +982,13 @@ public:
{
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
{
- Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_THRALL));
+ Unit* target = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_THRALL));
if (target && target->IsAlive())
me->AddThreat(target, 0.0f);
}
else
{
- Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_JAINAPROUDMOORE));
+ Unit* target = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_JAINAPROUDMOORE));
if (target && target->IsAlive())
me->AddThreat(target, 0.0f);
}
@@ -1068,13 +1068,13 @@ public:
{
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
{
- Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_THRALL));
+ Unit* target = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_THRALL));
if (target && target->IsAlive())
me->AddThreat(target, 0.0f);
}
else
{
- Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_JAINAPROUDMOORE));
+ Unit* target = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_JAINAPROUDMOORE));
if (target && target->IsAlive())
me->AddThreat(target, 0.0f);
}
@@ -1155,7 +1155,7 @@ public:
{
if (waypointId == 2 && !IsOverrun)
{
- Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_THRALL));
+ Unit* target = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_THRALL));
if (target && target->IsAlive())
{
me->AddThreat(target, 0.0f);
@@ -1276,7 +1276,7 @@ public:
{
if (waypointId == 2 && !IsOverrun)
{
- Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_THRALL));
+ Unit* target = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_THRALL));
if (target && target->IsAlive())
{
me->AddThreat(target, 0.0f);
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
index 0e6d60395d8..fd832051421 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
@@ -627,7 +627,7 @@ public:
JumpToNextStep(2000);
break;
case 3:
- if (Creature* uther = Unit::GetCreature(*me, utherGUID))
+ if (Creature* uther = ObjectAccessor::GetCreature(*me, utherGUID))
{
uther->AI()->Talk(SAY_PHASE102);
}
@@ -642,13 +642,13 @@ public:
break;
//After waypoint 1
case 5:
- if (Creature* jaina = Unit::GetCreature(*me, jainaGUID))
+ if (Creature* jaina = ObjectAccessor::GetCreature(*me, jainaGUID))
jaina->SetTarget(me->GetGUID());
Talk(SAY_PHASE104);
JumpToNextStep(10000);
break;
case 6:
- if (Creature* uther = Unit::GetCreature(*me, utherGUID))
+ if (Creature* uther = ObjectAccessor::GetCreature(*me, utherGUID))
uther->AI()->Talk(SAY_PHASE105);
JumpToNextStep(1000);
break;
@@ -657,7 +657,7 @@ public:
JumpToNextStep(4000);
break;
case 8:
- if (Creature* uther = Unit::GetCreature(*me, utherGUID))
+ if (Creature* uther = ObjectAccessor::GetCreature(*me, utherGUID))
uther->AI()->Talk(SAY_PHASE107);
JumpToNextStep(6000);
break;
@@ -666,7 +666,7 @@ public:
JumpToNextStep(4000);
break;
case 10:
- if (Creature* uther = Unit::GetCreature(*me, utherGUID))
+ if (Creature* uther = ObjectAccessor::GetCreature(*me, utherGUID))
uther->AI()->Talk(SAY_PHASE109);
JumpToNextStep(8000);
break;
@@ -675,7 +675,7 @@ public:
JumpToNextStep(4000);
break;
case 12:
- if (Creature* uther = Unit::GetCreature(*me, utherGUID))
+ if (Creature* uther = ObjectAccessor::GetCreature(*me, utherGUID))
uther->AI()->Talk(SAY_PHASE111);
JumpToNextStep(4000);
break;
@@ -684,7 +684,7 @@ public:
JumpToNextStep(11000);
break;
case 14:
- if (Creature* jaina = Unit::GetCreature(*me, jainaGUID))
+ if (Creature* jaina = ObjectAccessor::GetCreature(*me, jainaGUID))
jaina->AI()->Talk(SAY_PHASE113);
JumpToNextStep(3000);
break;
@@ -693,12 +693,12 @@ public:
JumpToNextStep(9000);
break;
case 16:
- if (Creature* uther = Unit::GetCreature(*me, utherGUID))
+ if (Creature* uther = ObjectAccessor::GetCreature(*me, utherGUID))
uther->AI()->Talk(SAY_PHASE115);
JumpToNextStep(4000);
break;
case 17:
- if (Creature* uther = Unit::GetCreature(*me, utherGUID))
+ if (Creature* uther = ObjectAccessor::GetCreature(*me, utherGUID))
{
uther->SetWalk(true);
uther->GetMotionMaster()->MovePoint(0, 1794.357f, 1272.183f, 140.558f);
@@ -706,7 +706,7 @@ public:
JumpToNextStep(1000);
break;
case 18:
- if (Creature* jaina = Unit::GetCreature(*me, jainaGUID))
+ if (Creature* jaina = ObjectAccessor::GetCreature(*me, jainaGUID))
{
me->SetTarget(jainaGUID);
jaina->SetWalk(true);
@@ -719,7 +719,7 @@ public:
JumpToNextStep(1000);
break;
case 20:
- if (Creature* jaina = Unit::GetCreature(*me, jainaGUID))
+ if (Creature* jaina = ObjectAccessor::GetCreature(*me, jainaGUID))
jaina->AI()->Talk(SAY_PHASE117);
JumpToNextStep(3000);
break;
@@ -740,10 +740,10 @@ public:
bStepping = false;
SetRun(true);
- if (Creature* jaina = Unit::GetCreature(*me, jainaGUID))
+ if (Creature* jaina = ObjectAccessor::GetCreature(*me, jainaGUID))
jaina->DisappearAndDie();
- if (Creature* uther = Unit::GetCreature(*me, utherGUID))
+ if (Creature* uther = ObjectAccessor::GetCreature(*me, utherGUID))
uther->DisappearAndDie();
me->SetTarget(0);
@@ -772,7 +772,7 @@ public:
//After waypoint 9
case 27:
me->SetTarget(citymenGUID[0]);
- if (Creature* cityman = Unit::GetCreature(*me, citymenGUID[0]))
+ if (Creature* cityman = ObjectAccessor::GetCreature(*me, citymenGUID[0]))
{
cityman->SetTarget(me->GetGUID());
cityman->SetWalk(true);
@@ -781,7 +781,7 @@ public:
JumpToNextStep(2000);
break;
case 28:
- if (Creature* cityman = Unit::GetCreature(*me, citymenGUID[0]))
+ if (Creature* cityman = ObjectAccessor::GetCreature(*me, citymenGUID[0]))
cityman->AI()->Talk(SAY_PHASE202);
JumpToNextStep(4000);
break;
@@ -799,11 +799,11 @@ public:
case 31:
SetEscortPaused(false);
bStepping = false;
- if (Creature* cityman1 = Unit::GetCreature(*me, citymenGUID[1]))
+ if (Creature* cityman1 = ObjectAccessor::GetCreature(*me, citymenGUID[1]))
{
cityman1->AI()->Talk(SAY_PHASE204);
cityman1->SetTarget(me->GetGUID());
- if (Creature* cityman0 = Unit::GetCreature(*me, citymenGUID[0]))
+ if (Creature* cityman0 = ObjectAccessor::GetCreature(*me, citymenGUID[0]))
cityman0->Kill(cityman0);
me->SetTarget(citymenGUID[1]);
}
@@ -815,7 +815,7 @@ public:
JumpToNextStep(1000);
break;
case 33:
- if (Creature* cityman1 = Unit::GetCreature(*me, citymenGUID[1]))
+ if (Creature* cityman1 = ObjectAccessor::GetCreature(*me, citymenGUID[1]))
cityman1->Kill(cityman1);
JumpToNextStep(1000);
break;
@@ -839,7 +839,7 @@ public:
case 36:
if (Creature* malganis = me->SummonCreature(NPC_MAL_GANIS, 2117.349f, 1288.624f, 136.271f, 1.37f, TEMPSUMMON_TIMED_DESPAWN, 60000))
{
- if (Creature* pStalkerM = Unit::GetCreature(*me, stalkerGUID))
+ if (Creature* pStalkerM = ObjectAccessor::GetCreature(*me, stalkerGUID))
malganis->CastSpell(pStalkerM, 63793, false);
malganisGUID = malganis->GetGUID();
@@ -850,7 +850,7 @@ public:
JumpToNextStep(11000);
break;
case 37:
- if (Creature* malganis = Unit::GetCreature(*me, malganisGUID))
+ if (Creature* malganis = ObjectAccessor::GetCreature(*me, malganisGUID))
{
Creature* pZombie = GetClosestCreatureWithEntry(malganis, NPC_CITY_MAN, 100.0f);
if (!pZombie)
@@ -865,12 +865,12 @@ public:
phaseTimer = 500;
break;
case 38:
- if (Creature* malganis = Unit::GetCreature(*me, malganisGUID))
+ if (Creature* malganis = ObjectAccessor::GetCreature(*me, malganisGUID))
malganis->AI()->Talk(SAY_PHASE207);
JumpToNextStep(17000);
break;
case 39:
- if (Creature* malganis = Unit::GetCreature(*me, malganisGUID))
+ if (Creature* malganis = ObjectAccessor::GetCreature(*me, malganisGUID))
malganis->SetVisible(false);
Talk(SAY_PHASE208);
JumpToNextStep(7000);
@@ -922,7 +922,7 @@ public:
if (waveGUID[i] == 0)
break;
++mobCounter;
- Unit* temp = Unit::GetCreature(*me, waveGUID[i]);
+ Unit* temp = ObjectAccessor::GetCreature(*me, waveGUID[i]);
if (!temp || temp->isDead())
++deadCounter;
}
@@ -976,16 +976,16 @@ public:
//After Gossip 2 (waypoint 22)
case 61:
me->SetReactState(REACT_AGGRESSIVE);
- if (Creature* disguised0 = Unit::GetCreature(*me, infiniteDraconianGUID[0]))
+ if (Creature* disguised0 = ObjectAccessor::GetCreature(*me, infiniteDraconianGUID[0]))
disguised0->SetTarget(me->GetGUID());
- if (Creature* disguised1 = Unit::GetCreature(*me, infiniteDraconianGUID[1]))
+ if (Creature* disguised1 = ObjectAccessor::GetCreature(*me, infiniteDraconianGUID[1]))
disguised1->SetTarget(me->GetGUID());
- if (Creature* disguised2 = Unit::GetCreature(*me, infiniteDraconianGUID[2]))
+ if (Creature* disguised2 = ObjectAccessor::GetCreature(*me, infiniteDraconianGUID[2]))
disguised2->SetTarget(me->GetGUID());
JumpToNextStep(1000);
break;
case 62:
- if (Creature* disguised0 = Unit::GetCreature(*me, infiniteDraconianGUID[0]))
+ if (Creature* disguised0 = ObjectAccessor::GetCreature(*me, infiniteDraconianGUID[0]))
disguised0->AI()->Talk(SAY_PHASE302);
JumpToNextStep(7000);
break;
@@ -1001,7 +1001,7 @@ public:
JumpToNextStep(1000);
break;
case 65:
- if (Creature* disguised0 = Unit::GetCreature(*me, infiniteDraconianGUID[0]))
+ if (Creature* disguised0 = ObjectAccessor::GetCreature(*me, infiniteDraconianGUID[0]))
disguised0->HandleEmoteCommand(11);
JumpToNextStep(1000);
break;
@@ -1010,12 +1010,12 @@ public:
JumpToNextStep(2000);
break;
case 67:
- if (Creature* disguised0 = Unit::GetCreature(*me, infiniteDraconianGUID[0]))
+ if (Creature* disguised0 = ObjectAccessor::GetCreature(*me, infiniteDraconianGUID[0]))
disguised0->AI()->Talk(SAY_PHASE305);
JumpToNextStep(1000);
break;
case 68:
- if (Creature* disguised2 = Unit::GetCreature(*me, infiniteDraconianGUID[2]))
+ if (Creature* disguised2 = ObjectAccessor::GetCreature(*me, infiniteDraconianGUID[2]))
{
disguised2->UpdateEntry(NPC_INFINITE_HUNTER);
//Make them unattackable
@@ -1025,7 +1025,7 @@ public:
JumpToNextStep(2000);
break;
case 69:
- if (Creature* disguised1 = Unit::GetCreature(*me, infiniteDraconianGUID[1]))
+ if (Creature* disguised1 = ObjectAccessor::GetCreature(*me, infiniteDraconianGUID[1]))
{
disguised1->UpdateEntry(NPC_INFINITE_AGENT);
//Make them unattackable
@@ -1035,7 +1035,7 @@ public:
JumpToNextStep(2000);
break;
case 70:
- if (Creature* disguised0 = Unit::GetCreature(*me, infiniteDraconianGUID[0]))
+ if (Creature* disguised0 = ObjectAccessor::GetCreature(*me, infiniteDraconianGUID[0]))
{
disguised0->UpdateEntry(NPC_INFINITE_ADVERSARY);
//Make them unattackable
@@ -1051,7 +1051,7 @@ public:
case 77:
//Make cratures attackable
for (uint32 i = 0; i< ENCOUNTER_DRACONIAN_NUMBER; ++i)
- if (Creature* temp = Unit::GetCreature(*me, infiniteDraconianGUID[i]))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, infiniteDraconianGUID[i]))
{
temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
temp->SetReactState(REACT_AGGRESSIVE);
@@ -1091,7 +1091,7 @@ public:
if (instance->GetData(DATA_EPOCH_EVENT) != DONE)
{
SpawnTimeRift(17, &epochGUID);
- if (Creature* epoch = Unit::GetCreature(*me, epochGUID))
+ if (Creature* epoch = ObjectAccessor::GetCreature(*me, epochGUID))
epoch->AI()->Talk(SAY_PHASE314);
me->SetTarget(epochGUID);
}
@@ -1105,7 +1105,7 @@ public:
case 82:
if (instance->GetData(DATA_EPOCH_EVENT) != DONE)
{
- if (Creature* epoch = Unit::GetCreature(*me, epochGUID))
+ if (Creature* epoch = ObjectAccessor::GetCreature(*me, epochGUID))
{
//Make Epoch attackable
epoch->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
@@ -1157,7 +1157,7 @@ public:
me->SetTarget(malganisGUID);
break;
case 87:
- if (Creature* malganis = Unit::GetCreature(*me, malganisGUID))
+ if (Creature* malganis = ObjectAccessor::GetCreature(*me, malganisGUID))
{
malganis->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_UNK_6 | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_UNK_15);
malganis->SetReactState(REACT_AGGRESSIVE);
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp
index f6ff1719391..14f9bfb2e2f 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp
@@ -402,7 +402,7 @@ public:
case 94:
if (uint64 TarethaGUID = instance->GetData64(DATA_TARETHA))
{
- if (Creature* Taretha = Creature::GetCreature(*me, TarethaGUID))
+ if (Creature* Taretha = ObjectAccessor::GetCreature(*me, TarethaGUID))
Taretha->AI()->Talk(SAY_TA_ESCAPED, me);
}
break;
@@ -590,7 +590,7 @@ public:
if (instance->GetData64(DATA_EPOCH) == 0)
creature->SummonCreature(ENTRY_EPOCH, 2639.13f, 698.55f, 65.43f, 4.59f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120000);
- if (Creature* thrall = (Unit::GetCreature(*creature, instance->GetData64(DATA_THRALL))))
+ if (Creature* thrall = (ObjectAccessor::GetCreature(*creature, instance->GetData64(DATA_THRALL))))
CAST_AI(npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI, thrall->AI())->StartWP();
}
}
diff --git a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp
index 7a6a5969783..835fd6228e1 100644
--- a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp
@@ -257,7 +257,7 @@ class spell_snufflenose_command : public SpellScriptLoader
class spell_snufflenose_commandSpellScript : public SpellScript
{
- PrepareSpellScript(spell_snufflenose_commandSpellScript)
+ PrepareSpellScript(spell_snufflenose_commandSpellScript);
bool Load() override
{
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp
index 822e4356202..ac490b1440d 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp
@@ -247,7 +247,7 @@ class spell_egg_explosion : public SpellScriptLoader
class spell_egg_explosion_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_egg_explosion_SpellScript)
+ PrepareSpellScript(spell_egg_explosion_SpellScript);
void HandleAfterCast()
{
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
index 35086afa42e..21da920e4fd 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
@@ -545,7 +545,7 @@ public:
while (i != Stomach_Map.end())
{
//Check for valid player
- Unit* unit = Unit::GetUnit(*me, i->first);
+ Unit* unit = ObjectAccessor::GetUnit(*me, i->first);
//Only units out of stomach
if (unit && i->second == false)
@@ -640,7 +640,7 @@ public:
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE);
//Emerging phase
- //AttackStart(Unit::GetUnit(*me, HoldpPlayer));
+ //AttackStart(ObjectAccessor::GetUnit(*me, HoldpPlayer));
DoZoneInCombat();
//Place all units in threat list on outside of stomach
@@ -686,7 +686,7 @@ public:
while (i != Stomach_Map.end())
{
//Check for valid player
- Unit* unit = Unit::GetUnit(*me, i->first);
+ Unit* unit = ObjectAccessor::GetUnit(*me, i->first);
//Only move units in stomach
if (unit && i->second == true)
@@ -717,7 +717,7 @@ public:
while (i != Stomach_Map.end())
{
//Check for valid player
- Unit* unit = Unit::GetUnit(*me, i->first);
+ Unit* unit = ObjectAccessor::GetUnit(*me, i->first);
//Only apply to units in stomach
if (unit && i->second == true)
@@ -767,7 +767,7 @@ public:
if (StomachEnterVisTimer <= diff)
{
//Check for valid player
- Unit* unit = Unit::GetUnit(*me, StomachEnterTarget);
+ Unit* unit = ObjectAccessor::GetUnit(*me, StomachEnterTarget);
if (unit)
{
@@ -917,7 +917,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
- if (Unit* p = Unit::GetUnit(*me, Portal))
+ if (Unit* p = ObjectAccessor::GetUnit(*me, Portal))
p->Kill(p);
}
@@ -998,7 +998,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
- if (Unit* p = Unit::GetUnit(*me, Portal))
+ if (Unit* p = ObjectAccessor::GetUnit(*me, Portal))
p->Kill(p);
}
@@ -1026,7 +1026,7 @@ public:
{
if (EvadeTimer <= diff)
{
- if (Unit* p = Unit::GetUnit(*me, Portal))
+ if (Unit* p = ObjectAccessor::GetUnit(*me, Portal))
p->Kill(p);
//Dissapear and reappear at new position
@@ -1115,7 +1115,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
- if (Unit* p = Unit::GetUnit(*me, Portal))
+ if (Unit* p = ObjectAccessor::GetUnit(*me, Portal))
p->Kill(p);
}
@@ -1144,7 +1144,7 @@ public:
{
if (EvadeTimer <= diff)
{
- if (Unit* p = Unit::GetUnit(*me, Portal))
+ if (Unit* p = ObjectAccessor::GetUnit(*me, Portal))
p->Kill(p);
//Dissapear and reappear at new position
@@ -1234,7 +1234,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
- if (Unit* p = Unit::GetUnit(*me, Portal))
+ if (Unit* p = ObjectAccessor::GetUnit(*me, Portal))
p->Kill(p);
}
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp
index efb814dac73..51384cc117d 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp
@@ -215,7 +215,7 @@ class spell_skeram_arcane_explosion : public SpellScriptLoader
class spell_skeram_arcane_explosion_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_skeram_arcane_explosion_SpellScript)
+ PrepareSpellScript(spell_skeram_arcane_explosion_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets)
{
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp
index 6775d84d435..acf0215f9ff 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp
@@ -103,7 +103,7 @@ struct boss_twinemperorsAI : public ScriptedAI
Creature* GetOtherBoss()
{
- return Unit::GetCreature(*me, instance->GetData64(IAmVeklor() ? DATA_VEKNILASH : DATA_VEKLOR));
+ return ObjectAccessor::GetCreature(*me, instance->GetData64(IAmVeklor() ? DATA_VEKNILASH : DATA_VEKLOR));
}
void DamageTaken(Unit* /*done_by*/, uint32 &damage) override
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp
index aa9180d79c2..0614303515c 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp
@@ -132,7 +132,7 @@ public:
void SendMyListToBuddies()
{
for (int i=0; i<3; ++i)
- if (Creature* pNearby = Unit::GetCreature(*me, NearbyGUID[i]))
+ if (Creature* pNearby = ObjectAccessor::GetCreature(*me, NearbyGUID[i]))
GiveBuddyMyList(pNearby);
}
@@ -140,7 +140,7 @@ public:
{
for (int i=0; i<3; ++i)
{
- Creature* c = Unit::GetCreature(*me, NearbyGUID[i]);
+ Creature* c = ObjectAccessor::GetCreature(*me, NearbyGUID[i]);
if (c)
{
if (!c->IsInCombat())
@@ -195,7 +195,7 @@ public:
if (!NearbyGUID[bli])
break;
- Creature* pNearby = Unit::GetCreature(*me, NearbyGUID[bli]);
+ Creature* pNearby = ObjectAccessor::GetCreature(*me, NearbyGUID[bli]);
if (!pNearby)
break;
@@ -221,7 +221,7 @@ public:
{
if (!NearbyGUID[i])
continue;
- if (Creature* pNearby = Unit::GetCreature(*me, NearbyGUID[i]))
+ if (Creature* pNearby = ObjectAccessor::GetCreature(*me, NearbyGUID[i]))
{
if (pNearby->isDead())
pNearby->Respawn();
@@ -250,7 +250,7 @@ public:
{
for (int ni=0; ni<3; ++ni)
{
- Creature* sent = Unit::GetCreature(*me, NearbyGUID[ni]);
+ Creature* sent = ObjectAccessor::GetCreature(*me, NearbyGUID[ni]);
if (!sent)
continue;
if (sent->isDead())
diff --git a/src/server/scripts/Kalimdor/boss_azuregos.cpp b/src/server/scripts/Kalimdor/boss_azuregos.cpp
index 42d432f1642..db41213e94e 100644
--- a/src/server/scripts/Kalimdor/boss_azuregos.cpp
+++ b/src/server/scripts/Kalimdor/boss_azuregos.cpp
@@ -178,7 +178,7 @@ class spell_mark_of_frost : public SpellScriptLoader
class spell_mark_of_frost_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_mark_of_frost_SpellScript)
+ PrepareSpellScript(spell_mark_of_frost_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
diff --git a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp
index 67e3801f842..be70b2e9fa4 100644
--- a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp
+++ b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp
@@ -443,7 +443,7 @@ public:
uint32 NextStep(uint8 Step)
{
- Creature* Spark = Unit::GetCreature(*me, SparkGUID);
+ Creature* Spark = ObjectAccessor::GetCreature(*me, SparkGUID);
if (!Spark)
return 99999999;
diff --git a/src/server/scripts/Kalimdor/zone_durotar.cpp b/src/server/scripts/Kalimdor/zone_durotar.cpp
index 8d6ae347b85..358814d440a 100644
--- a/src/server/scripts/Kalimdor/zone_durotar.cpp
+++ b/src/server/scripts/Kalimdor/zone_durotar.cpp
@@ -447,7 +447,7 @@ class spell_mount_check : public SpellScriptLoader
class spell_mount_check_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_mount_check_AuraScript)
+ PrepareAuraScript(spell_mount_check_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -495,7 +495,7 @@ class spell_voljin_war_drums : public SpellScriptLoader
class spell_voljin_war_drums_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_voljin_war_drums_SpellScript)
+ PrepareSpellScript(spell_voljin_war_drums_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -552,7 +552,7 @@ class spell_voodoo : public SpellScriptLoader
class spell_voodoo_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_voodoo_SpellScript)
+ PrepareSpellScript(spell_voodoo_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
diff --git a/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp b/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp
index a96133dad16..aa9774bfd62 100644
--- a/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp
+++ b/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp
@@ -610,7 +610,7 @@ class spell_ooze_zap : public SpellScriptLoader
class spell_ooze_zap_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_ooze_zap_SpellScript)
+ PrepareSpellScript(spell_ooze_zap_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -657,7 +657,7 @@ class spell_ooze_zap_channel_end : public SpellScriptLoader
class spell_ooze_zap_channel_end_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_ooze_zap_channel_end_SpellScript)
+ PrepareSpellScript(spell_ooze_zap_channel_end_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -693,7 +693,7 @@ class spell_energize_aoe : public SpellScriptLoader
class spell_energize_aoe_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_energize_aoe_SpellScript)
+ PrepareSpellScript(spell_energize_aoe_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
diff --git a/src/server/scripts/Kalimdor/zone_feralas.cpp b/src/server/scripts/Kalimdor/zone_feralas.cpp
index 8baa02e72b3..fa5336df1f3 100644
--- a/src/server/scripts/Kalimdor/zone_feralas.cpp
+++ b/src/server/scripts/Kalimdor/zone_feralas.cpp
@@ -215,7 +215,7 @@ class spell_gordunni_trap : public SpellScriptLoader
class spell_gordunni_trap_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gordunni_trap_SpellScript)
+ PrepareSpellScript(spell_gordunni_trap_SpellScript);
void HandleDummy()
{
diff --git a/src/server/scripts/Kalimdor/zone_silithus.cpp b/src/server/scripts/Kalimdor/zone_silithus.cpp
index 42ab3d8d9cf..04cec70b7ad 100644
--- a/src/server/scripts/Kalimdor/zone_silithus.cpp
+++ b/src/server/scripts/Kalimdor/zone_silithus.cpp
@@ -706,7 +706,7 @@ public:
break;
case 65:
me->SetVisible(false);
- if (Creature* AnachronosQuestTrigger = (Unit::GetCreature(*me, AnachronosQuestTriggerGUID)))
+ if (Creature* AnachronosQuestTrigger = (ObjectAccessor::GetCreature(*me, AnachronosQuestTriggerGUID)))
{
Talk(ARYGOS_YELL_1);
AnachronosQuestTrigger->AI()->EnterEvadeMode();
@@ -1002,7 +1002,7 @@ void npc_qiraj_war_spawn::npc_qiraj_war_spawnAI::JustDied(Unit* /*slayer*/)
if (!MobGUID)
return;
- if (Creature* mob = Unit::GetCreature(*me, MobGUID))
+ if (Creature* mob = ObjectAccessor::GetCreature(*me, MobGUID))
if (npc_anachronos_quest_trigger::npc_anachronos_quest_triggerAI* triggerAI = CAST_AI(npc_anachronos_quest_trigger::npc_anachronos_quest_triggerAI, mob->AI()))
triggerAI->LiveCounter();
diff --git a/src/server/scripts/Kalimdor/zone_tanaris.cpp b/src/server/scripts/Kalimdor/zone_tanaris.cpp
index 4ac4e502363..23e8e2f26ff 100644
--- a/src/server/scripts/Kalimdor/zone_tanaris.cpp
+++ b/src/server/scripts/Kalimdor/zone_tanaris.cpp
@@ -584,7 +584,7 @@ public:
{
PostEventTimer = 5000;
- Creature* torta = Creature::GetCreature(*me, TortaGUID);
+ Creature* torta = ObjectAccessor::GetCreature(*me, TortaGUID);
if (!torta || !torta->IsAlive())
{
//something happened, so just complete
diff --git a/src/server/scripts/Kalimdor/zone_the_barrens.cpp b/src/server/scripts/Kalimdor/zone_the_barrens.cpp
index ae8c279947d..dabfee00065 100644
--- a/src/server/scripts/Kalimdor/zone_the_barrens.cpp
+++ b/src/server/scripts/Kalimdor/zone_the_barrens.cpp
@@ -380,7 +380,7 @@ public:
{
if (AffrayChallenger[i])
{
- Creature* creature = Unit::GetCreature((*me), AffrayChallenger[i]);
+ Creature* creature = ObjectAccessor::GetCreature((*me), AffrayChallenger[i]);
if (creature && creature->IsAlive())
creature->DisappearAndDie();
}
@@ -388,7 +388,7 @@ public:
if (BigWill) // unsummon bigWill
{
- Creature* creature = Unit::GetCreature((*me), BigWill);
+ Creature* creature = ObjectAccessor::GetCreature((*me), BigWill);
if (creature && creature->IsAlive())
creature->DisappearAndDie();
}
@@ -429,7 +429,7 @@ public:
{
if (AffrayChallenger[i])
{
- Creature* creature = Unit::GetCreature((*me), AffrayChallenger[i]);
+ Creature* creature = ObjectAccessor::GetCreature((*me), AffrayChallenger[i]);
if ((!creature || (!creature->IsAlive())) && !ChallengerDown[i])
{
Talk(SAY_TWIGGY_FLATHEAD_DOWN);
diff --git a/src/server/scripts/Kalimdor/zone_ungoro_crater.cpp b/src/server/scripts/Kalimdor/zone_ungoro_crater.cpp
index d6d45d72f5b..09f82b0417c 100644
--- a/src/server/scripts/Kalimdor/zone_ungoro_crater.cpp
+++ b/src/server/scripts/Kalimdor/zone_ungoro_crater.cpp
@@ -270,7 +270,7 @@ public:
{
if (EndEventTimer <= Diff)
{
- Creature* spraggle = Creature::GetCreature(*me, SpraggleGUID);
+ Creature* spraggle = ObjectAccessor::GetCreature(*me, SpraggleGUID);
if (!spraggle || !spraggle->IsAlive())
{
SetFollowComplete();
diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp
index 63827c48f44..ab142c1375c 100644
--- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp
@@ -267,7 +267,7 @@ public:
class spell_elder_nadox_guardian_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_elder_nadox_guardian_SpellScript)
+ PrepareSpellScript(spell_elder_nadox_guardian_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets)
{
diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp
index 09fdbcbce70..1c042f4d185 100644
--- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp
@@ -211,7 +211,7 @@ public:
// Check if all summons in this phase killed
for (SummonList::const_iterator iter = Summons.begin(); iter != Summons.end(); ++iter)
{
- if (Creature* visage = Unit::GetCreature(*me, *iter))
+ if (Creature* visage = ObjectAccessor::GetCreature(*me, *iter))
{
// Not all are dead
if (phase == visage->GetPhaseMask())
diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp
index aab0f22169f..b78bdae5c87 100644
--- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp
@@ -212,7 +212,7 @@ public:
}
else
{
- if (Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_PL_JEDOGA_TARGET)))
+ if (Unit* target = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_PL_JEDOGA_TARGET)))
{
AttackStart(target);
instance->SetData(DATA_JEDOGA_RESET_INITIANDS, 0);
diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp
index f392bea327b..e3156e21371 100644
--- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp
@@ -417,7 +417,7 @@ class spell_prince_taldaram_conjure_flame_sphere : public SpellScriptLoader
class spell_prince_taldaram_conjure_flame_sphere_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_prince_taldaram_conjure_flame_sphere_SpellScript)
+ PrepareSpellScript(spell_prince_taldaram_conjure_flame_sphere_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -460,7 +460,7 @@ class spell_prince_taldaram_flame_sphere_summon : public SpellScriptLoader
class spell_prince_taldaram_flame_sphere_summon_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_prince_taldaram_flame_sphere_summon_SpellScript)
+ PrepareSpellScript(spell_prince_taldaram_flame_sphere_summon_SpellScript);
void SetDest(SpellDestination& dest)
{
diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp
index a4c3edb85f3..bf5855c3318 100644
--- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp
@@ -188,7 +188,7 @@ public:
}
break;
case IMPALE_PHASE_ATTACK:
- if (Creature* impaleTarget = Unit::GetCreature(*me, ImpaleTarget))
+ if (Creature* impaleTarget = ObjectAccessor::GetCreature(*me, ImpaleTarget))
{
impaleTarget->CastSpell(impaleTarget, SPELL_IMPALE_SPIKE, false);
impaleTarget->RemoveAurasDueToSpell(SPELL_IMPALE_SHAKEGROUND);
@@ -197,7 +197,7 @@ public:
ImpaleTimer = 1*IN_MILLISECONDS;
break;
case IMPALE_PHASE_DMG:
- if (Creature* impaleTarget = Unit::GetCreature(*me, ImpaleTarget))
+ if (Creature* impaleTarget = ObjectAccessor::GetCreature(*me, ImpaleTarget))
me->CastSpell(impaleTarget, SPELL_IMPALE_DMG, true);
ImpalePhase = IMPALE_PHASE_TARGET;
ImpaleTimer = 9*IN_MILLISECONDS;
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp
index 12c3c580cae..81e124cf5bc 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp
@@ -178,15 +178,15 @@ public:
Talk(SAY_SARTHARION_DEATH);
_JustDied();
- if (Creature* tenebron = Unit::GetCreature(*me, instance->GetData64(DATA_TENEBRON)))
+ if (Creature* tenebron = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_TENEBRON)))
if (tenebron->IsAlive())
tenebron->DisappearAndDie();
- if (Creature* shadron = Unit::GetCreature(*me, instance->GetData64(DATA_SHADRON)))
+ if (Creature* shadron = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_SHADRON)))
if (shadron->IsAlive())
shadron->DisappearAndDie();
- if (Creature* vesperon = Unit::GetCreature(*me, instance->GetData64(DATA_VESPERON)))
+ if (Creature* vesperon = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_VESPERON)))
if (vesperon->IsAlive())
vesperon->DisappearAndDie();
}
@@ -211,7 +211,7 @@ public:
void DrakeRespawn() // Drakes respawning system
{
- if (Creature* tenebron = Unit::GetCreature(*me, instance->GetData64(DATA_TENEBRON)))
+ if (Creature* tenebron = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_TENEBRON)))
{
tenebron->SetHomePosition(3239.07f, 657.235f, 86.8775f, 4.74729f);
if (tenebron->IsAlive())
@@ -231,7 +231,7 @@ public:
}
}
- if (Creature* shadron = Unit::GetCreature(*me, instance->GetData64(DATA_SHADRON)))
+ if (Creature* shadron = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_SHADRON)))
{
shadron->SetHomePosition(3363.06f, 525.28f, 98.362f, 4.76475f);
if (shadron->IsAlive())
@@ -251,7 +251,7 @@ public:
}
}
- if (Creature* vesperon = Unit::GetCreature(*me, instance->GetData64(DATA_VESPERON)))
+ if (Creature* vesperon = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_VESPERON)))
{
vesperon->SetHomePosition(3145.68f, 520.71f, 89.7f, 4.64258f);
if (vesperon->IsAlive())
@@ -280,7 +280,7 @@ public:
//if at least one of the dragons are alive and are being called
bool _canUseWill = false;
- if (Creature* fetchTene = Unit::GetCreature(*me, instance->GetData64(DATA_TENEBRON)))
+ if (Creature* fetchTene = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_TENEBRON)))
{
if (fetchTene->IsAlive() && !fetchTene->GetVictim())
{
@@ -298,7 +298,7 @@ public:
}
}
- if (Creature* fetchShad = Unit::GetCreature(*me, instance->GetData64(DATA_SHADRON)))
+ if (Creature* fetchShad = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_SHADRON)))
{
if (fetchShad->IsAlive() && !fetchShad->GetVictim())
{
@@ -316,7 +316,7 @@ public:
}
}
- if (Creature* fetchVesp = Unit::GetCreature(*me, instance->GetData64(DATA_VESPERON)))
+ if (Creature* fetchVesp = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_VESPERON)))
{
if (fetchVesp && fetchVesp->IsAlive() && !fetchVesp->GetVictim())
{
@@ -340,7 +340,7 @@ public:
void CallDragon(uint32 dataId)
{
- if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(dataId)))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetData64(dataId)))
{
if (temp->IsAlive() && !temp->GetVictim())
{
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp
index 5eae42d2abd..69605574f86 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp
@@ -312,7 +312,7 @@ class spell_baltharus_enervating_brand_trigger : public SpellScriptLoader
class spell_baltharus_enervating_brand_trigger_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_baltharus_enervating_brand_trigger_SpellScript)
+ PrepareSpellScript(spell_baltharus_enervating_brand_trigger_SpellScript);
void CheckDistance()
{
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp
index e4167fc28ad..f352b4faace 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp
@@ -1342,7 +1342,7 @@ class spell_halion_meteor_strike_marker : public SpellScriptLoader
class spell_halion_meteor_strike_marker_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_halion_meteor_strike_marker_AuraScript)
+ PrepareAuraScript(spell_halion_meteor_strike_marker_AuraScript);
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -1373,7 +1373,7 @@ class spell_halion_combustion_consumption : public SpellScriptLoader
class spell_halion_combustion_consumption_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_halion_combustion_consumption_AuraScript)
+ PrepareAuraScript(spell_halion_combustion_consumption_AuraScript);
public:
spell_halion_combustion_consumption_AuraScript(uint32 spellID) : AuraScript(), _markSpell(spellID) { }
@@ -1431,7 +1431,7 @@ class spell_halion_marks : public SpellScriptLoader
class spell_halion_marks_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_halion_marks_AuraScript)
+ PrepareAuraScript(spell_halion_marks_AuraScript);
public:
spell_halion_marks_AuraScript(uint32 summonSpell, uint32 removeSpell) : AuraScript(),
@@ -1491,7 +1491,7 @@ class spell_halion_damage_aoe_summon : public SpellScriptLoader
class spell_halion_damage_aoe_summon_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_halion_damage_aoe_summon_SpellScript)
+ PrepareSpellScript(spell_halion_damage_aoe_summon_SpellScript);
void HandleSummon(SpellEffIndex effIndex)
{
@@ -1528,7 +1528,7 @@ class spell_halion_twilight_realm_handlers : public SpellScriptLoader
class spell_halion_twilight_realm_handlers_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_halion_twilight_realm_handlers_AuraScript)
+ PrepareAuraScript(spell_halion_twilight_realm_handlers_AuraScript);
public:
spell_halion_twilight_realm_handlers_AuraScript(uint32 beforeHitSpell, bool isApplyHandler) : AuraScript(),
@@ -1592,7 +1592,7 @@ class spell_halion_clear_debuffs : public SpellScriptLoader
class spell_halion_clear_debuffs_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_halion_clear_debuffs_SpellScript)
+ PrepareSpellScript(spell_halion_clear_debuffs_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -1643,7 +1643,7 @@ class spell_halion_twilight_cutter : public SpellScriptLoader
class spell_halion_twilight_cutter_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_halion_twilight_cutter_SpellScript)
+ PrepareSpellScript(spell_halion_twilight_cutter_SpellScript);
void RemoveNotBetween(std::list<WorldObject*>& unitList)
{
@@ -1680,7 +1680,7 @@ class spell_halion_twilight_phasing : public SpellScriptLoader
class spell_halion_twilight_phasing_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_halion_twilight_phasing_SpellScript)
+ PrepareSpellScript(spell_halion_twilight_phasing_SpellScript);
void Phase()
{
@@ -1709,7 +1709,7 @@ class spell_halion_summon_exit_portals : public SpellScriptLoader
class spell_halion_summon_exit_portals_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_halion_summon_exit_portals_SpellScript)
+ PrepareSpellScript(spell_halion_summon_exit_portals_SpellScript);
void SetDest0(SpellDestination& dest)
{
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp
index eab099ccabe..199337b0631 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp
@@ -221,7 +221,7 @@ class spell_saviana_conflagration_init : public SpellScriptLoader
class spell_saviana_conflagration_init_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_saviana_conflagration_init_SpellScript)
+ PrepareSpellScript(spell_saviana_conflagration_init_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets)
{
@@ -258,7 +258,7 @@ class spell_saviana_conflagration_throwback : public SpellScriptLoader
class spell_saviana_conflagration_throwback_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_saviana_conflagration_throwback_SpellScript)
+ PrepareSpellScript(spell_saviana_conflagration_throwback_SpellScript);
void HandleScript(SpellEffIndex effIndex)
{
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 99390da7dcd..7e9e351ae9c 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp
@@ -128,7 +128,7 @@ class spell_eadric_radiance : public SpellScriptLoader
spell_eadric_radiance() : SpellScriptLoader("spell_eadric_radiance") { }
class spell_eadric_radiance_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_eadric_radiance_SpellScript)
+ PrepareSpellScript(spell_eadric_radiance_SpellScript);
void FilterTargets(std::list<WorldObject*>& unitList)
{
@@ -292,7 +292,7 @@ public:
bHealth = false;
bDone = false;
- if (Creature* pMemory = Unit::GetCreature(*me, MemoryGUID))
+ if (Creature* pMemory = ObjectAccessor::GetCreature(*me, MemoryGUID))
if (pMemory->IsAlive())
pMemory->RemoveFromWorld();
}
@@ -373,7 +373,7 @@ public:
DoCast(me, SPELL_RENEW);
break;
case 1:
- if (Creature* pMemory = Unit::GetCreature(*me, MemoryGUID))
+ if (Creature* pMemory = ObjectAccessor::GetCreature(*me, MemoryGUID))
if (pMemory->IsAlive())
DoCast(pMemory, SPELL_RENEW);
break;
@@ -627,7 +627,7 @@ class spell_paletress_summon_memory : public SpellScriptLoader
class spell_paletress_summon_memory_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_paletress_summon_memory_SpellScript)
+ PrepareSpellScript(spell_paletress_summon_memory_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp
index 46817e46512..a8aff70b034 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp
@@ -140,7 +140,7 @@ public:
for (std::list<uint64>::const_iterator itr = SummonList.begin(); itr != SummonList.end(); ++itr)
{
- if (Creature* temp = Unit::GetCreature(*me, *itr))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, *itr))
if (temp)
temp->DisappearAndDie();
}
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp
index 2b1d582bcd4..2e24398d49a 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp
@@ -126,9 +126,9 @@ bool GrandChampionsOutVehicle(Creature* me)
if (!instance)
return false;
- Creature* pGrandChampion1 = Unit::GetCreature(*me, instance->GetData64(DATA_GRAND_CHAMPION_1));
- Creature* pGrandChampion2 = Unit::GetCreature(*me, instance->GetData64(DATA_GRAND_CHAMPION_2));
- Creature* pGrandChampion3 = Unit::GetCreature(*me, instance->GetData64(DATA_GRAND_CHAMPION_3));
+ Creature* pGrandChampion1 = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_GRAND_CHAMPION_1));
+ Creature* pGrandChampion2 = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_GRAND_CHAMPION_2));
+ Creature* pGrandChampion3 = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_GRAND_CHAMPION_3));
if (pGrandChampion1 && pGrandChampion2 && pGrandChampion3)
{
@@ -829,7 +829,7 @@ public:
if (bShoot && uiMultiShotTimer <= uiDiff)
{
me->InterruptNonMeleeSpells(true);
- Unit* target = Unit::GetUnit(*me, uiTargetGUID);
+ Unit* target = ObjectAccessor::GetUnit(*me, uiTargetGUID);
if (target && me->IsInRange(target, 5.0f, 30.0f, false))
{
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp
index faeb92e4595..e22ee040599 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp
@@ -161,7 +161,7 @@ public:
}
for (std::list<uint64>::const_iterator itr = TempList.begin(); itr != TempList.end(); ++itr)
- if (Creature* summon = Unit::GetCreature(*me, *itr))
+ if (Creature* summon = ObjectAccessor::GetCreature(*me, *itr))
AggroAllPlayers(summon);
}else if (uiLesserChampions == 9)
StartGrandChampionsAttack();
@@ -173,9 +173,9 @@ public:
void StartGrandChampionsAttack()
{
- Creature* pGrandChampion1 = Unit::GetCreature(*me, uiVehicle1GUID);
- Creature* pGrandChampion2 = Unit::GetCreature(*me, uiVehicle2GUID);
- Creature* pGrandChampion3 = Unit::GetCreature(*me, uiVehicle3GUID);
+ Creature* pGrandChampion1 = ObjectAccessor::GetCreature(*me, uiVehicle1GUID);
+ Creature* pGrandChampion2 = ObjectAccessor::GetCreature(*me, uiVehicle2GUID);
+ Creature* pGrandChampion3 = ObjectAccessor::GetCreature(*me, uiVehicle3GUID);
if (pGrandChampion1 && pGrandChampion2 && pGrandChampion3)
{
@@ -417,7 +417,7 @@ public:
if (!Champion1List.empty())
{
for (std::list<uint64>::const_iterator itr = Champion1List.begin(); itr != Champion1List.end(); ++itr)
- if (Creature* summon = Unit::GetCreature(*me, *itr))
+ if (Creature* summon = ObjectAccessor::GetCreature(*me, *itr))
AggroAllPlayers(summon);
NextStep(0, false);
}
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp
index 355e3cade4d..6a664ec7f8d 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp
@@ -344,7 +344,7 @@ class boss_anubarak_trial : public CreatureScript
uint32 at = urand(0, _burrowGUID.size()-1);
for (uint32 k = 0; k < at; k++)
++i;
- if (Creature* pBurrow = Unit::GetCreature(*me, *i))
+ if (Creature* pBurrow = ObjectAccessor::GetCreature(*me, *i))
pBurrow->CastSpell(pBurrow, 66340, false);
events.ScheduleEvent(EVENT_SUMMON_SCARAB, 4*IN_MILLISECONDS, 0, PHASE_SUBMERGED);
@@ -377,7 +377,7 @@ class boss_anubarak_trial : public CreatureScript
uint8 i = startAt;
do
{
- if (Unit* pSphere = Unit::GetCreature(*me, _sphereGUID[i]))
+ if (Unit* pSphere = ObjectAccessor::GetCreature(*me, _sphereGUID[i]))
{
if (!pSphere->HasAura(SPELL_FROST_SPHERE))
{
@@ -815,7 +815,7 @@ class spell_impale : public SpellScriptLoader
class spell_impale_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_impale_SpellScript)
+ PrepareSpellScript(spell_impale_SpellScript);
void HandleDamageCalc(SpellEffIndex /*effIndex*/)
{
@@ -846,7 +846,7 @@ class spell_anubarak_leeching_swarm : public SpellScriptLoader
class spell_anubarak_leeching_swarm_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_anubarak_leeching_swarm_AuraScript)
+ PrepareAuraScript(spell_anubarak_leeching_swarm_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override
{
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
index 5cdce96d5ae..77697cdb3e8 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
@@ -479,7 +479,7 @@ class boss_toc_champion_controller : public CreatureScript
case 1:
for (std::list<uint64>::iterator i = _summons.begin(); i != _summons.end(); ++i)
{
- if (Creature* temp = Unit::GetCreature(*me, *i))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, *i))
{
temp->SetReactState(REACT_AGGRESSIVE);
temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC);
@@ -559,7 +559,7 @@ struct boss_faction_championsAI : public BossAI
void JustReachedHome() override
{
- if (Creature* pChampionController = Unit::GetCreature((*me), instance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
+ if (Creature* pChampionController = ObjectAccessor::GetCreature((*me), instance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
pChampionController->AI()->SetData(2, FAIL);
me->DespawnOrUnsummon();
}
@@ -577,7 +577,7 @@ struct boss_faction_championsAI : public BossAI
std::list<HostileReference*> const& tList = me->getThreatManager().getThreatList();
for (std::list<HostileReference*>::const_iterator itr = tList.begin(); itr != tList.end(); ++itr)
{
- Unit* unit = Unit::GetUnit(*me, (*itr)->getUnitGuid());
+ Unit* unit = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid());
if (unit && me->getThreatManager().getThreat(unit))
{
if (unit->GetTypeId() == TYPEID_PLAYER)
@@ -609,7 +609,7 @@ struct boss_faction_championsAI : public BossAI
void JustDied(Unit* /*killer*/) override
{
if (_aiType != AI_PET)
- if (Creature* pChampionController = Unit::GetCreature((*me), instance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
+ if (Creature* pChampionController = ObjectAccessor::GetCreature((*me), instance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
pChampionController->AI()->SetData(2, DONE);
}
@@ -617,7 +617,7 @@ struct boss_faction_championsAI : public BossAI
{
DoCast(me, SPELL_ANTI_AOE, true);
_EnterCombat();
- if (Creature* pChampionController = Unit::GetCreature((*me), instance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
+ if (Creature* pChampionController = ObjectAccessor::GetCreature((*me), instance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
pChampionController->AI()->SetData(2, IN_PROGRESS);
}
@@ -634,11 +634,11 @@ struct boss_faction_championsAI : public BossAI
if (TeamInInstance == ALLIANCE)
{
- if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(NPC_VARIAN)))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_VARIAN)))
temp->AI()->Talk(SAY_KILL_PLAYER);
}
else
- if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(NPC_GARROSH)))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_GARROSH)))
temp->AI()->Talk(SAY_KILL_PLAYER);
@@ -663,7 +663,7 @@ struct boss_faction_championsAI : public BossAI
Unit* target;
for (iter = tList.begin(); iter!=tList.end(); ++iter)
{
- target = Unit::GetUnit(*me, (*iter)->getUnitGuid());
+ target = ObjectAccessor::GetUnit(*me, (*iter)->getUnitGuid());
if (target && target->getPowerType() == POWER_MANA)
return target;
}
@@ -678,7 +678,7 @@ struct boss_faction_championsAI : public BossAI
Unit* target;
for (iter = tList.begin(); iter != tList.end(); ++iter)
{
- target = Unit::GetUnit(*me, (*iter)->getUnitGuid());
+ target = ObjectAccessor::GetUnit(*me, (*iter)->getUnitGuid());
if (target && me->GetDistance2d(target) < distance)
++count;
}
@@ -2232,7 +2232,7 @@ class spell_faction_champion_warl_unstable_affliction : public SpellScriptLoader
class spell_faction_champion_warl_unstable_affliction_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_faction_champion_warl_unstable_affliction_AuraScript)
+ PrepareAuraScript(spell_faction_champion_warl_unstable_affliction_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -2266,7 +2266,7 @@ class spell_faction_champion_death_grip : public SpellScriptLoader
class spell_faction_champion_death_grip_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_faction_champion_death_grip_SpellScript)
+ PrepareSpellScript(spell_faction_champion_death_grip_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -2304,7 +2304,7 @@ class spell_toc_bloodlust : public SpellScriptLoader
class spell_toc_bloodlust_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_toc_bloodlust_SpellScript)
+ PrepareSpellScript(spell_toc_bloodlust_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -2345,7 +2345,7 @@ class spell_toc_heroism : public SpellScriptLoader
class spell_toc_heroism_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_toc_heroism_SpellScript)
+ PrepareSpellScript(spell_toc_heroism_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
index 6acaf4895ec..c0f7b2f1856 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
@@ -495,7 +495,7 @@ class spell_mistress_kiss : public SpellScriptLoader
class spell_mistress_kiss_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_mistress_kiss_AuraScript)
+ PrepareAuraScript(spell_mistress_kiss_AuraScript);
bool Load() override
{
@@ -553,7 +553,7 @@ class spell_mistress_kiss_area : public SpellScriptLoader
class spell_mistress_kiss_area_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_mistress_kiss_area_SpellScript)
+ PrepareSpellScript(spell_mistress_kiss_area_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets)
{
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp
index 63236d68f58..9e75bef9735 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp
@@ -508,7 +508,7 @@ struct boss_jormungarAI : public BossAI
void JustDied(Unit* /*killer*/) override
{
- if (Creature* otherWorm = Unit::GetCreature(*me, instance->GetData64(OtherWormEntry)))
+ if (Creature* otherWorm = ObjectAccessor::GetCreature(*me, instance->GetData64(OtherWormEntry)))
{
if (!otherWorm->IsAlive())
{
@@ -819,7 +819,7 @@ class spell_gormok_fire_bomb : public SpellScriptLoader
class spell_gormok_fire_bomb_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gormok_fire_bomb_SpellScript)
+ PrepareSpellScript(spell_gormok_fire_bomb_SpellScript);
void TriggerFireBomb(SpellEffIndex /*effIndex*/)
{
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp
index 8176422eed6..e40cd9d5f41 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp
@@ -245,7 +245,7 @@ struct boss_twin_baseAI : public BossAI
// Called when sister pointer needed
Creature* GetSister()
{
- return Unit::GetCreature((*me), instance->GetData64(SisterNpcId));
+ return ObjectAccessor::GetCreature((*me), instance->GetData64(SisterNpcId));
}
void EnterCombat(Unit* /*who*/) override
@@ -673,8 +673,7 @@ class spell_powering_up : public SpellScriptLoader
class spell_powering_up_SpellScript : public SpellScript
{
- public:
- PrepareSpellScript(spell_powering_up_SpellScript)
+ PrepareSpellScript(spell_powering_up_SpellScript);
uint32 spellId;
uint32 poweringUp;
@@ -731,7 +730,7 @@ class spell_valkyr_essences : public SpellScriptLoader
class spell_valkyr_essences_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_valkyr_essences_AuraScript)
+ PrepareAuraScript(spell_valkyr_essences_AuraScript);
uint32 spellId;
@@ -826,7 +825,7 @@ class spell_power_of_the_twins : public SpellScriptLoader
class spell_power_of_the_twins_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_power_of_the_twins_AuraScript)
+ PrepareAuraScript(spell_power_of_the_twins_AuraScript);
bool Load() override
{
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 64afe8d5b2e..7cab84ee4a7 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
@@ -95,7 +95,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript
// make sure Anub'arak isnt missing and floor is destroyed after a crash
if (GetBossState(BOSS_LICH_KING) == DONE && TrialCounter && GetBossState(BOSS_ANUBARAK) != DONE)
{
- Creature* anubArak = Unit::GetCreature(*player, GetData64(NPC_ANUBARAK));
+ Creature* anubArak = ObjectAccessor::GetCreature(*player, GetData64(NPC_ANUBARAK));
if (!anubArak)
anubArak = player->SummonCreature(NPC_ANUBARAK, AnubarakLoc[0].GetPositionX(), AnubarakLoc[0].GetPositionY(), AnubarakLoc[0].GetPositionZ(), 3, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp
index 74e4f4caa9d..11548ba4b1c 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp
@@ -173,7 +173,7 @@ class npc_announcer_toc10 : public CreatureScript
else if (instance->GetBossState(BOSS_JARAXXUS) != DONE)
{
// if Jaraxxus is spawned, but the raid wiped
- if (Creature* jaraxxus = Unit::GetCreature(*player, instance->GetData64(NPC_JARAXXUS)))
+ if (Creature* jaraxxus = ObjectAccessor::GetCreature(*player, instance->GetData64(NPC_JARAXXUS)))
{
jaraxxus->RemoveAurasDueToSpell(SPELL_JARAXXUS_CHAINS);
jaraxxus->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
@@ -207,7 +207,7 @@ class npc_announcer_toc10 : public CreatureScript
creature->CastSpell(creature, SPELL_CORPSE_TELEPORT, false);
creature->CastSpell(creature, SPELL_DESTROY_FLOOR_KNOCKUP, false);
- Creature* anubArak = Unit::GetCreature(*creature, instance->GetData64(NPC_ANUBARAK));
+ Creature* anubArak = ObjectAccessor::GetCreature(*creature, instance->GetData64(NPC_ANUBARAK));
if (!anubArak || !anubArak->IsAlive())
anubArak = creature->SummonCreature(NPC_ANUBARAK, AnubarakLoc[0].GetPositionX(), AnubarakLoc[0].GetPositionY(), AnubarakLoc[0].GetPositionZ(), 3, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);
@@ -330,7 +330,7 @@ class boss_lich_king_toc : public CreatureScript
me->CastSpell(me, SPELL_DESTROY_FLOOR_KNOCKUP, false);
_instance->SetBossState(BOSS_LICH_KING, DONE);
- Creature* temp = Unit::GetCreature(*me, _instance->GetData64(NPC_ANUBARAK));
+ Creature* temp = ObjectAccessor::GetCreature(*me, _instance->GetData64(NPC_ANUBARAK));
if (!temp || !temp->IsAlive())
temp = me->SummonCreature(NPC_ANUBARAK, AnubarakLoc[0].GetPositionX(), AnubarakLoc[0].GetPositionY(), AnubarakLoc[0].GetPositionZ(), 3, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);
@@ -377,7 +377,7 @@ class npc_fizzlebang_toc : public CreatureScript
{
Talk(SAY_STAGE_1_06, killer);
_instance->SetData(TYPE_EVENT, 1180);
- if (Creature* temp = Unit::GetCreature(*me, _instance->GetData64(NPC_JARAXXUS)))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, _instance->GetData64(NPC_JARAXXUS)))
{
temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
temp->SetReactState(REACT_AGGRESSIVE);
@@ -484,23 +484,23 @@ class npc_fizzlebang_toc : public CreatureScript
_updateTimer = 5*IN_MILLISECONDS;
break;
case 1142:
- if (Creature* temp = Unit::GetCreature(*me, _instance->GetData64(NPC_JARAXXUS)))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, _instance->GetData64(NPC_JARAXXUS)))
temp->SetTarget(me->GetGUID());
- if (Creature* pTrigger = Unit::GetCreature(*me, _triggerGUID))
+ if (Creature* pTrigger = ObjectAccessor::GetCreature(*me, _triggerGUID))
pTrigger->DespawnOrUnsummon();
- if (Creature* pPortal = Unit::GetCreature(*me, _portalGUID))
+ if (Creature* pPortal = ObjectAccessor::GetCreature(*me, _portalGUID))
pPortal->DespawnOrUnsummon();
_instance->SetData(TYPE_EVENT, 1144);
_updateTimer = 10*IN_MILLISECONDS;
break;
case 1144:
- if (Creature* temp = Unit::GetCreature(*me, _instance->GetData64(NPC_JARAXXUS)))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, _instance->GetData64(NPC_JARAXXUS)))
temp->AI()->Talk(SAY_STAGE_1_05);
_instance->SetData(TYPE_EVENT, 1150);
_updateTimer = 5*IN_MILLISECONDS;
break;
case 1150:
- if (Creature* temp = Unit::GetCreature(*me, _instance->GetData64(NPC_JARAXXUS)))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, _instance->GetData64(NPC_JARAXXUS)))
{
//1-shot Fizzlebang
temp->CastSpell(me, 67888, false);
@@ -699,7 +699,7 @@ class npc_tirion_toc : public CreatureScript
_instance->SetData(TYPE_EVENT, 3092);
break;
case 3092:
- if (Creature* pChampionController = Unit::GetCreature((*me), _instance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
+ if (Creature* pChampionController = ObjectAccessor::GetCreature((*me), _instance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
pChampionController->AI()->SetData(1, NOT_STARTED);
_instance->SetData(TYPE_EVENT, 3095);
break;
@@ -735,12 +735,12 @@ class npc_tirion_toc : public CreatureScript
break;
case 4015:
_instance->DoUseDoorOrButton(_instance->GetData64(GO_MAIN_GATE_DOOR));
- if (Creature* temp = Unit::GetCreature((*me), _instance->GetData64(NPC_LIGHTBANE)))
+ if (Creature* temp = ObjectAccessor::GetCreature((*me), _instance->GetData64(NPC_LIGHTBANE)))
{
temp->GetMotionMaster()->MovePoint(1, ToCCommonLoc[8].GetPositionX(), ToCCommonLoc[8].GetPositionY(), ToCCommonLoc[8].GetPositionZ());
temp->SetVisible(true);
}
- if (Creature* temp = Unit::GetCreature((*me), _instance->GetData64(NPC_DARKBANE)))
+ if (Creature* temp = ObjectAccessor::GetCreature((*me), _instance->GetData64(NPC_DARKBANE)))
{
temp->GetMotionMaster()->MovePoint(1, ToCCommonLoc[9].GetPositionX(), ToCCommonLoc[9].GetPositionY(), ToCCommonLoc[9].GetPositionZ());
temp->SetVisible(true);
@@ -779,7 +779,7 @@ class npc_tirion_toc : public CreatureScript
_instance->SetData(TYPE_EVENT, 6005);
break;
case 6005:
- if (Creature* tirionFordring = Unit::GetCreature((*me), _instance->GetData64(NPC_TIRION_FORDRING)))
+ if (Creature* tirionFordring = ObjectAccessor::GetCreature((*me), _instance->GetData64(NPC_TIRION_FORDRING)))
tirionFordring->AI()->Talk(SAY_STAGE_4_06);
_updateTimer = 20*IN_MILLISECONDS;
_instance->SetData(TYPE_EVENT, 6010);
@@ -787,7 +787,7 @@ class npc_tirion_toc : public CreatureScript
case 6010:
if (IsHeroic())
{
- if (Creature* tirionFordring = Unit::GetCreature((*me), _instance->GetData64(NPC_TIRION_FORDRING)))
+ if (Creature* tirionFordring = ObjectAccessor::GetCreature((*me), _instance->GetData64(NPC_TIRION_FORDRING)))
tirionFordring->AI()->Talk(SAY_STAGE_4_07);
_updateTimer = 1*MINUTE*IN_MILLISECONDS;
_instance->SetBossState(BOSS_ANUBARAK, SPECIAL);
diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp
index c67193fc11e..63b1359a406 100644
--- a/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp
+++ b/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp
@@ -314,7 +314,7 @@ public:
{
if (InstanceScript* instance = me->GetInstanceScript())
if (uint64 guid = instance->GetData64(DATA_NOVOS))
- if (Creature* novos = Creature::GetCreature(*me, guid))
+ if (Creature* novos = ObjectAccessor::GetCreature(*me, guid))
novos->AI()->JustSummoned(summon);
if (summon)
@@ -354,7 +354,7 @@ class spell_novos_summon_minions : public SpellScriptLoader
class spell_novos_summon_minions_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_novos_summon_minions_SpellScript)
+ PrepareSpellScript(spell_novos_summon_minions_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp
index 1b6cfceaf6c..77f026b1d3a 100644
--- a/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp
+++ b/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp
@@ -212,7 +212,7 @@ class spell_tharon_ja_clear_gift_of_tharon_ja : public SpellScriptLoader
class spell_tharon_ja_clear_gift_of_tharon_ja_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_tharon_ja_clear_gift_of_tharon_ja_SpellScript)
+ PrepareSpellScript(spell_tharon_ja_clear_gift_of_tharon_ja_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp
index 9ac087f5a45..13d968d9e06 100644
--- a/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp
+++ b/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp
@@ -219,7 +219,7 @@ class spell_trollgore_consume : public SpellScriptLoader
class spell_trollgore_consume_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_trollgore_consume_SpellScript)
+ PrepareSpellScript(spell_trollgore_consume_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -254,7 +254,7 @@ class spell_trollgore_corpse_explode : public SpellScriptLoader
class spell_trollgore_corpse_explode_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_trollgore_corpse_explode_AuraScript)
+ PrepareAuraScript(spell_trollgore_corpse_explode_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -297,7 +297,7 @@ class spell_trollgore_invader_taunt : public SpellScriptLoader
class spell_trollgore_invader_taunt_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_trollgore_invader_taunt_SpellScript)
+ PrepareSpellScript(spell_trollgore_invader_taunt_SpellScript);
bool Validate(SpellInfo const* spellInfo) override
{
diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp
index 526c412cfce..fe98f005bca 100644
--- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp
@@ -239,7 +239,7 @@ class spell_bronjahm_magic_bane : public SpellScriptLoader
class spell_bronjahm_magic_bane_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_bronjahm_magic_bane_SpellScript)
+ PrepareSpellScript(spell_bronjahm_magic_bane_SpellScript);
void RecalculateDamage()
{
@@ -273,7 +273,7 @@ class spell_bronjahm_consume_soul : public SpellScriptLoader
class spell_bronjahm_consume_soul_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_bronjahm_consume_soul_SpellScript)
+ PrepareSpellScript(spell_bronjahm_consume_soul_SpellScript);
void HandleScript(SpellEffIndex effIndex)
{
@@ -300,7 +300,7 @@ class spell_bronjahm_soulstorm_channel : public SpellScriptLoader
class spell_bronjahm_soulstorm_channel_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_bronjahm_soulstorm_channel_AuraScript)
+ PrepareAuraScript(spell_bronjahm_soulstorm_channel_AuraScript);
void HandlePeriodicTick(AuraEffect const* /*aurEff*/)
{
@@ -328,7 +328,7 @@ class spell_bronjahm_soulstorm_visual : public SpellScriptLoader
class spell_bronjahm_soulstorm_visual_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_bronjahm_soulstorm_visual_AuraScript)
+ PrepareAuraScript(spell_bronjahm_soulstorm_visual_AuraScript);
void HandlePeriodicTick(AuraEffect const* aurEff)
{
@@ -374,7 +374,7 @@ class spell_bronjahm_soulstorm_targeting : public SpellScriptLoader
class spell_bronjahm_soulstorm_targeting_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_bronjahm_soulstorm_targeting_SpellScript)
+ PrepareSpellScript(spell_bronjahm_soulstorm_targeting_SpellScript);
void FilterTargetsInitial(std::list<WorldObject*>& targets)
{
diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp
index 4c0e10780be..e64067fb995 100644
--- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp
@@ -357,7 +357,7 @@ class spell_devourer_of_souls_mirrored_soul : public SpellScriptLoader
class spell_devourer_of_souls_mirrored_soul_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_devourer_of_souls_mirrored_soul_SpellScript)
+ PrepareSpellScript(spell_devourer_of_souls_mirrored_soul_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -392,7 +392,7 @@ class spell_devourer_of_souls_mirrored_soul_proc : public SpellScriptLoader
class spell_devourer_of_souls_mirrored_soul_proc_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_devourer_of_souls_mirrored_soul_proc_AuraScript)
+ PrepareAuraScript(spell_devourer_of_souls_mirrored_soul_proc_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -439,7 +439,7 @@ class spell_devourer_of_souls_mirrored_soul_target_selector : public SpellScript
class spell_devourer_of_souls_mirrored_soul_target_selector_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_devourer_of_souls_mirrored_soul_target_selector_SpellScript)
+ PrepareSpellScript(spell_devourer_of_souls_mirrored_soul_target_selector_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp
index b18e5ea28c6..902a917c594 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp
@@ -139,7 +139,7 @@ class spell_marwyn_shared_suffering : public SpellScriptLoader
class spell_marwyn_shared_suffering_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_marwyn_shared_suffering_AuraScript)
+ PrepareAuraScript(spell_marwyn_shared_suffering_AuraScript);
void HandleEffectRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
{
diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
index 0c5514a1c0a..ccdd92ae4ba 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
@@ -2021,12 +2021,12 @@ class at_hor_waves_restarter : public AreaTriggerScript
{
_instance->ProcessEvent(0, EVENT_SPAWN_WAVES);
- if (Creature* falric = player->GetCreature(*player, _instance->GetData64(DATA_FALRIC)))
+ if (Creature* falric = ObjectAccessor::GetCreature(*player, _instance->GetData64(DATA_FALRIC)))
{
falric->CastSpell(falric, SPELL_BOSS_SPAWN_AURA, true);
falric->SetVisible(true);
}
- if (Creature* marwyn = player->GetCreature(*player, _instance->GetData64(DATA_MARWYN)))
+ if (Creature* marwyn = ObjectAccessor::GetCreature(*player, _instance->GetData64(DATA_MARWYN)))
{
marwyn->CastSpell(marwyn, SPELL_BOSS_SPAWN_AURA, true);
marwyn->SetVisible(true);
diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp
index 392d604c8f8..783f9e245c8 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp
@@ -113,7 +113,7 @@ class boss_garfrost : public CreatureScript
Talk(SAY_DEATH);
me->RemoveAllGameObjects();
- if (Creature* tyrannus = me->GetCreature(*me, instance->GetData64(DATA_TYRANNUS)))
+ if (Creature* tyrannus = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_TYRANNUS)))
tyrannus->AI()->Talk(SAY_TYRANNUS_DEATH);
}
@@ -246,7 +246,7 @@ class spell_garfrost_permafrost : public SpellScriptLoader
class spell_garfrost_permafrost_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_garfrost_permafrost_SpellScript)
+ PrepareSpellScript(spell_garfrost_permafrost_SpellScript);
bool Load() override
{
diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp
index c83c6cdaa50..1c126bc54fd 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp
@@ -362,7 +362,7 @@ class boss_krick : public CreatureScript
{
case EVENT_OUTRO_1:
{
- if (Creature* temp = me->GetCreature(*me, _instanceScript->GetData64(DATA_JAINA_SYLVANAS_1)))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, _instanceScript->GetData64(DATA_JAINA_SYLVANAS_1)))
temp->DespawnOrUnsummon();
Creature* jainaOrSylvanas = NULL;
@@ -410,7 +410,7 @@ class boss_krick : public CreatureScript
_events.ScheduleEvent(EVENT_OUTRO_6, 1000);
break;
case EVENT_OUTRO_6:
- if (Creature* tyrannus = me->GetCreature(*me, _instanceScript->GetData64(DATA_TYRANNUS_EVENT)))
+ if (Creature* tyrannus = ObjectAccessor::GetCreature(*me, _instanceScript->GetData64(DATA_TYRANNUS_EVENT)))
{
tyrannus->SetSpeed(MOVE_FLIGHT, 3.5f, true);
tyrannus->GetMotionMaster()->MovePoint(1, outroPos[4]);
@@ -504,7 +504,7 @@ class spell_krick_explosive_barrage : public SpellScriptLoader
class spell_krick_explosive_barrage_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_krick_explosive_barrage_AuraScript)
+ PrepareAuraScript(spell_krick_explosive_barrage_AuraScript);
void HandlePeriodicTick(AuraEffect const* /*aurEff*/)
{
@@ -539,7 +539,7 @@ class spell_ick_explosive_barrage : public SpellScriptLoader
class spell_ick_explosive_barrage_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_ick_explosive_barrage_AuraScript)
+ PrepareAuraScript(spell_ick_explosive_barrage_AuraScript);
void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -578,7 +578,7 @@ class spell_exploding_orb_hasty_grow : public SpellScriptLoader
class spell_exploding_orb_hasty_grow_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_exploding_orb_hasty_grow_AuraScript)
+ PrepareAuraScript(spell_exploding_orb_hasty_grow_AuraScript);
void OnStackChange(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -613,7 +613,7 @@ class spell_krick_pursuit : public SpellScriptLoader
class spell_krick_pursuit_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_krick_pursuit_SpellScript)
+ PrepareSpellScript(spell_krick_pursuit_SpellScript);
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
{
@@ -639,7 +639,7 @@ class spell_krick_pursuit : public SpellScriptLoader
class spell_krick_pursuit_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_krick_pursuit_AuraScript)
+ PrepareAuraScript(spell_krick_pursuit_AuraScript);
void HandleExtraEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -672,7 +672,7 @@ class spell_krick_pursuit_confusion : public SpellScriptLoader
class spell_krick_pursuit_confusion_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_krick_pursuit_confusion_AuraScript)
+ PrepareAuraScript(spell_krick_pursuit_confusion_AuraScript);
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp
index fd5fda682be..c4f46136bd9 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp
@@ -25,12 +25,12 @@
enum Yells
{
- //Gorkun
+ // Gorkun
SAY_GORKUN_INTRO_2 = 0,
SAY_GORKUN_OUTRO_1 = 1,
SAY_GORKUN_OUTRO_2 = 2,
- //Tyrannus
+ // Tyrannus
SAY_AMBUSH_1 = 3,
SAY_AMBUSH_2 = 4,
SAY_GAUNTLET_START = 5,
@@ -44,12 +44,12 @@ enum Yells
SAY_DARK_MIGHT_1 = 13,
SAY_DARK_MIGHT_2 = 14,
- //Jaina
+ // Jaina
SAY_JAYNA_OUTRO_3 = 3,
SAY_JAYNA_OUTRO_4 = 4,
SAY_JAYNA_OUTRO_5 = 5,
- //Sylvanas
+ // Sylvanas
SAY_SYLVANAS_OUTRO_3 = 3,
SAY_SYLVANAS_OUTRO_4 = 4
};
@@ -121,7 +121,7 @@ static const Position rimefangPos[10] =
{1012.601f, 142.4965f, 665.0453f, 0.000000f},
};
-static const Position miscPos = {1018.376f, 167.2495f, 628.2811f, 0.000000f}; //tyrannus combat start position
+static Position const miscPos = { 1018.376f, 167.2495f, 628.2811f, 0.000000f }; // tyrannus combat start position
class boss_tyrannus : public CreatureScript
{
@@ -235,7 +235,7 @@ class boss_tyrannus : public CreatureScript
me->GetMotionMaster()->MovePoint(0, miscPos);
break;
case EVENT_COMBAT_START:
- if (Creature* rimefang = me->GetCreature(*me, instance->GetData64(DATA_RIMEFANG)))
+ if (Creature* rimefang = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_RIMEFANG)))
rimefang->AI()->DoAction(ACTION_START_RIMEFANG); //set rimefang also infight
events.SetPhase(PHASE_COMBAT);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
@@ -357,7 +357,7 @@ class boss_rimefang : public CreatureScript
_events.ScheduleEvent(EVENT_ICY_BLAST, 15000, 0, PHASE_COMBAT);
break;
case EVENT_HOARFROST:
- if (Unit* target = me->GetUnit(*me, _hoarfrostTargetGUID))
+ if (Unit* target = ObjectAccessor::GetUnit(*me, _hoarfrostTargetGUID))
{
DoCast(target, SPELL_HOARFROST);
_hoarfrostTargetGUID = 0;
@@ -413,7 +413,7 @@ class spell_tyrannus_overlord_brand : public SpellScriptLoader
class spell_tyrannus_overlord_brand_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_tyrannus_overlord_brand_AuraScript)
+ PrepareAuraScript(spell_tyrannus_overlord_brand_AuraScript);
bool Load() override
{
@@ -465,7 +465,7 @@ class spell_tyrannus_mark_of_rimefang : public SpellScriptLoader
class spell_tyrannus_mark_of_rimefang_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_tyrannus_mark_of_rimefang_AuraScript)
+ PrepareAuraScript(spell_tyrannus_mark_of_rimefang_AuraScript);
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -490,6 +490,43 @@ class spell_tyrannus_mark_of_rimefang : public SpellScriptLoader
}
};
+// 69232 - Icy Blast
+class spell_tyrannus_rimefang_icy_blast : public SpellScriptLoader
+{
+ public:
+ spell_tyrannus_rimefang_icy_blast() : SpellScriptLoader("spell_tyrannus_rimefang_icy_blast") { }
+
+ class spell_tyrannus_rimefang_icy_blast_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_tyrannus_rimefang_icy_blast_SpellScript);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_ICY_BLAST_AURA))
+ return false;
+ return true;
+ }
+
+ void HandleTriggerMissile(SpellEffIndex effIndex)
+ {
+ PreventHitDefaultEffect(effIndex);
+ if (Position const* pos = GetHitDest())
+ if (TempSummon* summon = GetCaster()->SummonCreature(NPC_ICY_BLAST, *pos, TEMPSUMMON_TIMED_DESPAWN, 60000))
+ summon->CastSpell(summon, SPELL_ICY_BLAST_AURA, true);
+ }
+
+ void Register() override
+ {
+ OnEffectHit += SpellEffectFn(spell_tyrannus_rimefang_icy_blast_SpellScript::HandleTriggerMissile, EFFECT_1, SPELL_EFFECT_TRIGGER_MISSILE);
+ }
+ };
+
+ SpellScript* GetSpellScript() const override
+ {
+ return new spell_tyrannus_rimefang_icy_blast_SpellScript();
+ }
+};
+
class at_tyrannus_event_starter : public AreaTriggerScript
{
public:
@@ -518,5 +555,6 @@ void AddSC_boss_tyrannus()
new boss_rimefang();
new spell_tyrannus_overlord_brand();
new spell_tyrannus_mark_of_rimefang();
+ new spell_tyrannus_rimefang_icy_blast();
new at_tyrannus_event_starter();
}
diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp
index 21d3766d766..7bd9325dd97 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp
@@ -212,7 +212,7 @@ class spell_trash_npc_glacial_strike : public SpellScriptLoader
class spell_trash_npc_glacial_strike_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_trash_npc_glacial_strike_AuraScript)
+ PrepareAuraScript(spell_trash_npc_glacial_strike_AuraScript);
void PeriodicTick(AuraEffect const* /*aurEff*/)
{
diff --git a/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp b/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp
index f0affa66d0f..b02a319abdc 100644
--- a/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp
+++ b/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp
@@ -278,7 +278,7 @@ class boss_drakkari_elemental : public CreatureScript
if (killer == me)
return;
- if (Creature* colossus = Unit::GetCreature(*me, instance->GetData64(DATA_DRAKKARI_COLOSSUS)))
+ if (Creature* colossus = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_DRAKKARI_COLOSSUS)))
killer->Kill(colossus);
}
@@ -314,7 +314,7 @@ class boss_drakkari_elemental : public CreatureScript
{
case ACTION_RETURN_TO_COLOSSUS:
DoCast(SPELL_SURGE_VISUAL);
- if (Creature* colossus = Unit::GetCreature(*me, instance->GetData64(DATA_DRAKKARI_COLOSSUS)))
+ if (Creature* colossus = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_DRAKKARI_COLOSSUS)))
// what if the elemental is more than 80 yards from drakkari colossus ?
DoCast(colossus, SPELL_MERGE, true);
break;
@@ -325,7 +325,7 @@ class boss_drakkari_elemental : public CreatureScript
{
if (HealthBelowPct(50) && instance)
{
- if (Creature* colossus = Unit::GetCreature(*me, instance->GetData64(DATA_DRAKKARI_COLOSSUS)))
+ if (Creature* colossus = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_DRAKKARI_COLOSSUS)))
{
if (colossus->AI()->GetData(DATA_COLOSSUS_PHASE) == COLOSSUS_PHASE_FIRST_ELEMENTAL_SUMMON)
{
@@ -423,7 +423,7 @@ public:
if (id == 1)
{
- if (Creature* colossus = Unit::GetCreature(*me, instance->GetData64(DATA_DRAKKARI_COLOSSUS)))
+ if (Creature* colossus = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_DRAKKARI_COLOSSUS)))
{
colossus->AI()->DoAction(ACTION_UNFREEZE_COLOSSUS);
if (!colossus->AI()->GetData(DATA_INTRO_DONE))
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
index 5824b1b65de..a9088207ebe 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
@@ -1373,7 +1373,7 @@ class spell_taldaram_glittering_sparks : public SpellScriptLoader
class spell_taldaram_glittering_sparks_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_taldaram_glittering_sparks_SpellScript)
+ PrepareSpellScript(spell_taldaram_glittering_sparks_SpellScript);
void HandleScript(SpellEffIndex effIndex)
{
@@ -1400,7 +1400,7 @@ class spell_taldaram_summon_flame_ball : public SpellScriptLoader
class spell_taldaram_summon_flame_ball_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_taldaram_summon_flame_ball_SpellScript)
+ PrepareSpellScript(spell_taldaram_summon_flame_ball_SpellScript);
void HandleScript(SpellEffIndex effIndex)
{
@@ -1427,7 +1427,7 @@ class spell_taldaram_flame_ball_visual : public SpellScriptLoader
class spell_flame_ball_visual_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_flame_ball_visual_AuraScript)
+ PrepareAuraScript(spell_flame_ball_visual_AuraScript);
bool Load() override
{
@@ -1471,7 +1471,7 @@ class spell_taldaram_ball_of_inferno_flame : public SpellScriptLoader
class spell_taldaram_ball_of_inferno_flame_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_taldaram_ball_of_inferno_flame_SpellScript)
+ PrepareSpellScript(spell_taldaram_ball_of_inferno_flame_SpellScript);
void ModAuraStack()
{
@@ -1499,7 +1499,7 @@ class spell_valanar_kinetic_bomb : public SpellScriptLoader
class spell_valanar_kinetic_bomb_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_valanar_kinetic_bomb_SpellScript)
+ PrepareSpellScript(spell_valanar_kinetic_bomb_SpellScript);
void SetDest(SpellDestination& dest)
{
@@ -1515,7 +1515,7 @@ class spell_valanar_kinetic_bomb : public SpellScriptLoader
class spell_valanar_kinetic_bomb_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_valanar_kinetic_bomb_AuraScript)
+ PrepareAuraScript(spell_valanar_kinetic_bomb_AuraScript);
void HandleDummyTick(AuraEffect const* /*aurEff*/)
{
@@ -1556,7 +1556,7 @@ class spell_valanar_kinetic_bomb_knockback : public SpellScriptLoader
class spell_valanar_kinetic_bomb_knockback_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_valanar_kinetic_bomb_knockback_SpellScript)
+ PrepareSpellScript(spell_valanar_kinetic_bomb_knockback_SpellScript);
void KnockIntoAir()
{
@@ -1583,7 +1583,7 @@ class spell_valanar_kinetic_bomb_absorb : public SpellScriptLoader
class spell_valanar_kinetic_bomb_absorb_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_valanar_kinetic_bomb_absorb_AuraScript)
+ PrepareAuraScript(spell_valanar_kinetic_bomb_absorb_AuraScript);
void OnAbsorb(AuraEffect* aurEff, DamageInfo& dmgInfo, uint32& absorbAmount)
{
@@ -1611,7 +1611,7 @@ class spell_blood_council_shadow_prison : public SpellScriptLoader
class spell_blood_council_shadow_prison_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_blood_council_shadow_prison_AuraScript)
+ PrepareAuraScript(spell_blood_council_shadow_prison_AuraScript);
void HandleDummyTick(AuraEffect const* aurEff)
{
@@ -1638,7 +1638,7 @@ class spell_blood_council_shadow_prison_damage : public SpellScriptLoader
class spell_blood_council_shadow_prison_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_blood_council_shadow_prison_SpellScript)
+ PrepareSpellScript(spell_blood_council_shadow_prison_SpellScript);
void AddExtraDamage()
{
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp
index d7842b488cd..104a8357917 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp
@@ -518,7 +518,7 @@ class spell_blood_queen_vampiric_bite : public SpellScriptLoader
class spell_blood_queen_vampiric_bite_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_blood_queen_vampiric_bite_SpellScript)
+ PrepareSpellScript(spell_blood_queen_vampiric_bite_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -595,7 +595,7 @@ class spell_blood_queen_frenzied_bloodthirst : public SpellScriptLoader
class spell_blood_queen_frenzied_bloodthirst_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_blood_queen_frenzied_bloodthirst_AuraScript)
+ PrepareAuraScript(spell_blood_queen_frenzied_bloodthirst_AuraScript);
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -654,7 +654,7 @@ class spell_blood_queen_bloodbolt : public SpellScriptLoader
class spell_blood_queen_bloodbolt_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_blood_queen_bloodbolt_SpellScript)
+ PrepareSpellScript(spell_blood_queen_bloodbolt_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -705,7 +705,7 @@ class spell_blood_queen_essence_of_the_blood_queen : public SpellScriptLoader
class spell_blood_queen_essence_of_the_blood_queen_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_blood_queen_essence_of_the_blood_queen_AuraScript)
+ PrepareAuraScript(spell_blood_queen_essence_of_the_blood_queen_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -740,7 +740,7 @@ class spell_blood_queen_pact_of_the_darkfallen : public SpellScriptLoader
class spell_blood_queen_pact_of_the_darkfallen_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_blood_queen_pact_of_the_darkfallen_SpellScript)
+ PrepareSpellScript(spell_blood_queen_pact_of_the_darkfallen_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets)
{
@@ -788,7 +788,7 @@ class spell_blood_queen_pact_of_the_darkfallen_dmg : public SpellScriptLoader
class spell_blood_queen_pact_of_the_darkfallen_dmg_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_blood_queen_pact_of_the_darkfallen_dmg_AuraScript)
+ PrepareAuraScript(spell_blood_queen_pact_of_the_darkfallen_dmg_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -826,7 +826,7 @@ class spell_blood_queen_pact_of_the_darkfallen_dmg_target : public SpellScriptLo
class spell_blood_queen_pact_of_the_darkfallen_dmg_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_blood_queen_pact_of_the_darkfallen_dmg_SpellScript)
+ PrepareSpellScript(spell_blood_queen_pact_of_the_darkfallen_dmg_SpellScript);
void FilterTargets(std::list<WorldObject*>& unitList)
{
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
index ead6fc8ed47..16d1531e890 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
@@ -1022,7 +1022,7 @@ class spell_deathbringer_blood_link : public SpellScriptLoader
class spell_deathbringer_blood_link_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_deathbringer_blood_link_SpellScript)
+ PrepareSpellScript(spell_deathbringer_blood_link_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -1058,7 +1058,7 @@ class spell_deathbringer_blood_link_aura : public SpellScriptLoader
class spell_deathbringer_blood_link_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_deathbringer_blood_link_AuraScript)
+ PrepareAuraScript(spell_deathbringer_blood_link_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -1094,7 +1094,7 @@ class spell_deathbringer_blood_power : public SpellScriptLoader
class spell_deathbringer_blood_power_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_deathbringer_blood_power_SpellScript)
+ PrepareSpellScript(spell_deathbringer_blood_power_SpellScript);
void ModAuraValue()
{
@@ -1110,7 +1110,7 @@ class spell_deathbringer_blood_power : public SpellScriptLoader
class spell_deathbringer_blood_power_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_deathbringer_blood_power_AuraScript)
+ PrepareAuraScript(spell_deathbringer_blood_power_AuraScript);
void RecalculateHook(AuraEffect const* /*aurEffect*/, int32& amount, bool& canBeRecalculated)
{
@@ -1143,7 +1143,7 @@ class spell_deathbringer_rune_of_blood : public SpellScriptLoader
class spell_deathbringer_rune_of_blood_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_deathbringer_rune_of_blood_SpellScript)
+ PrepareSpellScript(spell_deathbringer_rune_of_blood_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -1178,7 +1178,7 @@ class spell_deathbringer_blood_nova : public SpellScriptLoader
class spell_deathbringer_blood_nova_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_deathbringer_blood_nova_SpellScript)
+ PrepareSpellScript(spell_deathbringer_blood_nova_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -1213,7 +1213,7 @@ class spell_deathbringer_blood_nova_targeting : public SpellScriptLoader
class spell_deathbringer_blood_nova_targeting_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_deathbringer_blood_nova_targeting_SpellScript)
+ PrepareSpellScript(spell_deathbringer_blood_nova_targeting_SpellScript);
bool Load() override
{
@@ -1292,7 +1292,7 @@ class spell_deathbringer_boiling_blood : public SpellScriptLoader
class spell_deathbringer_boiling_blood_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_deathbringer_boiling_blood_SpellScript)
+ PrepareSpellScript(spell_deathbringer_boiling_blood_SpellScript);
bool Load() override
{
@@ -1329,7 +1329,7 @@ class spell_deathbringer_remove_marks : public SpellScriptLoader
class spell_deathbringer_remove_marks_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_deathbringer_remove_marks_SpellScript)
+ PrepareSpellScript(spell_deathbringer_remove_marks_SpellScript);
void HandleScript(SpellEffIndex effIndex)
{
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp
index 2e61793745c..4e45d72cadf 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp
@@ -345,7 +345,7 @@ class npc_stinky_icc : public CreatureScript
void JustDied(Unit* /*killer*/) override
{
- if (Creature* festergut = me->GetCreature(*me, _instance->GetData64(DATA_FESTERGUT)))
+ if (Creature* festergut = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_FESTERGUT)))
if (festergut->IsAlive())
festergut->AI()->Talk(SAY_STINKY_DEAD);
}
@@ -368,7 +368,7 @@ class spell_festergut_pungent_blight : public SpellScriptLoader
class spell_festergut_pungent_blight_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_festergut_pungent_blight_SpellScript)
+ PrepareSpellScript(spell_festergut_pungent_blight_SpellScript);
bool Load() override
{
@@ -404,7 +404,7 @@ class spell_festergut_gastric_bloat : public SpellScriptLoader
class spell_festergut_gastric_bloat_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_festergut_gastric_bloat_SpellScript)
+ PrepareSpellScript(spell_festergut_gastric_bloat_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -442,7 +442,7 @@ class spell_festergut_blighted_spores : public SpellScriptLoader
class spell_festergut_blighted_spores_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_festergut_blighted_spores_AuraScript)
+ PrepareAuraScript(spell_festergut_blighted_spores_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override
{
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp
index 809270bd59c..c0c909e4878 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp
@@ -1824,7 +1824,7 @@ class spell_igb_rocket_pack : public SpellScriptLoader
class spell_igb_rocket_pack_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_igb_rocket_pack_AuraScript)
+ PrepareAuraScript(spell_igb_rocket_pack_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -1868,7 +1868,7 @@ class spell_igb_rocket_pack_useable : public SpellScriptLoader
class spell_igb_rocket_pack_useable_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_igb_rocket_pack_useable_AuraScript)
+ PrepareAuraScript(spell_igb_rocket_pack_useable_AuraScript);
bool Load()
{
@@ -1917,7 +1917,7 @@ class spell_igb_on_gunship_deck : public SpellScriptLoader
class spell_igb_on_gunship_deck_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_igb_on_gunship_deck_AuraScript)
+ PrepareAuraScript(spell_igb_on_gunship_deck_AuraScript);
bool Load() override
{
@@ -1962,7 +1962,7 @@ class spell_igb_periodic_trigger_with_power_cost : public SpellScriptLoader
class spell_igb_periodic_trigger_with_power_cost_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_igb_periodic_trigger_with_power_cost_AuraScript)
+ PrepareAuraScript(spell_igb_periodic_trigger_with_power_cost_AuraScript);
void HandlePeriodicTick(AuraEffect const* /*aurEff*/)
{
@@ -1989,7 +1989,7 @@ class spell_igb_cannon_blast : public SpellScriptLoader
class spell_igb_cannon_blast_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_igb_cannon_blast_SpellScript)
+ PrepareSpellScript(spell_igb_cannon_blast_SpellScript);
bool Load()
{
@@ -2026,7 +2026,7 @@ class spell_igb_incinerating_blast : public SpellScriptLoader
class spell_igb_incinerating_blast_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_igb_incinerating_blast_SpellScript)
+ PrepareSpellScript(spell_igb_incinerating_blast_SpellScript);
void StoreEnergy()
{
@@ -2066,7 +2066,7 @@ class spell_igb_overheat : public SpellScriptLoader
class spell_igb_overheat_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_igb_overheat_AuraScript)
+ PrepareAuraScript(spell_igb_overheat_AuraScript);
bool Load() override
{
@@ -2122,7 +2122,7 @@ class spell_igb_below_zero : public SpellScriptLoader
class spell_igb_below_zero_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_igb_below_zero_SpellScript)
+ PrepareSpellScript(spell_igb_below_zero_SpellScript);
void RemovePassengers()
{
@@ -2148,7 +2148,7 @@ class spell_igb_teleport_to_enemy_ship : public SpellScriptLoader
class spell_igb_teleport_to_enemy_ship_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_igb_teleport_to_enemy_ship_SpellScript)
+ PrepareSpellScript(spell_igb_teleport_to_enemy_ship_SpellScript);
void RelocateTransportOffset(SpellEffIndex /*effIndex*/)
{
@@ -2182,7 +2182,7 @@ class spell_igb_burning_pitch_selector : public SpellScriptLoader
class spell_igb_burning_pitch_selector_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_igb_burning_pitch_selector_SpellScript)
+ PrepareSpellScript(spell_igb_burning_pitch_selector_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets)
{
@@ -2231,7 +2231,7 @@ class spell_igb_burning_pitch : public SpellScriptLoader
class spell_igb_burning_pitch_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_igb_burning_pitch_SpellScript)
+ PrepareSpellScript(spell_igb_burning_pitch_SpellScript);
void HandleDummy(SpellEffIndex effIndex)
{
@@ -2259,7 +2259,7 @@ class spell_igb_rocket_artillery : public SpellScriptLoader
class spell_igb_rocket_artillery_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_igb_rocket_artillery_SpellScript)
+ PrepareSpellScript(spell_igb_rocket_artillery_SpellScript);
void SelectRandomTarget(std::list<WorldObject*>& targets)
{
@@ -2297,7 +2297,7 @@ class spell_igb_rocket_artillery_explosion : public SpellScriptLoader
class spell_igb_rocket_artillery_explosion_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_igb_rocket_artillery_explosion_SpellScript)
+ PrepareSpellScript(spell_igb_rocket_artillery_explosion_SpellScript);
void DamageGunship(SpellEffIndex /*effIndex*/)
{
@@ -2324,7 +2324,7 @@ class spell_igb_gunship_fall_teleport : public SpellScriptLoader
class spell_igb_gunship_fall_teleport_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_igb_gunship_fall_teleport_SpellScript)
+ PrepareSpellScript(spell_igb_gunship_fall_teleport_SpellScript);
bool Load()
{
@@ -2365,7 +2365,7 @@ class spell_igb_check_for_players : public SpellScriptLoader
class spell_igb_check_for_players_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_igb_check_for_players_SpellScript)
+ PrepareSpellScript(spell_igb_check_for_players_SpellScript);
bool Load() override
{
@@ -2413,7 +2413,7 @@ class spell_igb_teleport_players_on_victory : public SpellScriptLoader
class spell_igb_teleport_players_on_victory_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_igb_teleport_players_on_victory_SpellScript)
+ PrepareSpellScript(spell_igb_teleport_players_on_victory_SpellScript);
bool Load() override
{
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
index 34b8901a304..d59e723d070 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
@@ -956,7 +956,7 @@ class spell_deathwhisper_mana_barrier : public SpellScriptLoader
class spell_deathwhisper_mana_barrier_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_deathwhisper_mana_barrier_AuraScript)
+ PrepareAuraScript(spell_deathwhisper_mana_barrier_AuraScript);
void HandlePeriodicTick(AuraEffect const* /*aurEff*/)
{
@@ -988,7 +988,7 @@ class spell_cultist_dark_martyrdom : public SpellScriptLoader
class spell_cultist_dark_martyrdom_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_cultist_dark_martyrdom_SpellScript)
+ PrepareSpellScript(spell_cultist_dark_martyrdom_SpellScript);
void HandleEffect(SpellEffIndex /*effIndex*/)
{
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
index b0907fd6865..5022cd4f645 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
@@ -499,7 +499,7 @@ class spell_marrowgar_coldflame : public SpellScriptLoader
class spell_marrowgar_coldflame_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_marrowgar_coldflame_SpellScript)
+ PrepareSpellScript(spell_marrowgar_coldflame_SpellScript);
void SelectTarget(std::list<WorldObject*>& targets)
{
@@ -541,7 +541,7 @@ class spell_marrowgar_coldflame_bonestorm : public SpellScriptLoader
class spell_marrowgar_coldflame_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_marrowgar_coldflame_SpellScript)
+ PrepareSpellScript(spell_marrowgar_coldflame_SpellScript);
void HandleScriptEffect(SpellEffIndex effIndex)
{
@@ -569,7 +569,7 @@ class spell_marrowgar_coldflame_damage : public SpellScriptLoader
class spell_marrowgar_coldflame_damage_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_marrowgar_coldflame_damage_AuraScript)
+ PrepareAuraScript(spell_marrowgar_coldflame_damage_AuraScript);
bool CanBeAppliedOn(Unit* target)
{
@@ -605,7 +605,7 @@ class spell_marrowgar_bone_spike_graveyard : public SpellScriptLoader
class spell_marrowgar_bone_spike_graveyard_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_marrowgar_bone_spike_graveyard_SpellScript)
+ PrepareSpellScript(spell_marrowgar_bone_spike_graveyard_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -670,7 +670,7 @@ class spell_marrowgar_bone_storm : public SpellScriptLoader
class spell_marrowgar_bone_storm_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_marrowgar_bone_storm_SpellScript)
+ PrepareSpellScript(spell_marrowgar_bone_storm_SpellScript);
void RecalculateDamage()
{
@@ -696,7 +696,7 @@ class spell_marrowgar_bone_slice : public SpellScriptLoader
class spell_marrowgar_bone_slice_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_marrowgar_bone_slice_SpellScript)
+ PrepareSpellScript(spell_marrowgar_bone_slice_SpellScript);
bool Load() override
{
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
index dd5e55b9e26..3bf8fd8d305 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
@@ -372,7 +372,7 @@ class boss_professor_putricide : public CreatureScript
instance->SetBossState(DATA_FESTERGUT, IN_PROGRESS); // needed here for delayed gate close
me->SetSpeed(MOVE_RUN, _baseSpeed, true);
DoAction(ACTION_FESTERGUT_GAS);
- if (Creature* festergut = Unit::GetCreature(*me, instance->GetData64(DATA_FESTERGUT)))
+ if (Creature* festergut = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_FESTERGUT)))
festergut->CastSpell(festergut, SPELL_GASEOUS_BLIGHT_LARGE, false, NULL, NULL, festergut->GetGUID());
break;
case POINT_ROTFACE:
@@ -442,7 +442,7 @@ class boss_professor_putricide : public CreatureScript
_oozeFloodStage = 0;
DoZoneInCombat(me);
// init random sequence of floods
- if (Creature* rotface = Unit::GetCreature(*me, instance->GetData64(DATA_ROTFACE)))
+ if (Creature* rotface = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_ROTFACE)))
{
std::list<Creature*> list;
GetCreatureListWithEntryInGrid(list, rotface, NPC_PUDDLE_STALKER, 50.0f);
@@ -469,7 +469,7 @@ class boss_professor_putricide : public CreatureScript
}
case ACTION_ROTFACE_OOZE:
Talk(SAY_ROTFACE_OOZE_FLOOD);
- if (Creature* dummy = Unit::GetCreature(*me, _oozeFloodDummyGUIDs[_oozeFloodStage]))
+ if (Creature* dummy = ObjectAccessor::GetCreature(*me, _oozeFloodDummyGUIDs[_oozeFloodStage]))
dummy->CastSpell(dummy, oozeFloodSpells[_oozeFloodStage], true, NULL, NULL, me->GetGUID()); // cast from self for LoS (with prof's GUID for logs)
if (++_oozeFloodStage == 4)
_oozeFloodStage = 0;
@@ -823,7 +823,7 @@ class spell_putricide_gaseous_bloat : public SpellScriptLoader
class spell_putricide_gaseous_bloat_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_putricide_gaseous_bloat_AuraScript)
+ PrepareAuraScript(spell_putricide_gaseous_bloat_AuraScript);
void HandleExtraEffect(AuraEffect const* /*aurEff*/)
{
@@ -855,7 +855,7 @@ class spell_putricide_ooze_channel : public SpellScriptLoader
class spell_putricide_ooze_channel_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_putricide_ooze_channel_SpellScript)
+ PrepareSpellScript(spell_putricide_ooze_channel_SpellScript);
bool Validate(SpellInfo const* spell) override
{
@@ -943,7 +943,7 @@ class spell_putricide_slime_puddle : public SpellScriptLoader
class spell_putricide_slime_puddle_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_putricide_slime_puddle_SpellScript)
+ PrepareSpellScript(spell_putricide_slime_puddle_SpellScript);
void ScaleRange(std::list<WorldObject*>& targets)
{
@@ -971,7 +971,7 @@ class spell_putricide_slime_puddle_aura : public SpellScriptLoader
class spell_putricide_slime_puddle_aura_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_putricide_slime_puddle_aura_SpellScript)
+ PrepareSpellScript(spell_putricide_slime_puddle_aura_SpellScript);
void ReplaceAura()
{
@@ -998,7 +998,7 @@ class spell_putricide_unstable_experiment : public SpellScriptLoader
class spell_putricide_unstable_experiment_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_putricide_unstable_experiment_SpellScript)
+ PrepareSpellScript(spell_putricide_unstable_experiment_SpellScript);
void HandleScript(SpellEffIndex effIndex)
{
@@ -1046,7 +1046,7 @@ class spell_putricide_ooze_eruption_searcher : public SpellScriptLoader
class spell_putricide_ooze_eruption_searcher_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_putricide_ooze_eruption_searcher_SpellScript)
+ PrepareSpellScript(spell_putricide_ooze_eruption_searcher_SpellScript);
void HandleDummy(SpellEffIndex /*effIndex*/)
{
@@ -1077,7 +1077,7 @@ class spell_putricide_choking_gas_bomb : public SpellScriptLoader
class spell_putricide_choking_gas_bomb_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_putricide_choking_gas_bomb_SpellScript)
+ PrepareSpellScript(spell_putricide_choking_gas_bomb_SpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
@@ -1111,7 +1111,7 @@ class spell_putricide_unbound_plague : public SpellScriptLoader
class spell_putricide_unbound_plague_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_putricide_unbound_plague_SpellScript)
+ PrepareSpellScript(spell_putricide_unbound_plague_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -1190,7 +1190,7 @@ class spell_putricide_eat_ooze : public SpellScriptLoader
class spell_putricide_eat_ooze_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_putricide_eat_ooze_SpellScript)
+ PrepareSpellScript(spell_putricide_eat_ooze_SpellScript);
void SelectTarget(std::list<WorldObject*>& targets)
{
@@ -1242,7 +1242,7 @@ class spell_putricide_mutated_plague : public SpellScriptLoader
class spell_putricide_mutated_plague_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_putricide_mutated_plague_AuraScript)
+ PrepareAuraScript(spell_putricide_mutated_plague_AuraScript);
void HandleTriggerSpell(AuraEffect const* aurEff)
{
@@ -1292,7 +1292,7 @@ class spell_putricide_mutation_init : public SpellScriptLoader
class spell_putricide_mutation_init_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_putricide_mutation_init_SpellScript)
+ PrepareSpellScript(spell_putricide_mutation_init_SpellScript);
SpellCastResult CheckRequirementInternal(SpellCustomErrors& extendedError)
{
@@ -1346,7 +1346,7 @@ class spell_putricide_mutation_init : public SpellScriptLoader
class spell_putricide_mutation_init_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_putricide_mutation_init_AuraScript)
+ PrepareAuraScript(spell_putricide_mutation_init_AuraScript);
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -1381,7 +1381,7 @@ class spell_putricide_mutated_transformation_dismiss : public SpellScriptLoader
class spell_putricide_mutated_transformation_dismiss_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_putricide_mutated_transformation_dismiss_AuraScript)
+ PrepareAuraScript(spell_putricide_mutated_transformation_dismiss_AuraScript);
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -1408,7 +1408,7 @@ class spell_putricide_mutated_transformation : public SpellScriptLoader
class spell_putricide_mutated_transformation_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_putricide_mutated_transformation_SpellScript)
+ PrepareSpellScript(spell_putricide_mutated_transformation_SpellScript);
void HandleSummon(SpellEffIndex effIndex)
{
@@ -1469,7 +1469,7 @@ class spell_putricide_mutated_transformation_dmg : public SpellScriptLoader
class spell_putricide_mutated_transformation_dmg_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_putricide_mutated_transformation_dmg_SpellScript)
+ PrepareSpellScript(spell_putricide_mutated_transformation_dmg_SpellScript);
void FilterTargetsInitial(std::list<WorldObject*>& targets)
{
@@ -1496,7 +1496,7 @@ class spell_putricide_regurgitated_ooze : public SpellScriptLoader
class spell_putricide_regurgitated_ooze_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_putricide_regurgitated_ooze_SpellScript)
+ PrepareSpellScript(spell_putricide_regurgitated_ooze_SpellScript);
// the only purpose of this hook is to fail the achievement
void ExtraEffect(SpellEffIndex /*effIndex*/)
@@ -1525,7 +1525,7 @@ class spell_putricide_clear_aura_effect_value : public SpellScriptLoader
class spell_putricide_clear_aura_effect_value_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_putricide_clear_aura_effect_value_SpellScript)
+ PrepareSpellScript(spell_putricide_clear_aura_effect_value_SpellScript);
void HandleScript(SpellEffIndex effIndex)
{
@@ -1554,7 +1554,7 @@ class spell_stinky_precious_decimate : public SpellScriptLoader
class spell_stinky_precious_decimate_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_stinky_precious_decimate_SpellScript)
+ PrepareSpellScript(spell_stinky_precious_decimate_SpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp
index a3407a0ff1c..c1ee616218c 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp
@@ -126,7 +126,7 @@ class boss_rotface : public CreatureScript
me->setActive(true);
Talk(SAY_AGGRO);
- if (Creature* professor = Unit::GetCreature(*me, instance->GetData64(DATA_PROFESSOR_PUTRICIDE)))
+ if (Creature* professor = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_PROFESSOR_PUTRICIDE)))
professor->AI()->DoAction(ACTION_ROTFACE_COMBAT);
DoZoneInCombat();
@@ -138,7 +138,7 @@ class boss_rotface : public CreatureScript
instance->DoRemoveAurasDueToSpellOnPlayers(MUTATED_INFECTION);
_JustDied();
Talk(SAY_DEATH);
- if (Creature* professor = Unit::GetCreature(*me, instance->GetData64(DATA_PROFESSOR_PUTRICIDE)))
+ if (Creature* professor = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_PROFESSOR_PUTRICIDE)))
professor->AI()->DoAction(ACTION_ROTFACE_DEATH);
}
@@ -158,7 +158,7 @@ class boss_rotface : public CreatureScript
void EnterEvadeMode() override
{
ScriptedAI::EnterEvadeMode();
- if (Creature* professor = Unit::GetCreature(*me, instance->GetData64(DATA_PROFESSOR_PUTRICIDE)))
+ if (Creature* professor = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_PROFESSOR_PUTRICIDE)))
professor->AI()->EnterEvadeMode();
}
@@ -176,7 +176,7 @@ class boss_rotface : public CreatureScript
void JustSummoned(Creature* summon) override
{
if (summon->GetEntry() == NPC_VILE_GAS_STALKER)
- if (Creature* professor = Unit::GetCreature(*me, instance->GetData64(DATA_PROFESSOR_PUTRICIDE)))
+ if (Creature* professor = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_PROFESSOR_PUTRICIDE)))
professor->CastSpell(summon, SPELL_VILE_GAS_H, true);
}
@@ -308,13 +308,13 @@ class npc_big_ooze : public CreatureScript
DoCast(me, SPELL_GREEN_ABOMINATION_HITTIN__YA_PROC, true);
events.ScheduleEvent(EVENT_STICKY_OOZE, 5000);
// register in Rotface's summons - not summoned with Rotface as owner
- if (Creature* rotface = Unit::GetCreature(*me, instance->GetData64(DATA_ROTFACE)))
+ if (Creature* rotface = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_ROTFACE)))
rotface->AI()->JustSummoned(me);
}
void JustDied(Unit* /*killer*/) override
{
- if (Creature* rotface = Unit::GetCreature(*me, instance->GetData64(DATA_ROTFACE)))
+ if (Creature* rotface = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_ROTFACE)))
rotface->AI()->SummonedCreatureDespawn(me);
me->DespawnOrUnsummon();
}
@@ -395,7 +395,7 @@ class npc_precious_icc : public CreatureScript
void JustDied(Unit* /*killer*/) override
{
_summons.DespawnAll();
- if (Creature* rotface = Unit::GetCreature(*me, _instance->GetData64(DATA_ROTFACE)))
+ if (Creature* rotface = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_ROTFACE)))
if (rotface->IsAlive())
rotface->AI()->Talk(SAY_PRECIOUS_DIES);
}
@@ -455,7 +455,7 @@ class spell_rotface_ooze_flood : public SpellScriptLoader
class spell_rotface_ooze_flood_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_rotface_ooze_flood_SpellScript)
+ PrepareSpellScript(spell_rotface_ooze_flood_SpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
@@ -505,7 +505,7 @@ class spell_rotface_mutated_infection : public SpellScriptLoader
class spell_rotface_mutated_infection_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_rotface_mutated_infection_SpellScript)
+ PrepareSpellScript(spell_rotface_mutated_infection_SpellScript);
bool Load() override
{
@@ -565,7 +565,7 @@ class spell_rotface_little_ooze_combine : public SpellScriptLoader
class spell_rotface_little_ooze_combine_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_rotface_little_ooze_combine_SpellScript)
+ PrepareSpellScript(spell_rotface_little_ooze_combine_SpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
@@ -597,7 +597,7 @@ class spell_rotface_large_ooze_combine : public SpellScriptLoader
class spell_rotface_large_ooze_combine_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_rotface_large_ooze_combine_SpellScript)
+ PrepareSpellScript(spell_rotface_large_ooze_combine_SpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
@@ -639,7 +639,7 @@ class spell_rotface_large_ooze_buff_combine : public SpellScriptLoader
class spell_rotface_large_ooze_buff_combine_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_rotface_large_ooze_buff_combine_SpellScript)
+ PrepareSpellScript(spell_rotface_large_ooze_buff_combine_SpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
@@ -657,7 +657,7 @@ class spell_rotface_large_ooze_buff_combine : public SpellScriptLoader
GetCaster()->RemoveAurasDueToSpell(SPELL_LARGE_OOZE_BUFF_COMBINE);
GetCaster()->RemoveAurasDueToSpell(SPELL_LARGE_OOZE_COMBINE);
if (InstanceScript* instance = GetCaster()->GetInstanceScript())
- if (Creature* rotface = Unit::GetCreature(*GetCaster(), instance->GetData64(DATA_ROTFACE)))
+ if (Creature* rotface = ObjectAccessor::GetCreature(*GetCaster(), instance->GetData64(DATA_ROTFACE)))
if (rotface->IsAlive())
{
rotface->AI()->Talk(EMOTE_UNSTABLE_EXPLOSION);
@@ -694,7 +694,7 @@ class spell_rotface_unstable_ooze_explosion_init : public SpellScriptLoader
class spell_rotface_unstable_ooze_explosion_init_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_rotface_unstable_ooze_explosion_init_SpellScript)
+ PrepareSpellScript(spell_rotface_unstable_ooze_explosion_init_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -734,7 +734,7 @@ class spell_rotface_unstable_ooze_explosion : public SpellScriptLoader
class spell_rotface_unstable_ooze_explosion_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_rotface_unstable_ooze_explosion_SpellScript)
+ PrepareSpellScript(spell_rotface_unstable_ooze_explosion_SpellScript);
void CheckTarget(SpellEffIndex effIndex)
{
@@ -771,7 +771,7 @@ class spell_rotface_unstable_ooze_explosion_suicide : public SpellScriptLoader
class spell_rotface_unstable_ooze_explosion_suicide_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_rotface_unstable_ooze_explosion_suicide_AuraScript)
+ PrepareAuraScript(spell_rotface_unstable_ooze_explosion_suicide_AuraScript);
void DespawnSelf(AuraEffect const* /*aurEff*/)
{
@@ -804,7 +804,7 @@ class spell_rotface_vile_gas_trigger : public SpellScriptLoader
class spell_rotface_vile_gas_trigger_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_rotface_vile_gas_trigger_SpellScript)
+ PrepareSpellScript(spell_rotface_vile_gas_trigger_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets)
{
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
index f8c042be1eb..76c5a93f9c5 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
@@ -1023,7 +1023,7 @@ class spell_sindragosa_s_fury : public SpellScriptLoader
class spell_sindragosa_s_fury_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_sindragosa_s_fury_SpellScript)
+ PrepareSpellScript(spell_sindragosa_s_fury_SpellScript);
bool Load() override
{
@@ -1110,7 +1110,7 @@ class spell_sindragosa_unchained_magic : public SpellScriptLoader
class spell_sindragosa_unchained_magic_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_sindragosa_unchained_magic_SpellScript)
+ PrepareSpellScript(spell_sindragosa_unchained_magic_SpellScript);
void FilterTargets(std::list<WorldObject*>& unitList)
{
@@ -1139,7 +1139,7 @@ class spell_sindragosa_frost_breath : public SpellScriptLoader
class spell_sindragosa_frost_breath_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_sindragosa_frost_breath_SpellScript)
+ PrepareSpellScript(spell_sindragosa_frost_breath_SpellScript);
void HandleInfusion()
{
@@ -1184,7 +1184,7 @@ class spell_sindragosa_instability : public SpellScriptLoader
class spell_sindragosa_instability_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_sindragosa_instability_AuraScript)
+ PrepareAuraScript(spell_sindragosa_instability_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -1218,7 +1218,7 @@ class spell_sindragosa_frost_beacon : public SpellScriptLoader
class spell_sindragosa_frost_beacon_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_sindragosa_frost_beacon_AuraScript)
+ PrepareAuraScript(spell_sindragosa_frost_beacon_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -1253,7 +1253,7 @@ class spell_sindragosa_ice_tomb : public SpellScriptLoader
class spell_sindragosa_ice_tomb_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_sindragosa_ice_tomb_SpellScript)
+ PrepareSpellScript(spell_sindragosa_ice_tomb_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -1286,7 +1286,7 @@ class spell_sindragosa_ice_tomb : public SpellScriptLoader
class spell_sindragosa_ice_tomb_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_sindragosa_ice_tomb_AuraScript)
+ PrepareAuraScript(spell_sindragosa_ice_tomb_AuraScript);
void PeriodicTick(AuraEffect const* /*aurEff*/)
{
@@ -1317,7 +1317,7 @@ class spell_sindragosa_icy_grip : public SpellScriptLoader
class spell_sindragosa_icy_grip_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_sindragosa_icy_grip_SpellScript)
+ PrepareSpellScript(spell_sindragosa_icy_grip_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -1365,7 +1365,7 @@ class spell_sindragosa_mystic_buffet : public SpellScriptLoader
class spell_sindragosa_mystic_buffet_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_sindragosa_mystic_buffet_SpellScript)
+ PrepareSpellScript(spell_sindragosa_mystic_buffet_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets)
{
@@ -1391,7 +1391,7 @@ class spell_rimefang_icy_blast : public SpellScriptLoader
class spell_rimefang_icy_blast_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_rimefang_icy_blast_SpellScript)
+ PrepareSpellScript(spell_rimefang_icy_blast_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -1443,7 +1443,7 @@ class spell_frostwarden_handler_order_whelp : public SpellScriptLoader
class spell_frostwarden_handler_order_whelp_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_frostwarden_handler_order_whelp_SpellScript)
+ PrepareSpellScript(spell_frostwarden_handler_order_whelp_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -1498,7 +1498,7 @@ class spell_frostwarden_handler_focus_fire : public SpellScriptLoader
class spell_frostwarden_handler_focus_fire_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_frostwarden_handler_focus_fire_SpellScript)
+ PrepareSpellScript(spell_frostwarden_handler_focus_fire_SpellScript);
void HandleScript(SpellEffIndex effIndex)
{
@@ -1515,7 +1515,7 @@ class spell_frostwarden_handler_focus_fire : public SpellScriptLoader
class spell_frostwarden_handler_focus_fire_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_frostwarden_handler_focus_fire_AuraScript)
+ PrepareAuraScript(spell_frostwarden_handler_focus_fire_AuraScript);
void PeriodicTick(AuraEffect const* /*aurEff*/)
{
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
index 6a32517d93b..223f3731032 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
@@ -2005,7 +2005,7 @@ class spell_the_lich_king_infest : public SpellScriptLoader
class spell_the_lich_king_infest_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_the_lich_king_infest_AuraScript)
+ PrepareAuraScript(spell_the_lich_king_infest_AuraScript);
void OnPeriodic(AuraEffect const* /*aurEff*/)
{
@@ -2045,7 +2045,7 @@ class spell_the_lich_king_necrotic_plague : public SpellScriptLoader
class spell_the_lich_king_necrotic_plague_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_the_lich_king_necrotic_plague_AuraScript)
+ PrepareAuraScript(spell_the_lich_king_necrotic_plague_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -2093,7 +2093,7 @@ class spell_the_lich_king_necrotic_plague_jump : public SpellScriptLoader
class spell_the_lich_king_necrotic_plague_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_the_lich_king_necrotic_plague_SpellScript)
+ PrepareSpellScript(spell_the_lich_king_necrotic_plague_SpellScript);
bool Load() override
{
@@ -2133,7 +2133,7 @@ class spell_the_lich_king_necrotic_plague_jump : public SpellScriptLoader
class spell_the_lich_king_necrotic_plague_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_the_lich_king_necrotic_plague_AuraScript)
+ PrepareAuraScript(spell_the_lich_king_necrotic_plague_AuraScript);
bool Load() override
{
@@ -2217,7 +2217,7 @@ class spell_the_lich_king_shadow_trap_visual : public SpellScriptLoader
class spell_the_lich_king_shadow_trap_visual_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_the_lich_king_shadow_trap_visual_AuraScript)
+ PrepareAuraScript(spell_the_lich_king_shadow_trap_visual_AuraScript);
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -2244,7 +2244,7 @@ class spell_the_lich_king_shadow_trap_periodic : public SpellScriptLoader
class spell_the_lich_king_shadow_trap_periodic_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_the_lich_king_shadow_trap_periodic_SpellScript)
+ PrepareSpellScript(spell_the_lich_king_shadow_trap_periodic_SpellScript);
void CheckTargetCount(std::list<WorldObject*>& targets)
{
@@ -2273,7 +2273,7 @@ class spell_the_lich_king_quake : public SpellScriptLoader
class spell_the_lich_king_quake_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_the_lich_king_quake_SpellScript)
+ PrepareSpellScript(spell_the_lich_king_quake_SpellScript);
bool Load() override
{
@@ -2312,7 +2312,7 @@ class spell_the_lich_king_ice_burst_target_search : public SpellScriptLoader
class spell_the_lich_king_ice_burst_target_search_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_the_lich_king_ice_burst_target_search_SpellScript)
+ PrepareSpellScript(spell_the_lich_king_ice_burst_target_search_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -2355,7 +2355,7 @@ class spell_the_lich_king_raging_spirit : public SpellScriptLoader
class spell_the_lich_king_raging_spirit_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_the_lich_king_raging_spirit_SpellScript)
+ PrepareSpellScript(spell_the_lich_king_raging_spirit_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -2404,7 +2404,7 @@ class spell_the_lich_king_defile : public SpellScriptLoader
class spell_the_lich_king_defile_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_the_lich_king_defile_SpellScript)
+ PrepareSpellScript(spell_the_lich_king_defile_SpellScript);
void CorrectRange(std::list<WorldObject*>& targets)
{
@@ -2441,7 +2441,7 @@ class spell_the_lich_king_summon_into_air : public SpellScriptLoader
class spell_the_lich_king_summon_into_air_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_the_lich_king_summon_into_air_SpellScript)
+ PrepareSpellScript(spell_the_lich_king_summon_into_air_SpellScript);
void ModDestHeight(SpellEffIndex effIndex)
{
@@ -2476,7 +2476,7 @@ class spell_the_lich_king_soul_reaper : public SpellScriptLoader
class spell_the_lich_king_soul_reaper_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_the_lich_king_soul_reaper_AuraScript)
+ PrepareAuraScript(spell_the_lich_king_soul_reaper_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -2510,7 +2510,7 @@ class spell_the_lich_king_valkyr_target_search : public SpellScriptLoader
class spell_the_lich_king_valkyr_target_search_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_the_lich_king_valkyr_target_search_SpellScript)
+ PrepareSpellScript(spell_the_lich_king_valkyr_target_search_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -2576,7 +2576,7 @@ class spell_the_lich_king_cast_back_to_caster : public SpellScriptLoader
class spell_the_lich_king_cast_back_to_caster_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_the_lich_king_cast_back_to_caster_SpellScript)
+ PrepareSpellScript(spell_the_lich_king_cast_back_to_caster_SpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
@@ -2602,7 +2602,7 @@ class spell_the_lich_king_life_siphon : public SpellScriptLoader
class spell_the_lich_king_life_siphon_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_the_lich_king_life_siphon_SpellScript)
+ PrepareSpellScript(spell_the_lich_king_life_siphon_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -2635,7 +2635,7 @@ class spell_the_lich_king_vile_spirits : public SpellScriptLoader
class spell_the_lich_king_vile_spirits_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_the_lich_king_vile_spirits_AuraScript)
+ PrepareAuraScript(spell_the_lich_king_vile_spirits_AuraScript);
bool Load() override
{
@@ -2670,7 +2670,7 @@ class spell_the_lich_king_vile_spirits_visual : public SpellScriptLoader
class spell_the_lich_king_vile_spirits_visual_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_the_lich_king_vile_spirits_visual_SpellScript)
+ PrepareSpellScript(spell_the_lich_king_vile_spirits_visual_SpellScript);
void ModDestHeight(SpellEffIndex /*effIndex*/)
{
@@ -2697,7 +2697,7 @@ class spell_the_lich_king_vile_spirit_move_target_search : public SpellScriptLoa
class spell_the_lich_king_vile_spirit_move_target_search_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_the_lich_king_vile_spirit_move_target_search_SpellScript)
+ PrepareSpellScript(spell_the_lich_king_vile_spirit_move_target_search_SpellScript);
bool Load() override
{
@@ -2746,7 +2746,7 @@ class spell_the_lich_king_vile_spirit_damage_target_search : public SpellScriptL
class spell_the_lich_king_vile_spirit_damage_target_search_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_the_lich_king_vile_spirit_damage_target_search_SpellScript)
+ PrepareSpellScript(spell_the_lich_king_vile_spirit_damage_target_search_SpellScript);
bool Load() override
{
@@ -2787,7 +2787,7 @@ class spell_the_lich_king_harvest_soul : public SpellScriptLoader
class spell_the_lich_king_harvest_soul_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_the_lich_king_harvest_soul_AuraScript)
+ PrepareAuraScript(spell_the_lich_king_harvest_soul_AuraScript);
bool Load() override
{
@@ -2820,7 +2820,7 @@ class spell_the_lich_king_lights_favor : public SpellScriptLoader
class spell_the_lich_king_lights_favor_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_the_lich_king_lights_favor_AuraScript)
+ PrepareAuraScript(spell_the_lich_king_lights_favor_AuraScript);
void OnPeriodic(AuraEffect const* /*aurEff*/)
{
@@ -2857,7 +2857,7 @@ class spell_the_lich_king_soul_rip : public SpellScriptLoader
class spell_the_lich_king_soul_rip_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_the_lich_king_soul_rip_AuraScript)
+ PrepareAuraScript(spell_the_lich_king_soul_rip_AuraScript);
void OnPeriodic(AuraEffect const* aurEff)
{
@@ -2886,7 +2886,7 @@ class spell_the_lich_king_restore_soul : public SpellScriptLoader
class spell_the_lich_king_restore_soul_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_the_lich_king_restore_soul_SpellScript)
+ PrepareSpellScript(spell_the_lich_king_restore_soul_SpellScript);
bool Load() override
{
@@ -2939,7 +2939,7 @@ class spell_the_lich_king_dark_hunger : public SpellScriptLoader
class spell_the_lich_king_dark_hunger_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_the_lich_king_dark_hunger_AuraScript)
+ PrepareAuraScript(spell_the_lich_king_dark_hunger_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -2974,7 +2974,7 @@ class spell_the_lich_king_in_frostmourne_room : public SpellScriptLoader
class spell_the_lich_king_in_frostmourne_room_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_the_lich_king_in_frostmourne_room_AuraScript)
+ PrepareAuraScript(spell_the_lich_king_in_frostmourne_room_AuraScript);
bool Load() override
{
@@ -3007,7 +3007,7 @@ class spell_the_lich_king_summon_spirit_bomb : public SpellScriptLoader
class spell_the_lich_king_summon_spirit_bomb_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_the_lich_king_summon_spirit_bomb_SpellScript)
+ PrepareSpellScript(spell_the_lich_king_summon_spirit_bomb_SpellScript);
void HandleScript(SpellEffIndex effIndex)
{
@@ -3034,7 +3034,7 @@ class spell_the_lich_king_trigger_vile_spirit : public SpellScriptLoader
class spell_the_lich_king_trigger_vile_spirit_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_the_lich_king_trigger_vile_spirit_SpellScript)
+ PrepareSpellScript(spell_the_lich_king_trigger_vile_spirit_SpellScript);
void ActivateSpirit()
{
@@ -3064,7 +3064,7 @@ class spell_the_lich_king_jump : public SpellScriptLoader
class spell_the_lich_king_jump_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_the_lich_king_jump_SpellScript)
+ PrepareSpellScript(spell_the_lich_king_jump_SpellScript);
void HandleScript(SpellEffIndex effIndex)
{
@@ -3094,7 +3094,7 @@ class spell_the_lich_king_jump_remove_aura : public SpellScriptLoader
class spell_the_lich_king_jump_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_the_lich_king_jump_SpellScript)
+ PrepareSpellScript(spell_the_lich_king_jump_SpellScript);
void HandleScript(SpellEffIndex effIndex)
{
@@ -3121,7 +3121,7 @@ class spell_the_lich_king_play_movie : public SpellScriptLoader
class spell_the_lich_king_play_movie_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_the_lich_king_play_movie_SpellScript)
+ PrepareSpellScript(spell_the_lich_king_play_movie_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp
index 31542a9122a..0c504842c08 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp
@@ -1113,7 +1113,7 @@ class spell_dreamwalker_mana_void : public SpellScriptLoader
class spell_dreamwalker_mana_void_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dreamwalker_mana_void_AuraScript)
+ PrepareAuraScript(spell_dreamwalker_mana_void_AuraScript);
void PeriodicTick(AuraEffect const* aurEff)
{
@@ -1143,7 +1143,7 @@ class spell_dreamwalker_decay_periodic_timer : public SpellScriptLoader
class spell_dreamwalker_decay_periodic_timer_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dreamwalker_decay_periodic_timer_AuraScript)
+ PrepareAuraScript(spell_dreamwalker_decay_periodic_timer_AuraScript);
bool Load() override
{
@@ -1181,7 +1181,7 @@ class spell_dreamwalker_summoner : public SpellScriptLoader
class spell_dreamwalker_summoner_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_dreamwalker_summoner_SpellScript)
+ PrepareSpellScript(spell_dreamwalker_summoner_SpellScript);
bool Load() override
{
@@ -1230,7 +1230,7 @@ class spell_dreamwalker_summon_suppresser : public SpellScriptLoader
class spell_dreamwalker_summon_suppresser_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dreamwalker_summon_suppresser_AuraScript)
+ PrepareAuraScript(spell_dreamwalker_summon_suppresser_AuraScript);
void PeriodicTick(AuraEffect const* /*aurEff*/)
{
@@ -1271,7 +1271,7 @@ class spell_dreamwalker_summon_suppresser_effect : public SpellScriptLoader
class spell_dreamwalker_summon_suppresser_effect_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_dreamwalker_summon_suppresser_effect_SpellScript)
+ PrepareSpellScript(spell_dreamwalker_summon_suppresser_effect_SpellScript);
bool Load() override
{
@@ -1308,7 +1308,7 @@ class spell_dreamwalker_summon_dream_portal : public SpellScriptLoader
class spell_dreamwalker_summon_dream_portal_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_dreamwalker_summon_dream_portal_SpellScript)
+ PrepareSpellScript(spell_dreamwalker_summon_dream_portal_SpellScript);
void HandleScript(SpellEffIndex effIndex)
{
@@ -1339,7 +1339,7 @@ class spell_dreamwalker_summon_nightmare_portal : public SpellScriptLoader
class spell_dreamwalker_summon_nightmare_portal_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_dreamwalker_summon_nightmare_portal_SpellScript)
+ PrepareSpellScript(spell_dreamwalker_summon_nightmare_portal_SpellScript);
void HandleScript(SpellEffIndex effIndex)
{
@@ -1370,7 +1370,7 @@ class spell_dreamwalker_nightmare_cloud : public SpellScriptLoader
class spell_dreamwalker_nightmare_cloud_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dreamwalker_nightmare_cloud_AuraScript)
+ PrepareAuraScript(spell_dreamwalker_nightmare_cloud_AuraScript);
bool Load() override
{
@@ -1405,7 +1405,7 @@ class spell_dreamwalker_twisted_nightmares : public SpellScriptLoader
class spell_dreamwalker_twisted_nightmares_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_dreamwalker_twisted_nightmares_SpellScript)
+ PrepareSpellScript(spell_dreamwalker_twisted_nightmares_SpellScript);
void HandleScript(SpellEffIndex effIndex)
{
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp
index 96271872f87..592c44940a4 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp
@@ -1733,7 +1733,7 @@ class spell_icc_stoneform : public SpellScriptLoader
class spell_icc_stoneform_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_icc_stoneform_AuraScript)
+ PrepareAuraScript(spell_icc_stoneform_AuraScript);
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -1775,7 +1775,7 @@ class spell_icc_sprit_alarm : public SpellScriptLoader
class spell_icc_sprit_alarm_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_icc_sprit_alarm_SpellScript)
+ PrepareSpellScript(spell_icc_sprit_alarm_SpellScript);
void HandleEvent(SpellEffIndex effIndex)
{
@@ -1860,7 +1860,7 @@ class spell_frost_giant_death_plague : public SpellScriptLoader
class spell_frost_giant_death_plague_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_frost_giant_death_plague_SpellScript)
+ PrepareSpellScript(spell_frost_giant_death_plague_SpellScript);
bool Load() override
{
@@ -1922,7 +1922,7 @@ class spell_icc_harvest_blight_specimen : public SpellScriptLoader
class spell_icc_harvest_blight_specimen_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_icc_harvest_blight_specimen_SpellScript)
+ PrepareSpellScript(spell_icc_harvest_blight_specimen_SpellScript);
void HandleScript(SpellEffIndex effIndex)
{
@@ -1966,7 +1966,7 @@ class spell_svalna_revive_champion : public SpellScriptLoader
class spell_svalna_revive_champion_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_svalna_revive_champion_SpellScript)
+ PrepareSpellScript(spell_svalna_revive_champion_SpellScript);
void RemoveAliveTarget(std::list<WorldObject*>& targets)
{
@@ -2007,7 +2007,7 @@ class spell_svalna_remove_spear : public SpellScriptLoader
class spell_svalna_remove_spear_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_svalna_remove_spear_SpellScript)
+ PrepareSpellScript(spell_svalna_remove_spear_SpellScript);
void HandleScript(SpellEffIndex effIndex)
{
@@ -2040,7 +2040,7 @@ class spell_icc_soul_missile : public SpellScriptLoader
class spell_icc_soul_missile_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_icc_soul_missile_SpellScript)
+ PrepareSpellScript(spell_icc_soul_missile_SpellScript);
void RelocateDest(SpellDestination& dest)
{
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h
index fa535619e41..7b00f2f19d7 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h
+++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h
@@ -518,7 +518,7 @@ class spell_trigger_spell_from_caster : public SpellScriptLoader
class spell_trigger_spell_from_caster_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_trigger_spell_from_caster_SpellScript)
+ PrepareSpellScript(spell_trigger_spell_from_caster_SpellScript);
public:
spell_trigger_spell_from_caster_SpellScript(uint32 triggerId) : SpellScript(), _triggerId(triggerId) { }
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp
index 4f66cad51a5..77486c37498 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp
@@ -138,10 +138,10 @@ public:
bool DoEncounteraction(Unit* who, bool attack, bool reset, bool checkAllDead)
{
- Creature* Thane = Unit::GetCreature(*me, instance->GetData64(DATA_THANE));
- Creature* Lady = Unit::GetCreature(*me, instance->GetData64(DATA_LADY));
- Creature* Baron = Unit::GetCreature(*me, instance->GetData64(DATA_BARON));
- Creature* Sir = Unit::GetCreature(*me, instance->GetData64(DATA_SIR));
+ Creature* Thane = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_THANE));
+ Creature* Lady = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_LADY));
+ Creature* Baron = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_BARON));
+ Creature* Sir = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_SIR));
if (Thane && Lady && Baron && Sir)
{
@@ -226,7 +226,7 @@ public:
movementCompleted = true;
me->SetReactState(REACT_AGGRESSIVE);
- Unit* eventStarter = Unit::GetUnit(*me, uiEventStarterGUID);
+ Unit* eventStarter = ObjectAccessor::GetUnit(*me, uiEventStarterGUID);
if (eventStarter && me->IsValidAttackTarget(eventStarter))
AttackStart(eventStarter);
@@ -395,7 +395,7 @@ class spell_four_horsemen_mark : public SpellScriptLoader
class spell_four_horsemen_mark_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_four_horsemen_mark_AuraScript)
+ PrepareAuraScript(spell_four_horsemen_mark_AuraScript);
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp
index 67eb2284cfc..d973ce867f2 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp
@@ -257,25 +257,25 @@ class boss_gothik : public CreatureScript
{
case NPC_LIVE_TRAINEE:
{
- if (Creature* liveTrigger = Unit::GetCreature(*me, LiveTriggerGUID[0]))
+ if (Creature* liveTrigger = ObjectAccessor::GetCreature(*me, LiveTriggerGUID[0]))
DoSummon(NPC_LIVE_TRAINEE, liveTrigger, 1);
- if (Creature* liveTrigger1 = Unit::GetCreature(*me, LiveTriggerGUID[1]))
+ if (Creature* liveTrigger1 = ObjectAccessor::GetCreature(*me, LiveTriggerGUID[1]))
DoSummon(NPC_LIVE_TRAINEE, liveTrigger1, 1);
- if (Creature* liveTrigger2 = Unit::GetCreature(*me, LiveTriggerGUID[2]))
+ if (Creature* liveTrigger2 = ObjectAccessor::GetCreature(*me, LiveTriggerGUID[2]))
DoSummon(NPC_LIVE_TRAINEE, liveTrigger2, 1);
break;
}
case NPC_LIVE_KNIGHT:
{
- if (Creature* liveTrigger3 = Unit::GetCreature(*me, LiveTriggerGUID[3]))
+ if (Creature* liveTrigger3 = ObjectAccessor::GetCreature(*me, LiveTriggerGUID[3]))
DoSummon(NPC_LIVE_KNIGHT, liveTrigger3, 1);
- if (Creature* liveTrigger5 = Unit::GetCreature(*me, LiveTriggerGUID[5]))
+ if (Creature* liveTrigger5 = ObjectAccessor::GetCreature(*me, LiveTriggerGUID[5]))
DoSummon(NPC_LIVE_KNIGHT, liveTrigger5, 1);
break;
}
case NPC_LIVE_RIDER:
{
- if (Creature* liveTrigger4 = Unit::GetCreature(*me, LiveTriggerGUID[4]))
+ if (Creature* liveTrigger4 = ObjectAccessor::GetCreature(*me, LiveTriggerGUID[4]))
DoSummon(NPC_LIVE_RIDER, liveTrigger4, 1);
break;
}
@@ -287,21 +287,21 @@ class boss_gothik : public CreatureScript
{
case NPC_LIVE_TRAINEE:
{
- if (Creature* liveTrigger = Unit::GetCreature(*me, LiveTriggerGUID[4]))
+ if (Creature* liveTrigger = ObjectAccessor::GetCreature(*me, LiveTriggerGUID[4]))
DoSummon(NPC_LIVE_TRAINEE, liveTrigger, 1);
- if (Creature* liveTrigger2 = Unit::GetCreature(*me, LiveTriggerGUID[4]))
+ if (Creature* liveTrigger2 = ObjectAccessor::GetCreature(*me, LiveTriggerGUID[4]))
DoSummon(NPC_LIVE_TRAINEE, liveTrigger2, 1);
break;
}
case NPC_LIVE_KNIGHT:
{
- if (Creature* liveTrigger5 = Unit::GetCreature(*me, LiveTriggerGUID[4]))
+ if (Creature* liveTrigger5 = ObjectAccessor::GetCreature(*me, LiveTriggerGUID[4]))
DoSummon(NPC_LIVE_KNIGHT, liveTrigger5, 1);
break;
}
case NPC_LIVE_RIDER:
{
- if (Creature* liveTrigger4 = Unit::GetCreature(*me, LiveTriggerGUID[4]))
+ if (Creature* liveTrigger4 = ObjectAccessor::GetCreature(*me, LiveTriggerGUID[4]))
DoSummon(NPC_LIVE_RIDER, liveTrigger4, 1);
break;
}
@@ -359,7 +359,7 @@ class boss_gothik : public CreatureScript
if (spellId && me->IsInCombat())
{
me->HandleEmoteCommand(EMOTE_ONESHOT_SPELL_CAST);
- if (Creature* pRandomDeadTrigger = Unit::GetCreature(*me, DeadTriggerGUID[rand() % POS_DEAD]))
+ if (Creature* pRandomDeadTrigger = ObjectAccessor::GetCreature(*me, DeadTriggerGUID[rand() % POS_DEAD]))
me->CastSpell(pRandomDeadTrigger, spellId, true);
}
}
@@ -595,7 +595,7 @@ class spell_gothik_shadow_bolt_volley : public SpellScriptLoader
class spell_gothik_shadow_bolt_volley_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gothik_shadow_bolt_volley_SpellScript)
+ PrepareSpellScript(spell_gothik_shadow_bolt_volley_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets)
{
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp b/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp
index 03c09c8d02b..929c52a986c 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp
@@ -147,7 +147,7 @@ class spell_grobbulus_mutating_injection : public SpellScriptLoader
class spell_grobbulus_mutating_injection_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_grobbulus_mutating_injection_AuraScript)
+ PrepareAuraScript(spell_grobbulus_mutating_injection_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -190,7 +190,7 @@ class spell_grobbulus_poison_cloud : public SpellScriptLoader
class spell_grobbulus_poison_cloud_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_grobbulus_poison_cloud_AuraScript)
+ PrepareAuraScript(spell_grobbulus_poison_cloud_AuraScript);
bool Validate(SpellInfo const* spellInfo) override
{
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp
index f2d702a762f..48dc889ef2b 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp
@@ -188,7 +188,7 @@ class spell_heigan_eruption : public SpellScriptLoader
class spell_heigan_eruption_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_heigan_eruption_SpellScript)
+ PrepareSpellScript(spell_heigan_eruption_SpellScript);
void HandleScript(SpellEffIndex /*eff*/)
{
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp
index 671cefdca0e..8b3ac64fb89 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp
@@ -754,7 +754,7 @@ class spell_kelthuzad_detonate_mana : public SpellScriptLoader
class spell_kelthuzad_detonate_mana_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_kelthuzad_detonate_mana_AuraScript)
+ PrepareAuraScript(spell_kelthuzad_detonate_mana_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override
{
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp b/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp
index bcd50390ff2..946b60d4e27 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp
@@ -165,7 +165,7 @@ class spell_loatheb_necrotic_aura_warning : public SpellScriptLoader
class spell_loatheb_necrotic_aura_warning_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_loatheb_necrotic_aura_warning_AuraScript)
+ PrepareAuraScript(spell_loatheb_necrotic_aura_warning_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override
{
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp b/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp
index ce605987890..52723b591a2 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp
@@ -169,14 +169,14 @@ public:
{
victimGUID = guid;
if (me->m_spells[0] && victimGUID)
- if (Unit* victim = Unit::GetUnit(*me, victimGUID))
+ if (Unit* victim = ObjectAccessor::GetUnit(*me, victimGUID))
victim->CastSpell(victim, me->m_spells[0], true, NULL, NULL, me->GetGUID());
}
void JustDied(Unit* /*killer*/) override
{
if (me->m_spells[0] && victimGUID)
- if (Unit* victim = Unit::GetUnit(*me, victimGUID))
+ if (Unit* victim = ObjectAccessor::GetUnit(*me, victimGUID))
victim->RemoveAurasDueToSpell(me->m_spells[0], me->GetGUID());
}
};
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp
index b46d558021f..406ca3963a4 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp
@@ -123,11 +123,11 @@ public:
// Moreover, the adds may not yet be spawn. So just track down the status if mob is spawn
// and each mob will send its status at reset (meaning that it is alive)
checkFeugenAlive = false;
- if (Creature* pFeugen = me->GetCreature(*me, instance->GetData64(DATA_FEUGEN)))
+ if (Creature* pFeugen = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_FEUGEN)))
checkFeugenAlive = pFeugen->IsAlive();
checkStalaggAlive = false;
- if (Creature* pStalagg = me->GetCreature(*me, instance->GetData64(DATA_STALAGG)))
+ if (Creature* pStalagg = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_STALAGG)))
checkStalaggAlive = pStalagg->IsAlive();
if (!checkFeugenAlive && !checkStalaggAlive)
@@ -230,12 +230,12 @@ public:
{
if (!checkStalaggAlive)
{
- if (Creature* pStalagg = me->GetCreature(*me, instance->GetData64(DATA_STALAGG)))
+ if (Creature* pStalagg = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_STALAGG)))
pStalagg->Respawn();
}
else
{
- if (Creature* pFeugen = me->GetCreature(*me, instance->GetData64(DATA_FEUGEN)))
+ if (Creature* pFeugen = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_FEUGEN)))
pFeugen->Respawn();
}
}
@@ -300,7 +300,7 @@ public:
void Reset() override
{
- if (Creature* pThaddius = me->GetCreature(*me, instance->GetData64(DATA_THADDIUS)))
+ if (Creature* pThaddius = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_THADDIUS)))
if (pThaddius->AI())
pThaddius->AI()->DoAction(ACTION_STALAGG_RESET);
powerSurgeTimer = urand(20000, 25000);
@@ -322,7 +322,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
Talk(SAY_STAL_DEATH);
- if (Creature* pThaddius = me->GetCreature(*me, instance->GetData64(DATA_THADDIUS)))
+ if (Creature* pThaddius = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_THADDIUS)))
if (pThaddius->AI())
pThaddius->AI()->DoAction(ACTION_STALAGG_DIED);
}
@@ -334,7 +334,7 @@ public:
if (magneticPullTimer <= uiDiff)
{
- if (Creature* pFeugen = me->GetCreature(*me, instance->GetData64(DATA_FEUGEN)))
+ if (Creature* pFeugen = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_FEUGEN)))
{
Unit* pStalaggVictim = me->GetVictim();
Unit* pFeugenVictim = pFeugen->GetVictim();
@@ -391,7 +391,7 @@ public:
void Reset() override
{
- if (Creature* pThaddius = me->GetCreature(*me, instance->GetData64(DATA_THADDIUS)))
+ if (Creature* pThaddius = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_THADDIUS)))
if (pThaddius->AI())
pThaddius->AI()->DoAction(ACTION_FEUGEN_RESET);
staticFieldTimer = 5000;
@@ -412,7 +412,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
Talk(SAY_FEUG_DEATH);
- if (Creature* pThaddius = me->GetCreature(*me, instance->GetData64(DATA_THADDIUS)))
+ if (Creature* pThaddius = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_THADDIUS)))
if (pThaddius->AI())
pThaddius->AI()->DoAction(ACTION_FEUGEN_DIED);
}
@@ -441,7 +441,7 @@ class spell_thaddius_pos_neg_charge : public SpellScriptLoader
class spell_thaddius_pos_neg_charge_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_thaddius_pos_neg_charge_SpellScript)
+ PrepareSpellScript(spell_thaddius_pos_neg_charge_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -520,7 +520,7 @@ class spell_thaddius_polarity_shift : public SpellScriptLoader
class spell_thaddius_polarity_shift_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_thaddius_polarity_shift_SpellScript)
+ PrepareSpellScript(spell_thaddius_polarity_shift_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
index f68fac638fa..192249955cf 100644
--- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
+++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
@@ -1647,7 +1647,7 @@ class spell_malygos_portal_beam : public SpellScriptLoader
class spell_malygos_portal_beam_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_malygos_portal_beam_AuraScript)
+ PrepareAuraScript(spell_malygos_portal_beam_AuraScript);
bool Load() override
{
@@ -1694,7 +1694,7 @@ class spell_malygos_random_portal : public SpellScriptLoader
class spell_malygos_random_portal_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_malygos_random_portal_SpellScript)
+ PrepareSpellScript(spell_malygos_random_portal_SpellScript);
bool Load() override
{
@@ -1750,7 +1750,7 @@ class spell_malygos_arcane_storm : public SpellScriptLoader
class spell_malygos_arcane_storm_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_malygos_arcane_storm_SpellScript)
+ PrepareSpellScript(spell_malygos_arcane_storm_SpellScript);
bool Load() override
{
@@ -1810,7 +1810,7 @@ public:
class spell_malygos_vortex_dummy_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_malygos_vortex_dummy_SpellScript)
+ PrepareSpellScript(spell_malygos_vortex_dummy_SpellScript);
bool Load() override
{
@@ -1847,7 +1847,7 @@ class spell_malygos_vortex_visual : public SpellScriptLoader
class spell_malygos_vortex_visual_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_malygos_vortex_visual_AuraScript)
+ PrepareAuraScript(spell_malygos_vortex_visual_AuraScript);
bool Load() override
{
@@ -1926,7 +1926,7 @@ class spell_arcane_overload : public SpellScriptLoader
class spell_arcane_overload_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_arcane_overload_SpellScript)
+ PrepareSpellScript(spell_arcane_overload_SpellScript);
bool Load() override
{
@@ -1959,7 +1959,7 @@ class spell_nexus_lord_align_disk_aggro : public SpellScriptLoader
class spell_nexus_lord_align_disk_aggro_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_nexus_lord_align_disk_aggro_SpellScript)
+ PrepareSpellScript(spell_nexus_lord_align_disk_aggro_SpellScript);
bool Load() override
{
@@ -2010,7 +2010,7 @@ class spell_scion_of_eternity_arcane_barrage : public SpellScriptLoader
class spell_scion_of_eternity_arcane_barrage_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_scion_of_eternity_arcane_barrage_SpellScript)
+ PrepareSpellScript(spell_scion_of_eternity_arcane_barrage_SpellScript);
bool Load() override
{
@@ -2094,7 +2094,7 @@ class spell_malygos_destroy_platform_channel : public SpellScriptLoader
class spell_malygos_destroy_platform_channel_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_malygos_destroy_platform_channel_AuraScript)
+ PrepareAuraScript(spell_malygos_destroy_platform_channel_AuraScript);
bool Load() override
{
@@ -2136,7 +2136,7 @@ class spell_alexstrasza_bunny_destroy_platform_boom_visual : public SpellScriptL
class spell_alexstrasza_bunny_destroy_platform_boom_visual_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_alexstrasza_bunny_destroy_platform_boom_visual_SpellScript)
+ PrepareSpellScript(spell_alexstrasza_bunny_destroy_platform_boom_visual_SpellScript);
bool Load() override
{
@@ -2176,7 +2176,7 @@ class spell_alexstrasza_bunny_destroy_platform_event : public SpellScriptLoader
class spell_alexstrasza_bunny_destroy_platform_event_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_alexstrasza_bunny_destroy_platform_event_SpellScript)
+ PrepareSpellScript(spell_alexstrasza_bunny_destroy_platform_event_SpellScript);
bool Load() override
{
@@ -2217,7 +2217,7 @@ class spell_wyrmrest_skytalon_summon_red_dragon_buddy : public SpellScriptLoader
class spell_wyrmrest_skytalon_summon_red_dragon_buddy_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_wyrmrest_skytalon_summon_red_dragon_buddy_SpellScript)
+ PrepareSpellScript(spell_wyrmrest_skytalon_summon_red_dragon_buddy_SpellScript);
bool Load() override
{
@@ -2250,7 +2250,7 @@ class spell_wyrmrest_skytalon_ride_red_dragon_buddy_trigger : public SpellScript
class spell_wyrmrest_skytalon_ride_red_dragon_buddy_trigger_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_wyrmrest_skytalon_ride_red_dragon_buddy_trigger_SpellScript)
+ PrepareSpellScript(spell_wyrmrest_skytalon_ride_red_dragon_buddy_trigger_SpellScript);
bool Load() override
{
@@ -2282,7 +2282,7 @@ class spell_malygos_surge_of_power_warning_selector_25 : public SpellScriptLoade
class spell_malygos_surge_of_power_warning_selector_25_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_malygos_surge_of_power_warning_selector_25_SpellScript)
+ PrepareSpellScript(spell_malygos_surge_of_power_warning_selector_25_SpellScript);
bool Load() override
{
@@ -2348,7 +2348,7 @@ class spell_malygos_surge_of_power_25 : public SpellScriptLoader
class spell_malygos_surge_of_power_25_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_malygos_surge_of_power_25_SpellScript)
+ PrepareSpellScript(spell_malygos_surge_of_power_25_SpellScript);
bool Load() override
{
@@ -2399,7 +2399,7 @@ class spell_alexstrasza_gift_beam : public SpellScriptLoader
class spell_alexstrasza_gift_beam_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_alexstrasza_gift_beam_AuraScript)
+ PrepareAuraScript(spell_alexstrasza_gift_beam_AuraScript);
bool Load() override
{
@@ -2446,7 +2446,7 @@ class spell_alexstrasza_gift_beam_visual : public SpellScriptLoader
class spell_alexstrasza_gift_beam_visual_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_alexstrasza_gift_beam_visual_AuraScript)
+ PrepareAuraScript(spell_alexstrasza_gift_beam_visual_AuraScript);
bool Load() override
{
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp
index 6e36f95e03b..38e6a3fc816 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp
@@ -234,7 +234,7 @@ class spell_intense_cold : public SpellScriptLoader
class spell_intense_cold_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_intense_cold_AuraScript)
+ PrepareAuraScript(spell_intense_cold_AuraScript);
void HandlePeriodicTick(AuraEffect const* aurEff)
{
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp
index 55f3b7b7315..222f0474c01 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp
@@ -263,7 +263,7 @@ class spell_crystal_spike : public SpellScriptLoader
class spell_crystal_spike_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_crystal_spike_AuraScript)
+ PrepareAuraScript(spell_crystal_spike_AuraScript);
void HandlePeriodic(AuraEffect const* /*aurEff*/)
{
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp
index 0c18984d970..3ae61bdd116 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp
@@ -258,7 +258,7 @@ class spell_eregos_planar_shift : public SpellScriptLoader
class spell_eregos_planar_shift_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_eregos_planar_shift_AuraScript)
+ PrepareAuraScript(spell_eregos_planar_shift_AuraScript);
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp
index 22e266a4cd1..585da8e28d3 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp
@@ -249,7 +249,7 @@ class spell_varos_centrifuge_shield : public SpellScriptLoader
class spell_varos_centrifuge_shield_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_varos_centrifuge_shield_AuraScript)
+ PrepareAuraScript(spell_varos_centrifuge_shield_AuraScript);
bool Load() override
{
@@ -299,7 +299,7 @@ class spell_varos_energize_core_area_enemy : public SpellScriptLoader
class spell_varos_energize_core_area_enemySpellScript : public SpellScript
{
- PrepareSpellScript(spell_varos_energize_core_area_enemySpellScript)
+ PrepareSpellScript(spell_varos_energize_core_area_enemySpellScript);
void FilterTargets(std::list<WorldObject*>& targets)
{
@@ -343,7 +343,7 @@ class spell_varos_energize_core_area_entry : public SpellScriptLoader
class spell_varos_energize_core_area_entrySpellScript : public SpellScript
{
- PrepareSpellScript(spell_varos_energize_core_area_entrySpellScript)
+ PrepareSpellScript(spell_varos_energize_core_area_entrySpellScript);
void FilterTargets(std::list<WorldObject*>& targets)
{
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp
index 875bd4e39cb..259d7faa6fe 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp
@@ -371,7 +371,7 @@ class spell_oculus_call_ruby_emerald_amber_drake : public SpellScriptLoader
class spell_oculus_call_ruby_emerald_amber_drake_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_oculus_call_ruby_emerald_amber_drake_SpellScript)
+ PrepareSpellScript(spell_oculus_call_ruby_emerald_amber_drake_SpellScript);
void SetDest(SpellDestination& dest)
{
@@ -402,7 +402,7 @@ class spell_oculus_ride_ruby_emerald_amber_drake_que : public SpellScriptLoader
class spell_oculus_ride_ruby_emerald_amber_drake_que_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_oculus_ride_ruby_emerald_amber_drake_que_AuraScript)
+ PrepareAuraScript(spell_oculus_ride_ruby_emerald_amber_drake_que_AuraScript);
void HandlePeriodic(AuraEffect const* aurEff)
{
@@ -432,7 +432,7 @@ class spell_oculus_evasive_maneuvers : public SpellScriptLoader
class spell_oculus_evasive_maneuvers_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_oculus_evasive_maneuvers_AuraScript)
+ PrepareAuraScript(spell_oculus_evasive_maneuvers_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -469,7 +469,7 @@ class spell_oculus_shock_lance : public SpellScriptLoader
class spell_oculus_shock_lance_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_oculus_shock_lance_SpellScript)
+ PrepareSpellScript(spell_oculus_shock_lance_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -511,7 +511,7 @@ class spell_oculus_stop_time : public SpellScriptLoader
class spell_oculus_stop_time_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_oculus_stop_time_AuraScript)
+ PrepareAuraScript(spell_oculus_stop_time_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -551,7 +551,7 @@ class spell_oculus_temporal_rift : public SpellScriptLoader
class spell_oculus_temporal_rift_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_oculus_temporal_rift_AuraScript)
+ PrepareAuraScript(spell_oculus_temporal_rift_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -595,7 +595,7 @@ class spell_oculus_touch_the_nightmare : public SpellScriptLoader
class spell_oculus_touch_the_nightmare_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_oculus_touch_the_nightmare_SpellScript)
+ PrepareSpellScript(spell_oculus_touch_the_nightmare_SpellScript);
void HandleDamageCalc(SpellEffIndex /*effIndex*/)
{
@@ -622,7 +622,7 @@ class spell_oculus_dream_funnel : public SpellScriptLoader
class spell_oculus_dream_funnel_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_oculus_dream_funnel_AuraScript)
+ PrepareAuraScript(spell_oculus_dream_funnel_AuraScript);
void HandleEffectCalcAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& canBeRecalculated)
{
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp
index 727060578c8..24d145f097f 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp
@@ -164,7 +164,7 @@ public:
for (uint8 i = 0; i < 2; ++i)
{
- if (Creature* pStormforgedLieutenant = (Unit::GetCreature((*me), m_auiStormforgedLieutenantGUID[i])))
+ if (Creature* pStormforgedLieutenant = (ObjectAccessor::GetCreature((*me), m_auiStormforgedLieutenantGUID[i])))
{
if (!pStormforgedLieutenant->IsAlive())
pStormforgedLieutenant->Respawn();
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp
index 867944ca423..576fc4492f1 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp
@@ -190,7 +190,7 @@ class spell_loken_pulsing_shockwave : public SpellScriptLoader
class spell_loken_pulsing_shockwave_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_loken_pulsing_shockwave_SpellScript)
+ PrepareSpellScript(spell_loken_pulsing_shockwave_SpellScript);
void CalculateDamage(SpellEffIndex /*effIndex*/)
{
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp
index 880045b96ef..d0b8f75e711 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp
@@ -164,7 +164,7 @@ public:
for (std::list<uint64>::const_iterator itr = m_lGolemGUIDList.begin(); itr != m_lGolemGUIDList.end(); ++itr)
{
- if (Creature* temp = Unit::GetCreature(*me, *itr))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, *itr))
{
if (temp->IsAlive())
temp->DespawnOrUnsummon();
@@ -181,7 +181,7 @@ public:
for (std::list<uint64>::const_iterator itr = m_lGolemGUIDList.begin(); itr != m_lGolemGUIDList.end(); ++itr)
{
- if (Creature* temp = Unit::GetCreature(*me, *itr))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, *itr))
{
// Only shatter brittle golems
if (temp->IsAlive() && temp->GetEntry() == NPC_BRITTLE_GOLEM)
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp
index 459f68d67ee..07cdfa3353c 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp
@@ -15,14 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* Script Data Start
-SDName: Boss krystallus
-SDAuthor: LordVanMartin
-SD%Complete:
-SDComment:
-SDCategory:
-Script Data End */
-
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "SpellScript.h"
@@ -30,17 +22,13 @@ Script Data End */
enum Spells
{
- SPELL_BOULDER_TOSS = 50843,
- H_SPELL_BOULDER_TOSS = 59742,
- SPELL_GROUND_SPIKE = 59750,
- SPELL_GROUND_SLAM = 50827,
- SPELL_SHATTER = 50810,
- H_SPELL_SHATTER = 61546,
- SPELL_SHATTER_EFFECT = 50811,
- H_SPELL_SHATTER_EFFECT = 61547,
- SPELL_STONED = 50812,
- SPELL_STOMP = 48131,
- H_SPELL_STOMP = 59744
+ SPELL_BOULDER_TOSS = 50843,
+ SPELL_GROUND_SPIKE = 59750,
+ SPELL_GROUND_SLAM = 50827,
+ SPELL_SHATTER = 50810,
+ SPELL_SHATTER_EFFECT = 50811,
+ SPELL_STONED = 50812,
+ SPELL_STOMP = 48131
};
enum Yells
@@ -51,133 +39,103 @@ enum Yells
SAY_SHATTER = 3
};
-class boss_krystallus : public CreatureScript
+enum Events
{
-public:
- boss_krystallus() : CreatureScript("boss_krystallus") { }
-
- struct boss_krystallusAI : public ScriptedAI
- {
- boss_krystallusAI(Creature* creature) : ScriptedAI(creature)
- {
- instance = creature->GetInstanceScript();
- }
-
- uint32 uiBoulderTossTimer;
- uint32 uiGroundSpikeTimer;
- uint32 uiGroundSlamTimer;
- uint32 uiShatterTimer;
- uint32 uiStompTimer;
-
- bool bIsSlam;
-
- InstanceScript* instance;
-
- void Reset() override
- {
- bIsSlam = false;
-
- uiBoulderTossTimer = urand(3000, 9000);
- uiGroundSpikeTimer = urand(9000, 14000);
- uiGroundSlamTimer = urand(15000, 18000);
- uiStompTimer = urand(20000, 29000);
- uiShatterTimer = 0;
-
- instance->SetBossState(DATA_KRYSTALLUS, NOT_STARTED);
- }
- void EnterCombat(Unit* /*who*/) override
- {
- Talk(SAY_AGGRO);
+ EVENT_BOULDER_TOSS = 1,
+ EVENT_GROUND_SPIKE,
+ EVENT_GROUND_SLAM,
+ EVENT_STOMP,
+ EVENT_SHATTER
+};
- instance->SetBossState(DATA_KRYSTALLUS, IN_PROGRESS);
- }
+class boss_krystallus : public CreatureScript
+{
+ public:
+ boss_krystallus() : CreatureScript("boss_krystallus") { }
- void UpdateAI(uint32 diff) override
+ struct boss_krystallusAI : public BossAI
{
- //Return since we have no target
- if (!UpdateVictim())
- return;
+ boss_krystallusAI(Creature* creature) : BossAI(creature, DATA_KRYSTALLUS) { }
- if (uiBoulderTossTimer <= diff)
+ void Reset() override
{
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
- DoCast(target, SPELL_BOULDER_TOSS);
- uiBoulderTossTimer = urand(9000, 15000);
- } else uiBoulderTossTimer -= diff;
-
- if (uiGroundSpikeTimer <= diff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
- DoCast(target, SPELL_GROUND_SPIKE);
- uiGroundSpikeTimer = urand(12000, 17000);
- } else uiGroundSpikeTimer -= diff;
-
- if (uiStompTimer <= diff)
- {
- DoCast(me, SPELL_STOMP);
- uiStompTimer = urand(20000, 29000);
- } else uiStompTimer -= diff;
-
- if (uiGroundSlamTimer <= diff)
- {
- DoCast(me, SPELL_GROUND_SLAM);
- bIsSlam = true;
- uiShatterTimer = 10000;
- uiGroundSlamTimer = urand(15000, 18000);
- } else uiGroundSlamTimer -= diff;
+ _Reset();
+ }
- if (bIsSlam)
+ void EnterCombat(Unit* /*who*/) override
{
- if (uiShatterTimer <= diff)
- {
- DoCast(me, DUNGEON_MODE(SPELL_SHATTER, H_SPELL_SHATTER));
- } else uiShatterTimer -= diff;
+ Talk(SAY_AGGRO);
+ _EnterCombat();
+
+ events.ScheduleEvent(EVENT_BOULDER_TOSS, urand(3000, 9000));
+ events.ScheduleEvent(EVENT_GROUND_SLAM, urand(15000, 18000));
+ events.ScheduleEvent(EVENT_STOMP, urand(20000, 29000));
+ if (IsHeroic())
+ events.ScheduleEvent(EVENT_GROUND_SPIKE, urand(9000, 14000));
}
- DoMeleeAttackIfReady();
- }
-
- void JustDied(Unit* /*killer*/) override
- {
- Talk(SAY_DEATH);
-
- instance->SetBossState(DATA_KRYSTALLUS, DONE);
- }
+ void UpdateAI(uint32 diff) override
+ {
+ // Return since we have no target
+ if (!UpdateVictim())
+ return;
- void KilledUnit(Unit* victim) override
- {
- if (victim->GetTypeId() != TYPEID_PLAYER)
- return;
+ events.Update(diff);
- Talk(SAY_KILL);
- }
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
- void SpellHitTarget(Unit* /*target*/, const SpellInfo* pSpell) override
- {
- //this part should be in the core
- if (pSpell->Id == SPELL_SHATTER || pSpell->Id == H_SPELL_SHATTER)
- {
- /// @todo we need eventmap to kill this stuff
- //clear this, if we are still performing
- if (bIsSlam)
+ while (uint32 eventId = events.ExecuteEvent())
{
- bIsSlam = false;
-
- //and correct movement, if not already
- if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() != CHASE_MOTION_TYPE)
+ switch (eventId)
{
- if (me->GetVictim())
- me->GetMotionMaster()->MoveChase(me->GetVictim());
+ case EVENT_BOULDER_TOSS:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 50.0f, true))
+ DoCast(target, SPELL_BOULDER_TOSS);
+ events.ScheduleEvent(EVENT_BOULDER_TOSS, urand(9000, 15000));
+ break;
+ case EVENT_GROUND_SPIKE:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true))
+ DoCast(target, SPELL_GROUND_SPIKE);
+ events.ScheduleEvent(EVENT_GROUND_SPIKE, urand(12000, 17000));
+ break;
+ case EVENT_GROUND_SLAM:
+ DoCast(me, SPELL_GROUND_SLAM);
+ events.ScheduleEvent(EVENT_SHATTER, 10000);
+ events.ScheduleEvent(EVENT_GROUND_SLAM, urand(15000, 18000));
+ break;
+ case EVENT_STOMP:
+ DoCast(me, SPELL_STOMP);
+ events.ScheduleEvent(EVENT_STOMP, urand(20000, 29000));
+ break;
+ case EVENT_SHATTER:
+ DoCast(me, SPELL_SHATTER);
+ break;
+ default:
+ break;
}
}
+
+ DoMeleeAttackIfReady();
+ }
+
+ void JustDied(Unit* /*killer*/) override
+ {
+ Talk(SAY_DEATH);
+ _JustDied();
}
- }
- };
- CreatureAI* GetAI(Creature* creature) const override
- {
- return GetHallsOfStoneAI<boss_krystallusAI>(creature);
- }
+ void KilledUnit(Unit* victim) override
+ {
+ if (victim->GetTypeId() == TYPEID_PLAYER)
+ Talk(SAY_KILL);
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const override
+ {
+ return GetHallsOfStoneAI<boss_krystallusAI>(creature);
+ }
};
class spell_krystallus_shatter : public SpellScriptLoader
@@ -187,7 +145,7 @@ class spell_krystallus_shatter : public SpellScriptLoader
class spell_krystallus_shatter_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_krystallus_shatter_SpellScript)
+ PrepareSpellScript(spell_krystallus_shatter_SpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
@@ -217,7 +175,7 @@ class spell_krystallus_shatter_effect : public SpellScriptLoader
class spell_krystallus_shatter_effect_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_krystallus_shatter_effect_SpellScript)
+ PrepareSpellScript(spell_krystallus_shatter_effect_SpellScript);
void CalculateDamage()
{
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp
index f666f5d5874..cedf06a3154 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp
@@ -211,7 +211,7 @@ public:
if (!KaddrakGUIDList.empty())
for (std::list<uint64>::const_iterator itr = KaddrakGUIDList.begin(); itr != KaddrakGUIDList.end(); ++itr)
{
- if (Creature* pKaddrak = Unit::GetCreature(*me, *itr))
+ if (Creature* pKaddrak = ObjectAccessor::GetCreature(*me, *itr))
{
if (pKaddrak->IsAlive())
pKaddrak->CastSpell(target, DUNGEON_MODE(SPELL_GLARE_OF_THE_TRIBUNAL, H_SPELL_GLARE_OF_THE_TRIBUNAL), true);
@@ -331,7 +331,7 @@ public:
return;
for (std::list<uint64>::const_iterator itr = lDwarfGUIDList.begin(); itr != lDwarfGUIDList.end(); ++itr)
{
- Creature* temp = Unit::GetCreature(*me, instance ? (*itr) : 0);
+ Creature* temp = ObjectAccessor::GetCreature(*me, instance ? (*itr) : 0);
if (temp && temp->IsAlive())
temp->DespawnOrUnsummon();
}
@@ -446,7 +446,7 @@ public:
JumpToNextStep(0);
break;
case 5:
- if (Creature* temp = (Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM))))
+ if (Creature* temp = (ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM))))
temp->AI()->Talk(SAY_EVENT_INTRO_3_ABED);
JumpToNextStep(8500);
break;
@@ -455,14 +455,14 @@ public:
JumpToNextStep(6500);
break;
case 7:
- if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_KADDRAK)))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_KADDRAK)))
temp->AI()->Talk(SAY_EVENT_A_2_KADD);
JumpToNextStep(12500);
break;
case 8:
Talk(SAY_EVENT_A_3);
instance->HandleGameObject(instance->GetData64(DATA_GO_KADDRAK), true);
- if (Creature* temp = Unit::GetCreature(*me, uiControllerGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiControllerGUID))
CAST_AI(npc_tribuna_controller::npc_tribuna_controllerAI, temp->AI())->bKaddrakActivated = true;
JumpToNextStep(5000);
break;
@@ -476,7 +476,7 @@ public:
JumpToNextStep(6000);
break;
case 11:
- if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_MARNAK)))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_MARNAK)))
temp->AI()->Talk(SAY_EVENT_B_2_MARN);
SpawnDwarf(1);
JumpToNextStep(20000);
@@ -484,7 +484,7 @@ public:
case 12:
Talk(SAY_EVENT_B_3);
instance->HandleGameObject(instance->GetData64(DATA_GO_MARNAK), true);
- if (Creature* temp = Unit::GetCreature(*me, uiControllerGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiControllerGUID))
CAST_AI(npc_tribuna_controller::npc_tribuna_controllerAI, temp->AI())->bMarnakActivated = true;
JumpToNextStep(10000);
break;
@@ -506,7 +506,7 @@ public:
JumpToNextStep(20000);
break;
case 17:
- if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM)))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM)))
temp->AI()->Talk(SAY_EVENT_C_2_ABED);
SpawnDwarf(1);
JumpToNextStep(20000);
@@ -514,7 +514,7 @@ public:
case 18:
Talk(SAY_EVENT_C_3);
instance->HandleGameObject(instance->GetData64(DATA_GO_ABEDNEUM), true);
- if (Creature* temp = Unit::GetCreature(*me, uiControllerGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiControllerGUID))
CAST_AI(npc_tribuna_controller::npc_tribuna_controllerAI, temp->AI())->bAbedneumActivated = true;
JumpToNextStep(5000);
break;
@@ -532,7 +532,7 @@ public:
JumpToNextStep(20000);
break;
case 22:
- if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM)))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM)))
temp->AI()->Talk(SAY_EVENT_D_2_ABED);
SpawnDwarf(1);
JumpToNextStep(5000);
@@ -555,7 +555,7 @@ public:
JumpToNextStep(10000);
break;
case 27:
- if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM)))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM)))
temp->AI()->Talk(SAY_EVENT_D_4_ABED);
SpawnDwarf(1);
JumpToNextStep(10000);
@@ -565,7 +565,7 @@ public:
Talk(SAY_EVENT_END_01);
me->SetStandState(UNIT_STAND_STATE_STAND);
instance->HandleGameObject(instance->GetData64(DATA_GO_SKY_FLOOR), true);
- if (Creature* temp = Unit::GetCreature(*me, uiControllerGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, uiControllerGUID))
temp->DealDamage(temp, temp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
bIsBattle = true;
SetEscortPaused(false);
@@ -578,7 +578,7 @@ public:
JumpToNextStep(5500);
break;
case 30:
- if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM)))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM)))
temp->AI()->Talk(SAY_EVENT_END_03_ABED);
JumpToNextStep(8500);
break;
@@ -587,7 +587,7 @@ public:
JumpToNextStep(11500);
break;
case 32:
- if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM)))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM)))
temp->AI()->Talk(SAY_EVENT_END_05_ABED);
JumpToNextStep(11500);
break;
@@ -596,7 +596,7 @@ public:
JumpToNextStep(4500);
break;
case 34:
- if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM)))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM)))
temp->AI()->Talk(SAY_EVENT_END_07_ABED);
JumpToNextStep(22500);
break;
@@ -605,7 +605,7 @@ public:
JumpToNextStep(7500);
break;
case 36:
- if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_KADDRAK)))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_KADDRAK)))
temp->AI()->Talk(SAY_EVENT_END_09_KADD);
JumpToNextStep(18500);
break;
@@ -614,7 +614,7 @@ public:
JumpToNextStep(5500);
break;
case 38:
- if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_KADDRAK)))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_KADDRAK)))
temp->AI()->Talk(SAY_EVENT_END_11_KADD);
JumpToNextStep(20500);
break;
@@ -623,7 +623,7 @@ public:
JumpToNextStep(2500);
break;
case 40:
- if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_KADDRAK)))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_KADDRAK)))
temp->AI()->Talk(SAY_EVENT_END_13_KADD);
JumpToNextStep(19500);
break;
@@ -632,7 +632,7 @@ public:
JumpToNextStep(10500);
break;
case 42:
- if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_MARNAK)))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_MARNAK)))
temp->AI()->Talk(SAY_EVENT_END_15_MARN);
JumpToNextStep(6500);
break;
@@ -641,7 +641,7 @@ public:
JumpToNextStep(6500);
break;
case 44:
- if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_MARNAK)))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_MARNAK)))
temp->AI()->Talk(SAY_EVENT_END_17_MARN);
JumpToNextStep(25500);
break;
@@ -650,7 +650,7 @@ public:
JumpToNextStep(23500);
break;
case 46:
- if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_MARNAK)))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_MARNAK)))
temp->AI()->Talk(SAY_EVENT_END_19_MARN);
JumpToNextStep(3500);
break;
@@ -659,7 +659,7 @@ public:
JumpToNextStep(8500);
break;
case 48:
- if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM)))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM)))
temp->AI()->Talk(SAY_EVENT_END_21_ABED);
JumpToNextStep(5500);
break;
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp
index f7af92172c1..67500382758 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp
@@ -1039,7 +1039,7 @@ class spell_algalon_phase_punch : public SpellScriptLoader
class spell_algalon_phase_punch_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_algalon_phase_punch_AuraScript)
+ PrepareAuraScript(spell_algalon_phase_punch_AuraScript);
void HandlePeriodic(AuraEffect const* /*aurEff*/)
{
@@ -1093,7 +1093,7 @@ class spell_algalon_arcane_barrage : public SpellScriptLoader
class spell_algalon_arcane_barrage_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_algalon_arcane_barrage_SpellScript)
+ PrepareSpellScript(spell_algalon_arcane_barrage_SpellScript);
void SelectTarget(std::list<WorldObject*>& targets)
{
@@ -1128,7 +1128,7 @@ class spell_algalon_trigger_3_adds : public SpellScriptLoader
class spell_algalon_trigger_3_adds_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_algalon_trigger_3_adds_SpellScript)
+ PrepareSpellScript(spell_algalon_trigger_3_adds_SpellScript);
void SelectTarget(std::list<WorldObject*>& targets)
{
@@ -1164,7 +1164,7 @@ class spell_algalon_collapse : public SpellScriptLoader
class spell_algalon_collapse_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_algalon_collapse_AuraScript)
+ PrepareAuraScript(spell_algalon_collapse_AuraScript);
void HandlePeriodic(AuraEffect const* /*aurEff*/)
{
@@ -1191,7 +1191,7 @@ class spell_algalon_big_bang : public SpellScriptLoader
class spell_algalon_big_bang_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_algalon_big_bang_SpellScript)
+ PrepareSpellScript(spell_algalon_big_bang_SpellScript);
bool Load() override
{
@@ -1232,7 +1232,7 @@ class spell_algalon_remove_phase : public SpellScriptLoader
class spell_algalon_remove_phase_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_algalon_remove_phase_AuraScript)
+ PrepareAuraScript(spell_algalon_remove_phase_AuraScript);
void HandlePeriodic(AuraEffect const* /*aurEff*/)
{
@@ -1260,7 +1260,7 @@ class spell_algalon_cosmic_smash : public SpellScriptLoader
class spell_algalon_cosmic_smash_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_algalon_cosmic_smash_SpellScript)
+ PrepareSpellScript(spell_algalon_cosmic_smash_SpellScript);
void ModDestHeight(SpellDestination& dest)
{
@@ -1287,7 +1287,7 @@ class spell_algalon_cosmic_smash_damage : public SpellScriptLoader
class spell_algalon_cosmic_smash_damage_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_algalon_cosmic_smash_damage_SpellScript)
+ PrepareSpellScript(spell_algalon_cosmic_smash_damage_SpellScript);
void RecalculateDamage()
{
@@ -1318,7 +1318,7 @@ class spell_algalon_supermassive_fail : public SpellScriptLoader
class spell_algalon_supermassive_fail_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_algalon_supermassive_fail_SpellScript)
+ PrepareSpellScript(spell_algalon_supermassive_fail_SpellScript);
void RecalculateDamage()
{
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp
index 98e9b52524b..9a08f01c279 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp
@@ -633,7 +633,7 @@ class spell_shield_of_runes : public SpellScriptLoader
class spell_shield_of_runes_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_shield_of_runes_AuraScript)
+ PrepareAuraScript(spell_shield_of_runes_AuraScript);
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -661,7 +661,7 @@ class spell_assembly_meltdown : public SpellScriptLoader
class spell_assembly_meltdown_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_assembly_meltdown_SpellScript)
+ PrepareSpellScript(spell_assembly_meltdown_SpellScript);
void HandleInstaKill(SpellEffIndex /*effIndex*/)
{
@@ -689,7 +689,7 @@ class spell_assembly_rune_of_summoning : public SpellScriptLoader
class spell_assembly_rune_of_summoning_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_assembly_rune_of_summoning_AuraScript)
+ PrepareAuraScript(spell_assembly_rune_of_summoning_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override
{
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp
index 9a792e118ea..f0b8e123c63 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp
@@ -489,7 +489,7 @@ class spell_auriaya_strenght_of_the_pack : public SpellScriptLoader
class spell_auriaya_strenght_of_the_pack_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_auriaya_strenght_of_the_pack_SpellScript)
+ PrepareSpellScript(spell_auriaya_strenght_of_the_pack_SpellScript);
void FilterTargets(std::list<WorldObject*>& unitList)
{
@@ -515,7 +515,7 @@ class spell_auriaya_sentinel_blast : public SpellScriptLoader
class spell_auriaya_sentinel_blast_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_auriaya_sentinel_blast_SpellScript)
+ PrepareSpellScript(spell_auriaya_sentinel_blast_SpellScript);
void FilterTargets(std::list<WorldObject*>& unitList)
{
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp
index 6312523bb25..52cda5148cf 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp
@@ -1458,7 +1458,7 @@ class spell_load_into_catapult : public SpellScriptLoader
class spell_load_into_catapult_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_load_into_catapult_AuraScript)
+ PrepareAuraScript(spell_load_into_catapult_AuraScript);
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -1503,7 +1503,7 @@ class spell_auto_repair : public SpellScriptLoader
class spell_auto_repair_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_auto_repair_SpellScript)
+ PrepareSpellScript(spell_auto_repair_SpellScript);
void CheckCooldownForTarget()
{
@@ -1564,7 +1564,7 @@ class spell_systems_shutdown : public SpellScriptLoader
class spell_systems_shutdown_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_systems_shutdown_AuraScript)
+ PrepareAuraScript(spell_systems_shutdown_AuraScript);
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -1650,7 +1650,7 @@ class spell_pursue : public SpellScriptLoader
class spell_pursue_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_pursue_SpellScript)
+ PrepareSpellScript(spell_pursue_SpellScript);
bool Load() override
{
@@ -1722,7 +1722,7 @@ class spell_vehicle_throw_passenger : public SpellScriptLoader
class spell_vehicle_throw_passenger_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_vehicle_throw_passenger_SpellScript)
+ PrepareSpellScript(spell_vehicle_throw_passenger_SpellScript);
void HandleScript(SpellEffIndex effIndex)
{
Spell* baseSpell = GetSpell();
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp
index 8b81e8ef8f5..57df8c76a56 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp
@@ -1533,7 +1533,7 @@ class spell_freya_attuned_to_nature_dose_reduction : public SpellScriptLoader
class spell_freya_attuned_to_nature_dose_reduction_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_freya_attuned_to_nature_dose_reduction_SpellScript)
+ PrepareSpellScript(spell_freya_attuned_to_nature_dose_reduction_SpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
@@ -1580,7 +1580,7 @@ class spell_freya_iron_roots : public SpellScriptLoader
class spell_freya_iron_roots_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_freya_iron_roots_SpellScript)
+ PrepareSpellScript(spell_freya_iron_roots_SpellScript);
void HandleSummon(SpellEffIndex effIndex)
{
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp
index fbfcf442e42..011d1844adf 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp
@@ -332,7 +332,7 @@ class boss_saronite_animus : public CreatureScript
void JustDied(Unit* /*killer*/) override
{
- if (Creature* Vezax = me->GetCreature(*me, instance->GetData64(BOSS_VEZAX)))
+ if (Creature* Vezax = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_VEZAX)))
Vezax->AI()->DoAction(ACTION_ANIMUS_DIE);
}
@@ -427,7 +427,7 @@ class npc_saronite_vapors : public CreatureScript
DoCast(me, SPELL_SARONITE_VAPORS);
me->DespawnOrUnsummon(30000);
- if (Creature* Vezax = me->GetCreature(*me, instance->GetData64(BOSS_VEZAX)))
+ if (Creature* Vezax = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_VEZAX)))
Vezax->AI()->DoAction(ACTION_VAPORS_DIE);
}
}
@@ -450,7 +450,7 @@ class spell_general_vezax_mark_of_the_faceless : public SpellScriptLoader
class spell_general_vezax_mark_of_the_faceless_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_general_vezax_mark_of_the_faceless_AuraScript)
+ PrepareAuraScript(spell_general_vezax_mark_of_the_faceless_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/)
{
@@ -484,7 +484,7 @@ class spell_general_vezax_mark_of_the_faceless_leech : public SpellScriptLoader
class spell_general_vezax_mark_of_the_faceless_leech_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_general_vezax_mark_of_the_faceless_leech_SpellScript)
+ PrepareSpellScript(spell_general_vezax_mark_of_the_faceless_leech_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets)
{
@@ -494,13 +494,13 @@ class spell_general_vezax_mark_of_the_faceless_leech : public SpellScriptLoader
FinishCast(SPELL_FAILED_NO_VALID_TARGETS);
}
- void Register()
+ void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_general_vezax_mark_of_the_faceless_leech_SpellScript::FilterTargets, EFFECT_1, TARGET_UNIT_DEST_AREA_ENEMY);
}
};
- SpellScript* GetSpellScript() const
+ SpellScript* GetSpellScript() const override
{
return new spell_general_vezax_mark_of_the_faceless_leech_SpellScript();
}
@@ -513,7 +513,7 @@ class spell_general_vezax_saronite_vapors : public SpellScriptLoader
class spell_general_vezax_saronite_vapors_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_general_vezax_saronite_vapors_AuraScript)
+ PrepareAuraScript(spell_general_vezax_saronite_vapors_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override
{
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp
index 464efba920c..4d904b04618 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp
@@ -921,7 +921,7 @@ class spell_biting_cold : public SpellScriptLoader
class spell_biting_cold_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_biting_cold_AuraScript)
+ PrepareAuraScript(spell_biting_cold_AuraScript);
void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
{
@@ -977,7 +977,7 @@ public:
class spell_biting_cold_dot_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_biting_cold_dot_AuraScript)
+ PrepareAuraScript(spell_biting_cold_dot_AuraScript);
void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
{
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp
index 68888e04b8f..6be3586de28 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp
@@ -399,7 +399,7 @@ class npc_scorch_ground : public CreatureScript
{
if (_heatTimer <= uiDiff)
{
- Creature* construct = me->GetCreature(*me, _constructGUID);
+ Creature* construct = ObjectAccessor::GetCreature(*me, _constructGUID);
if (construct && !construct->HasAura(SPELL_MOLTEN))
{
me->AddAura(SPELL_HEAT, construct);
@@ -430,7 +430,7 @@ class spell_ignis_slag_pot : public SpellScriptLoader
class spell_ignis_slag_pot_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_ignis_slag_pot_AuraScript)
+ PrepareAuraScript(spell_ignis_slag_pot_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp
index 67ec9c55eb5..58969fd63c8 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp
@@ -234,7 +234,7 @@ class boss_kologarn : public CreatureScript
// Victim gets 67351
if (eyebeamTarget)
{
- if (Unit* target = Unit::GetUnit(*summon, eyebeamTarget))
+ if (Unit* target = ObjectAccessor::GetUnit(*summon, eyebeamTarget))
{
summon->Attack(target, false);
summon->GetMotionMaster()->MoveChase(target);
@@ -331,7 +331,7 @@ class spell_ulduar_rubble_summon : public SpellScriptLoader
class spell_ulduar_rubble_summonSpellScript : public SpellScript
{
- PrepareSpellScript(spell_ulduar_rubble_summonSpellScript)
+ PrepareSpellScript(spell_ulduar_rubble_summonSpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
@@ -385,7 +385,7 @@ class spell_ulduar_stone_grip_cast_target : public SpellScriptLoader
class spell_ulduar_stone_grip_cast_target_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_ulduar_stone_grip_cast_target_SpellScript)
+ PrepareSpellScript(spell_ulduar_stone_grip_cast_target_SpellScript);
bool Load() override
{
@@ -445,7 +445,7 @@ class spell_ulduar_cancel_stone_grip : public SpellScriptLoader
class spell_ulduar_cancel_stone_gripSpellScript : public SpellScript
{
- PrepareSpellScript(spell_ulduar_cancel_stone_gripSpellScript)
+ PrepareSpellScript(spell_ulduar_cancel_stone_gripSpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
@@ -485,7 +485,7 @@ class spell_ulduar_squeezed_lifeless : public SpellScriptLoader
class spell_ulduar_squeezed_lifeless_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_ulduar_squeezed_lifeless_SpellScript)
+ PrepareSpellScript(spell_ulduar_squeezed_lifeless_SpellScript);
void HandleInstaKill(SpellEffIndex /*effIndex*/)
{
@@ -523,7 +523,7 @@ class spell_ulduar_stone_grip_absorb : public SpellScriptLoader
class spell_ulduar_stone_grip_absorb_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_ulduar_stone_grip_absorb_AuraScript)
+ PrepareAuraScript(spell_ulduar_stone_grip_absorb_AuraScript);
//! This will be called when Right Arm (vehicle) has sustained a specific amount of damage depending on instance mode
//! What we do here is remove all harmful aura's related and teleport to safe spot.
@@ -560,7 +560,7 @@ class spell_ulduar_stone_grip : public SpellScriptLoader
class spell_ulduar_stone_grip_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_ulduar_stone_grip_AuraScript)
+ PrepareAuraScript(spell_ulduar_stone_grip_AuraScript);
void OnRemoveStun(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
{
@@ -613,7 +613,7 @@ class spell_kologarn_stone_shout : public SpellScriptLoader
class spell_kologarn_stone_shout_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_kologarn_stone_shout_SpellScript)
+ PrepareSpellScript(spell_kologarn_stone_shout_SpellScript);
void FilterTargets(std::list<WorldObject*>& unitList)
{
@@ -639,7 +639,7 @@ class spell_kologarn_summon_focused_eyebeam : public SpellScriptLoader
class spell_kologarn_summon_focused_eyebeam_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_kologarn_summon_focused_eyebeam_SpellScript)
+ PrepareSpellScript(spell_kologarn_summon_focused_eyebeam_SpellScript);
void HandleForceCast(SpellEffIndex effIndex)
{
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
index cfa5429ea79..f284aacf996 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
@@ -89,7 +89,7 @@ class spell_ulduar_proximity_mines : public SpellScriptLoader
class spell_ulduar_proximity_minesSpellScript : public SpellScript
{
- PrepareSpellScript(spell_ulduar_proximity_minesSpellScript)
+ PrepareSpellScript(spell_ulduar_proximity_minesSpellScript);
void HandleScript(SpellEffIndex effIndex)
{
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp
index baeae55535c..e0d46ad21ba 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp
@@ -1014,7 +1014,7 @@ class spell_razorscale_devouring_flame : public SpellScriptLoader
class spell_razorscale_devouring_flame_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_razorscale_devouring_flame_SpellScript)
+ PrepareSpellScript(spell_razorscale_devouring_flame_SpellScript);
void HandleSummon(SpellEffIndex effIndex)
{
@@ -1047,7 +1047,7 @@ class spell_razorscale_flame_breath : public SpellScriptLoader
class spell_razorscale_flame_breath_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_razorscale_flame_breath_SpellScript)
+ PrepareSpellScript(spell_razorscale_flame_breath_SpellScript);
void CheckDamage()
{
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp
index 7290ab9943c..87192f39a5c 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp
@@ -457,7 +457,7 @@ class npc_xt002_heart : public CreatureScript
void JustDied(Unit* /*killer*/) override
{
- Creature* xt002 = _instance ? me->GetCreature(*me, _instance->GetData64(BOSS_XT002)) : NULL;
+ Creature* xt002 = _instance ? ObjectAccessor::GetCreature(*me, _instance->GetData64(BOSS_XT002)) : NULL;
if (!xt002 || !xt002->AI())
return;
@@ -503,7 +503,7 @@ class npc_scrapbot : public CreatureScript
_rangeCheckTimer = 500;
- if (Creature* pXT002 = me->GetCreature(*me, _instance->GetData64(BOSS_XT002)))
+ if (Creature* pXT002 = ObjectAccessor::GetCreature(*me, _instance->GetData64(BOSS_XT002)))
me->GetMotionMaster()->MoveFollow(pXT002, 0.0f, 0.0f);
}
@@ -511,7 +511,7 @@ class npc_scrapbot : public CreatureScript
{
if (_rangeCheckTimer <= diff)
{
- if (Creature* xt002 = me->GetCreature(*me, _instance->GetData64(BOSS_XT002)))
+ if (Creature* xt002 = ObjectAccessor::GetCreature(*me, _instance->GetData64(BOSS_XT002)))
{
if (me->IsWithinMeleeRange(xt002))
{
@@ -560,7 +560,7 @@ class npc_pummeller : public CreatureScript
_trampleTimer = TIMER_TRAMPLE;
_uppercutTimer = TIMER_UPPERCUT;
- if (Creature* xt002 = me->GetCreature(*me, _instance->GetData64(BOSS_XT002)))
+ if (Creature* xt002 = ObjectAccessor::GetCreature(*me, _instance->GetData64(BOSS_XT002)))
{
Position pos = xt002->GetPosition();
me->GetMotionMaster()->MovePoint(0, pos);
@@ -668,7 +668,7 @@ class npc_boombot : public CreatureScript
me->SetFloatValue(UNIT_FIELD_MAXDAMAGE, 18000.0f);
/// @todo proper waypoints?
- if (Creature* pXT002 = me->GetCreature(*me, _instance->GetData64(BOSS_XT002)))
+ if (Creature* pXT002 = ObjectAccessor::GetCreature(*me, _instance->GetData64(BOSS_XT002)))
me->GetMotionMaster()->MoveFollow(pXT002, 0.0f, 0.0f);
}
@@ -767,7 +767,7 @@ class spell_xt002_searing_light_spawn_life_spark : public SpellScriptLoader
class spell_xt002_searing_light_spawn_life_spark_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_xt002_searing_light_spawn_life_spark_AuraScript)
+ PrepareAuraScript(spell_xt002_searing_light_spawn_life_spark_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -803,7 +803,7 @@ class spell_xt002_gravity_bomb_aura : public SpellScriptLoader
class spell_xt002_gravity_bomb_aura_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_xt002_gravity_bomb_aura_AuraScript)
+ PrepareAuraScript(spell_xt002_gravity_bomb_aura_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -855,7 +855,7 @@ class spell_xt002_gravity_bomb_damage : public SpellScriptLoader
class spell_xt002_gravity_bomb_damage_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_xt002_gravity_bomb_damage_SpellScript)
+ PrepareSpellScript(spell_xt002_gravity_bomb_damage_SpellScript);
void HandleScript(SpellEffIndex /*eff*/)
{
@@ -887,7 +887,7 @@ class spell_xt002_heart_overload_periodic : public SpellScriptLoader
class spell_xt002_heart_overload_periodic_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_xt002_heart_overload_periodic_SpellScript)
+ PrepareSpellScript(spell_xt002_heart_overload_periodic_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -954,7 +954,7 @@ class spell_xt002_tympanic_tantrum : public SpellScriptLoader
class spell_xt002_tympanic_tantrum_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_xt002_tympanic_tantrum_SpellScript)
+ PrepareSpellScript(spell_xt002_tympanic_tantrum_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets)
{
@@ -987,7 +987,7 @@ class spell_xt002_submerged : public SpellScriptLoader
class spell_xt002_submerged_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_xt002_submerged_SpellScript)
+ PrepareSpellScript(spell_xt002_submerged_SpellScript);
void HandleScript(SpellEffIndex /*eff*/)
{
@@ -1018,7 +1018,7 @@ class spell_xt002_stand : public SpellScriptLoader
class spell_xt002_stand_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_xt002_stand_SpellScript)
+ PrepareSpellScript(spell_xt002_stand_SpellScript);
void HandleScript(SpellEffIndex /*eff*/)
{
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp
index 98a903923ca..9ce5733ab0b 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp
@@ -1930,7 +1930,7 @@ class spell_yogg_saron_target_selectors : public SpellScriptLoader // 63744,
class spell_yogg_saron_target_selectors_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_yogg_saron_target_selectors_SpellScript)
+ PrepareSpellScript(spell_yogg_saron_target_selectors_SpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
@@ -1988,7 +1988,7 @@ class spell_yogg_saron_psychosis : public SpellScriptLoader // 63795, 65301
class spell_yogg_saron_psychosis_SpellScript : public SanityReduction
{
- PrepareSpellScript(spell_yogg_saron_psychosis_SpellScript)
+ PrepareSpellScript(spell_yogg_saron_psychosis_SpellScript);
bool Load() override
{
@@ -2026,7 +2026,7 @@ class spell_yogg_saron_malady_of_the_mind : public SpellScriptLoader // 63830
public:
spell_yogg_saron_malady_of_the_mind_SpellScript() : SanityReduction(3) { }
- PrepareSpellScript(spell_yogg_saron_malady_of_the_mind_SpellScript)
+ PrepareSpellScript(spell_yogg_saron_malady_of_the_mind_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets)
{
@@ -2049,7 +2049,7 @@ class spell_yogg_saron_malady_of_the_mind : public SpellScriptLoader // 63830
class spell_yogg_saron_malady_of_the_mind_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_yogg_saron_malady_of_the_mind_AuraScript)
+ PrepareAuraScript(spell_yogg_saron_malady_of_the_mind_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -2097,7 +2097,7 @@ class spell_yogg_saron_brain_link : public SpellScriptLoader // 63802
class spell_yogg_saron_brain_link_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_yogg_saron_brain_link_SpellScript)
+ PrepareSpellScript(spell_yogg_saron_brain_link_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets)
{
@@ -2121,7 +2121,7 @@ class spell_yogg_saron_brain_link : public SpellScriptLoader // 63802
class spell_yogg_saron_brain_link_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_yogg_saron_brain_link_AuraScript)
+ PrepareAuraScript(spell_yogg_saron_brain_link_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -2198,7 +2198,7 @@ class spell_yogg_saron_brain_link_damage : public SpellScriptLoader // 6380
public:
spell_yogg_saron_brain_link_damage_SpellScript() : SanityReduction(2) { }
- PrepareSpellScript(spell_yogg_saron_brain_link_damage_SpellScript)
+ PrepareSpellScript(spell_yogg_saron_brain_link_damage_SpellScript);
void Register() override
{
@@ -2219,7 +2219,7 @@ class spell_yogg_saron_boil_ominously : public SpellScriptLoader // 63030
class spell_yogg_saron_boil_ominously_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_yogg_saron_boil_ominously_SpellScript)
+ PrepareSpellScript(spell_yogg_saron_boil_ominously_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -2259,7 +2259,7 @@ class spell_yogg_saron_shadow_beacon : public SpellScriptLoader // 64465
class spell_yogg_saron_shadow_beacon_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_yogg_saron_shadow_beacon_AuraScript)
+ PrepareAuraScript(spell_yogg_saron_shadow_beacon_AuraScript);
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -2293,7 +2293,7 @@ class spell_yogg_saron_empowering_shadows_range_check : public SpellScriptLoader
class spell_yogg_saron_empowering_shadows_range_check_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_yogg_saron_empowering_shadows_range_check_SpellScript)
+ PrepareSpellScript(spell_yogg_saron_empowering_shadows_range_check_SpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
@@ -2320,7 +2320,7 @@ class spell_yogg_saron_empowering_shadows_missile : public SpellScriptLoader
class spell_yogg_saron_empowering_shadows_missile_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_yogg_saron_empowering_shadows_missile_SpellScript)
+ PrepareSpellScript(spell_yogg_saron_empowering_shadows_missile_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -2355,7 +2355,7 @@ class spell_yogg_saron_constrictor_tentacle : public SpellScriptLoader // 64
class spell_yogg_saron_constrictor_tentacle_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_yogg_saron_constrictor_tentacle_AuraScript)
+ PrepareAuraScript(spell_yogg_saron_constrictor_tentacle_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -2388,7 +2388,7 @@ class spell_yogg_saron_lunge : public SpellScriptLoader // 64131
class spell_yogg_saron_lunge_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_yogg_saron_lunge_SpellScript)
+ PrepareSpellScript(spell_yogg_saron_lunge_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -2425,7 +2425,7 @@ class spell_yogg_saron_squeeze : public SpellScriptLoader // 64125
class spell_yogg_saron_squeeze_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_yogg_saron_squeeze_AuraScript)
+ PrepareAuraScript(spell_yogg_saron_squeeze_AuraScript);
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -2453,7 +2453,7 @@ class spell_yogg_saron_diminsh_power : public SpellScriptLoader // 64148
class spell_yogg_saron_diminsh_power_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_yogg_saron_diminsh_power_AuraScript)
+ PrepareAuraScript(spell_yogg_saron_diminsh_power_AuraScript);
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& /*eventInfo*/)
{
@@ -2483,7 +2483,7 @@ class spell_yogg_saron_empowered : public SpellScriptLoader // 64161
class spell_yogg_saron_empowered_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_yogg_saron_empowered_AuraScript)
+ PrepareAuraScript(spell_yogg_saron_empowered_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -2534,7 +2534,7 @@ class spell_yogg_saron_match_health : public SpellScriptLoader // 64069
class spell_yogg_saron_match_health_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_yogg_saron_match_health_SpellScript)
+ PrepareSpellScript(spell_yogg_saron_match_health_SpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
@@ -2561,7 +2561,7 @@ class spell_yogg_saron_shattered_illusion : public SpellScriptLoader // 65238
class spell_yogg_saron_shattered_illusion_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_yogg_saron_shattered_illusion_SpellScript)
+ PrepareSpellScript(spell_yogg_saron_shattered_illusion_SpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
@@ -2588,7 +2588,7 @@ class spell_yogg_saron_death_ray_warning_visual : public SpellScriptLoader /
class spell_yogg_saron_death_ray_warning_visual_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_yogg_saron_death_ray_warning_visual_AuraScript)
+ PrepareAuraScript(spell_yogg_saron_death_ray_warning_visual_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -2629,7 +2629,7 @@ class spell_yogg_saron_cancel_illusion_room_aura : public SpellScriptLoader /
class spell_yogg_saron_cancel_illusion_room_aura_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_yogg_saron_cancel_illusion_room_aura_SpellScript)
+ PrepareSpellScript(spell_yogg_saron_cancel_illusion_room_aura_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -2666,7 +2666,7 @@ class spell_yogg_saron_nondescript : public SpellScriptLoader // 64010, 6401
class spell_yogg_saron_nondescript_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_yogg_saron_nondescript_AuraScript)
+ PrepareAuraScript(spell_yogg_saron_nondescript_AuraScript);
void OnRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
{
@@ -2692,7 +2692,7 @@ class spell_yogg_saron_revealed_tentacle : public SpellScriptLoader // 64012
class spell_yogg_saron_revealed_tentacle_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_yogg_saron_revealed_tentacle_SpellScript)
+ PrepareSpellScript(spell_yogg_saron_revealed_tentacle_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -2732,7 +2732,7 @@ class spell_yogg_saron_grim_reprisal : public SpellScriptLoader // 63305
class spell_yogg_saron_grim_reprisal_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_yogg_saron_grim_reprisal_AuraScript)
+ PrepareAuraScript(spell_yogg_saron_grim_reprisal_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -2766,7 +2766,7 @@ class spell_yogg_saron_induce_madness : public SpellScriptLoader // 64059
class spell_yogg_saron_induce_madness_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_yogg_saron_induce_madness_SpellScript)
+ PrepareSpellScript(spell_yogg_saron_induce_madness_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -2816,7 +2816,7 @@ class spell_yogg_saron_sanity : public SpellScriptLoader // 63050
class spell_yogg_saron_sanity_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_yogg_saron_sanity_SpellScript)
+ PrepareSpellScript(spell_yogg_saron_sanity_SpellScript);
// don't target players outside of room or handle it in SPELL_INSANE_PERIODIC?
@@ -2833,7 +2833,7 @@ class spell_yogg_saron_sanity : public SpellScriptLoader // 63050
class spell_yogg_saron_sanity_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_yogg_saron_sanity_AuraScript)
+ PrepareAuraScript(spell_yogg_saron_sanity_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -2892,7 +2892,7 @@ class spell_yogg_saron_insane : public SpellScriptLoader // 63120
class spell_yogg_saron_insane_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_yogg_saron_insane_AuraScript)
+ PrepareAuraScript(spell_yogg_saron_insane_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -2936,7 +2936,7 @@ class spell_yogg_saron_insane_periodic : public SpellScriptLoader // 64555
class spell_yogg_saron_insane_periodic_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_yogg_saron_insane_periodic_SpellScript)
+ PrepareSpellScript(spell_yogg_saron_insane_periodic_SpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
@@ -2977,7 +2977,7 @@ class spell_yogg_saron_lunatic_gaze : public SpellScriptLoader // 64164, 64
class spell_yogg_saron_lunatic_gaze_SpellScript : public SanityReduction
{
- PrepareSpellScript(spell_yogg_saron_lunatic_gaze_SpellScript)
+ PrepareSpellScript(spell_yogg_saron_lunatic_gaze_SpellScript);
bool Load() override
{
@@ -3011,7 +3011,7 @@ class spell_yogg_saron_keeper_aura : public SpellScriptLoader // 62650, 6267
class spell_yogg_saron_keeper_aura_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_yogg_saron_keeper_aura_AuraScript)
+ PrepareAuraScript(spell_yogg_saron_keeper_aura_AuraScript);
bool CanApply(Unit* target)
{
@@ -3039,7 +3039,7 @@ class spell_yogg_saron_hate_to_zero : public SpellScriptLoader // 63984
class spell_yogg_saron_hate_to_zero_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_yogg_saron_hate_to_zero_SpellScript)
+ PrepareSpellScript(spell_yogg_saron_hate_to_zero_SpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
@@ -3067,7 +3067,7 @@ class spell_yogg_saron_in_the_maws_of_the_old_god : public SpellScriptLoader
class spell_yogg_saron_in_the_maws_of_the_old_god_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_yogg_saron_in_the_maws_of_the_old_god_SpellScript)
+ PrepareSpellScript(spell_yogg_saron_in_the_maws_of_the_old_god_SpellScript);
SpellCastResult CheckRequirement()
{
@@ -3103,7 +3103,7 @@ class spell_yogg_saron_titanic_storm : public SpellScriptLoader // 64172
class spell_yogg_saron_titanic_storm_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_yogg_saron_titanic_storm_SpellScript)
+ PrepareSpellScript(spell_yogg_saron_titanic_storm_SpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
@@ -3130,7 +3130,7 @@ class spell_yogg_saron_hodirs_protective_gaze : public SpellScriptLoader //
class spell_yogg_saron_hodirs_protective_gaze_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_yogg_saron_hodirs_protective_gaze_AuraScript)
+ PrepareAuraScript(spell_yogg_saron_hodirs_protective_gaze_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp
index 3e1d75e0f21..67bf6214374 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp
@@ -395,7 +395,7 @@ class spell_ingvar_summon_banshee : public SpellScriptLoader
class spell_ingvar_summon_banshee_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_ingvar_summon_banshee_SpellScript)
+ PrepareSpellScript(spell_ingvar_summon_banshee_SpellScript);
void SetDest(SpellDestination& dest)
{
@@ -422,7 +422,7 @@ class spell_ingvar_woe_strike : public SpellScriptLoader
class spell_ingvar_woe_strike_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_ingvar_woe_strike_AuraScript)
+ PrepareAuraScript(spell_ingvar_woe_strike_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp
index fefa27fc754..890c39fa775 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp
@@ -325,7 +325,7 @@ class spell_frost_tomb : public SpellScriptLoader
class spell_frost_tomb_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_frost_tomb_AuraScript)
+ PrepareAuraScript(spell_frost_tomb_AuraScript);
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp
index 5e19041eb62..e54c8847d46 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp
@@ -126,7 +126,7 @@ class spell_ticking_time_bomb : public SpellScriptLoader
class spell_ticking_time_bomb_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_ticking_time_bomb_AuraScript)
+ PrepareAuraScript(spell_ticking_time_bomb_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -165,7 +165,7 @@ class spell_fixate : public SpellScriptLoader
class spell_fixate_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_fixate_SpellScript)
+ PrepareSpellScript(spell_fixate_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp
index 4a5c0291ce0..41dd1a165f2 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp
@@ -206,7 +206,7 @@ public:
Summons.DespawnAll();
me->SetSpeed(MOVE_FLIGHT, 3.0f);
- if ((Unit::GetCreature(*me, m_uiGraufGUID) == NULL) && !me->IsMounted())
+ if ((ObjectAccessor::GetCreature(*me, m_uiGraufGUID) == NULL) && !me->IsMounted())
me->SummonCreature(NPC_GRAUF, Location[0].GetPositionX(), Location[0].GetPositionY(), Location[0].GetPositionZ(), 3.0f);
instance->SetBossState(DATA_SKADI_THE_RUTHLESS, NOT_STARTED);
instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
@@ -217,7 +217,7 @@ public:
me->SetCanFly(false);
me->Dismount();
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE);
- if (!Unit::GetCreature(*me, m_uiGraufGUID))
+ if (!ObjectAccessor::GetCreature(*me, m_uiGraufGUID))
me->SummonCreature(NPC_GRAUF, Location[0].GetPositionX(), Location[0].GetPositionY(), Location[0].GetPositionZ(), 3.0f);
}
@@ -469,7 +469,7 @@ public:
if (!instance)
return false;
- if (Creature* pSkadi = Unit::GetCreature(*go, instance->GetData64(DATA_SKADI_THE_RUTHLESS)))
+ if (Creature* pSkadi = ObjectAccessor::GetCreature(*go, instance->GetData64(DATA_SKADI_THE_RUTHLESS)))
player->CastSpell(pSkadi, SPELL_RAPID_FIRE, true);
return false;
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp
index 84e71900446..621ef20e7e4 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp
@@ -488,7 +488,7 @@ class spell_paralyze_pinnacle : public SpellScriptLoader
class spell_paralyze_pinnacle_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_paralyze_pinnacle_SpellScript)
+ PrepareSpellScript(spell_paralyze_pinnacle_SpellScript);
void FilterTargets(std::list<WorldObject*>& unitList)
{
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp
index a33d02fb083..de4d6c32c97 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp
@@ -369,7 +369,7 @@ public:
void DespawnBoatGhosts(uint64& m_uiCreatureGUID)
{
if (m_uiCreatureGUID)
- if (Creature* temp = Unit::GetCreature(*me, m_uiCreatureGUID))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, m_uiCreatureGUID))
temp->DisappearAndDie();
m_uiCreatureGUID = 0;
diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp
index 7437bddf1f6..c164f8fbf60 100644
--- a/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp
+++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp
@@ -217,7 +217,7 @@ class spell_archavon_rock_shards : public SpellScriptLoader
class spell_archavon_rock_shards_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_archavon_rock_shards_SpellScript)
+ PrepareSpellScript(spell_archavon_rock_shards_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp
index 205030947d1..ea5c5b9ee48 100644
--- a/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp
+++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp
@@ -103,7 +103,7 @@ class boss_emalon : public CreatureScript
{
for (std::list<uint64>::const_iterator itr = summons.begin(); itr != summons.end(); ++itr)
{
- Creature* minion = Unit::GetCreature(*me, *itr);
+ Creature* minion = ObjectAccessor::GetCreature(*me, *itr);
if (minion && minion->IsAlive() && !minion->GetVictim() && minion->AI())
minion->AI()->AttackStart(who);
}
@@ -143,7 +143,7 @@ class boss_emalon : public CreatureScript
case EVENT_OVERCHARGE:
if (!summons.empty())
{
- Creature* minion = Unit::GetCreature(*me, Trinity::Containers::SelectRandomContainerElement(summons));
+ Creature* minion = ObjectAccessor::GetCreature(*me, Trinity::Containers::SelectRandomContainerElement(summons));
if (minion && minion->IsAlive())
{
minion->CastSpell(me, SPELL_OVERCHARGED, true);
diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp
index 37604d116cd..b6c836eb0cd 100644
--- a/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp
+++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp
@@ -189,7 +189,7 @@ class spell_koralon_meteor_fists : public SpellScriptLoader
class spell_koralon_meteor_fists_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_koralon_meteor_fists_AuraScript)
+ PrepareAuraScript(spell_koralon_meteor_fists_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -223,7 +223,7 @@ class spell_koralon_meteor_fists_damage : public SpellScriptLoader
class spell_koralon_meteor_fists_damage_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_koralon_meteor_fists_damage_SpellScript)
+ PrepareSpellScript(spell_koralon_meteor_fists_damage_SpellScript);
bool Load() override
{
@@ -265,7 +265,7 @@ class spell_flame_warder_meteor_fists : public SpellScriptLoader
class spell_flame_warder_meteor_fists_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_flame_warder_meteor_fists_AuraScript)
+ PrepareAuraScript(spell_flame_warder_meteor_fists_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
diff --git a/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp b/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp
index 5cbd4cafffb..4aede5e5f46 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp
@@ -242,7 +242,7 @@ public:
if (!m_waterElements.empty())
{
for (std::list<uint64>::const_iterator itr = m_waterElements.begin(); itr != m_waterElements.end(); ++itr)
- if (Creature* temp = Unit::GetCreature(*me, *itr))
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, *itr))
if (temp->IsAlive())
{
bIsWaterElementsAlive = true;
@@ -362,7 +362,7 @@ public:
{
if (uiRangeCheck_Timer < uiDiff)
{
- if (Creature* pIchoron = Unit::GetCreature(*me, instance->GetData64(DATA_ICHORON)))
+ if (Creature* pIchoron = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_ICHORON)))
{
if (me->IsWithinDist(pIchoron, 2.0f, false))
{
@@ -379,7 +379,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
DoCast(me, SPELL_SPLASH);
- if (Creature* pIchoron = Unit::GetCreature(*me, instance->GetData64(DATA_ICHORON)))
+ if (Creature* pIchoron = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_ICHORON)))
if (pIchoron->AI())
pIchoron->AI()->DoAction(ACTION_WATER_ELEMENT_KILLED);
}
diff --git a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp
index de08022b5ed..2bac444a558 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp
@@ -254,7 +254,7 @@ public:
if (uiRangeCheck_Timer < uiDiff)
{
- if (Creature* pXevozz = Unit::GetCreature(*me, instance->GetData64(DATA_XEVOZZ)))
+ if (Creature* pXevozz = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_XEVOZZ)))
{
float fDistance = me->GetDistance2d(pXevozz);
if (fDistance <= 3)
diff --git a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp
index a4f142e1c89..b623d5e6ddc 100644
--- a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp
+++ b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp
@@ -535,7 +535,7 @@ public:
{
me->CastSpell(me, SABOTEUR_SHIELD_DISRUPTION, false);
me->DisappearAndDie();
- Creature* pSaboPort = Unit::GetCreature((*me), instance->GetData64(DATA_SABOTEUR_PORTAL));
+ Creature* pSaboPort = ObjectAccessor::GetCreature((*me), instance->GetData64(DATA_SABOTEUR_PORTAL));
if (pSaboPort)
pSaboPort->DisappearAndDie();
instance->SetData(DATA_START_BOSS_ENCOUNTER, 1);
diff --git a/src/server/scripts/Northrend/zone_borean_tundra.cpp b/src/server/scripts/Northrend/zone_borean_tundra.cpp
index d994f96dc4a..38d73e0673d 100644
--- a/src/server/scripts/Northrend/zone_borean_tundra.cpp
+++ b/src/server/scripts/Northrend/zone_borean_tundra.cpp
@@ -1071,8 +1071,8 @@ public:
if (phaseTimer <= diff)
{
- Creature* talbot = me->GetCreature(*me, talbotGUID);
- Creature* arthas = me->GetCreature(*me, arthasGUID);
+ Creature* talbot = ObjectAccessor::GetCreature(*me, talbotGUID);
+ Creature* arthas = ObjectAccessor::GetCreature(*me, arthasGUID);
switch (phase)
{
case 1:
@@ -1209,9 +1209,9 @@ public:
break;
case 17:
- if (Creature* leryssa = me->GetCreature(*me, leryssaGUID))
+ if (Creature* leryssa = ObjectAccessor::GetCreature(*me, leryssaGUID))
leryssa->RemoveFromWorld();
- if (Creature* arlos= me->GetCreature(*me, arlosGUID))
+ if (Creature* arlos= ObjectAccessor::GetCreature(*me, arlosGUID))
arlos->RemoveFromWorld();
if (talbot)
talbot->RemoveFromWorld();
@@ -1230,16 +1230,16 @@ public:
void JustDied(Unit* /*killer*/) override
{
- if (Creature* talbot = me->GetCreature(*me, talbotGUID))
+ if (Creature* talbot = ObjectAccessor::GetCreature(*me, talbotGUID))
talbot->RemoveFromWorld();
- if (Creature* leryssa = me->GetCreature(*me, leryssaGUID))
+ if (Creature* leryssa = ObjectAccessor::GetCreature(*me, leryssaGUID))
leryssa->RemoveFromWorld();
- if (Creature* arlos = me->GetCreature(*me, arlosGUID))
+ if (Creature* arlos = ObjectAccessor::GetCreature(*me, arlosGUID))
arlos->RemoveFromWorld();
- if (Creature* arthas = me->GetCreature(*me, arthasGUID))
+ if (Creature* arthas = ObjectAccessor::GetCreature(*me, arthasGUID))
arthas->RemoveFromWorld();
}
};
@@ -1433,8 +1433,8 @@ public:
if (!leryssaGUID || !arlosGUID)
return;
- Creature* leryssa = Unit::GetCreature(*me, leryssaGUID);
- Creature* arlos = Unit::GetCreature(*me, arlosGUID);
+ Creature* leryssa = ObjectAccessor::GetCreature(*me, leryssaGUID);
+ Creature* arlos = ObjectAccessor::GetCreature(*me, arlosGUID);
if (!leryssa || !arlos)
return;
@@ -2548,7 +2548,7 @@ public:
class spell_windsoul_totem_aura_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_windsoul_totem_aura_AuraScript)
+ PrepareAuraScript(spell_windsoul_totem_aura_AuraScript);
void OnRemove(AuraEffect const*, AuraEffectHandleModes)
{
diff --git a/src/server/scripts/Northrend/zone_crystalsong_forest.cpp b/src/server/scripts/Northrend/zone_crystalsong_forest.cpp
index a5ff2271316..e4bd9c469fb 100644
--- a/src/server/scripts/Northrend/zone_crystalsong_forest.cpp
+++ b/src/server/scripts/Northrend/zone_crystalsong_forest.cpp
@@ -97,7 +97,7 @@ public:
}
- if (Creature* pOrb = me->GetCreature(*me, targetGUID))
+ if (Creature* pOrb = ObjectAccessor::GetCreature(*me, targetGUID))
DoCast(pOrb, SPELL_TRANSITUS_SHIELD_BEAM);
}
diff --git a/src/server/scripts/Northrend/zone_dragonblight.cpp b/src/server/scripts/Northrend/zone_dragonblight.cpp
index 4ba87ac539e..bda6d953d9f 100644
--- a/src/server/scripts/Northrend/zone_dragonblight.cpp
+++ b/src/server/scripts/Northrend/zone_dragonblight.cpp
@@ -432,7 +432,7 @@ public:
class spell_q12096_q12092_dummy_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q12096_q12092_dummy_SpellScript)
+ PrepareSpellScript(spell_q12096_q12092_dummy_SpellScript);
void HandleDummy(SpellEffIndex /*effIndex*/)
{
@@ -479,7 +479,7 @@ public:
class spell_q12096_q12092_bark_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q12096_q12092_bark_SpellScript)
+ PrepareSpellScript(spell_q12096_q12092_bark_SpellScript);
void HandleDummy(SpellEffIndex /*effIndex*/)
{
diff --git a/src/server/scripts/Northrend/zone_grizzly_hills.cpp b/src/server/scripts/Northrend/zone_grizzly_hills.cpp
index d2e6df7b3c7..d0fd948ce6a 100644
--- a/src/server/scripts/Northrend/zone_grizzly_hills.cpp
+++ b/src/server/scripts/Northrend/zone_grizzly_hills.cpp
@@ -85,18 +85,18 @@ public:
_mrfloppyGUID = Mrfloppy->GetGUID();
break;
case 10:
- if (Unit::GetCreature(*me, _mrfloppyGUID))
+ if (ObjectAccessor::GetCreature(*me, _mrfloppyGUID))
{
Talk(SAY_WORGHAGGRO1);
me->SummonCreature(NPC_HUNGRY_WORG, me->GetPositionX()+5, me->GetPositionY()+2, me->GetPositionZ()+1, 3.229f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120000);
}
break;
case 11:
- if (Creature* Mrfloppy = Unit::GetCreature(*me, _mrfloppyGUID))
+ if (Creature* Mrfloppy = ObjectAccessor::GetCreature(*me, _mrfloppyGUID))
Mrfloppy->GetMotionMaster()->MoveFollow(me, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
break;
case 17:
- if (Creature* Mrfloppy = Unit::GetCreature(*me, _mrfloppyGUID))
+ if (Creature* Mrfloppy = ObjectAccessor::GetCreature(*me, _mrfloppyGUID))
Mrfloppy->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ());
Talk(SAY_WORGRAGGRO3);
if (Creature* RWORG = me->SummonCreature(NPC_RAVENOUS_WORG, me->GetPositionX()+10, me->GetPositionY()+8, me->GetPositionZ()+2, 3.229f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120000))
@@ -106,31 +106,31 @@ public:
}
break;
case 18:
- if (Creature* Mrfloppy = Unit::GetCreature(*me, _mrfloppyGUID))
+ if (Creature* Mrfloppy = ObjectAccessor::GetCreature(*me, _mrfloppyGUID))
{
- if (Creature* RWORG = Unit::GetCreature(*me, _RavenousworgGUID))
+ if (Creature* RWORG = ObjectAccessor::GetCreature(*me, _RavenousworgGUID))
RWORG->GetMotionMaster()->MovePoint(0, Mrfloppy->GetPositionX(), Mrfloppy->GetPositionY(), Mrfloppy->GetPositionZ());
DoCast(Mrfloppy, SPELL_MRFLOPPY);
}
break;
case 19:
- if (Creature* Mrfloppy = Unit::GetCreature(*me, _mrfloppyGUID))
+ if (Creature* Mrfloppy = ObjectAccessor::GetCreature(*me, _mrfloppyGUID))
{
if (Mrfloppy->HasAura(SPELL_MRFLOPPY, 0))
{
- if (Creature* RWORG = Unit::GetCreature(*me, _RavenousworgGUID))
+ if (Creature* RWORG = ObjectAccessor::GetCreature(*me, _RavenousworgGUID))
Mrfloppy->EnterVehicle(RWORG);
}
}
break;
case 20:
- if (Creature* RWORG = Unit::GetCreature(*me, _RavenousworgGUID))
+ if (Creature* RWORG = ObjectAccessor::GetCreature(*me, _RavenousworgGUID))
RWORG->HandleEmoteCommand(34);
break;
case 21:
- if (Creature* Mrfloppy = Unit::GetCreature(*me, _mrfloppyGUID))
+ if (Creature* Mrfloppy = ObjectAccessor::GetCreature(*me, _mrfloppyGUID))
{
- if (Creature* RWORG = Unit::GetCreature(*me, _RavenousworgGUID))
+ if (Creature* RWORG = ObjectAccessor::GetCreature(*me, _RavenousworgGUID))
{
RWORG->Kill(Mrfloppy);
Mrfloppy->ExitVehicle();
@@ -141,11 +141,11 @@ public:
}
break;
case 22:
- if (Creature* Mrfloppy = Unit::GetCreature(*me, _mrfloppyGUID))
+ if (Creature* Mrfloppy = ObjectAccessor::GetCreature(*me, _mrfloppyGUID))
{
if (Mrfloppy->isDead())
{
- if (Creature* RWORG = Unit::GetCreature(*me, _RavenousworgGUID))
+ if (Creature* RWORG = ObjectAccessor::GetCreature(*me, _RavenousworgGUID))
RWORG->DisappearAndDie();
me->GetMotionMaster()->MovePoint(0, Mrfloppy->GetPositionX(), Mrfloppy->GetPositionY(), Mrfloppy->GetPositionZ());
Mrfloppy->setDeathState(ALIVE);
@@ -167,7 +167,7 @@ public:
break;
case 27:
me->DisappearAndDie();
- if (Creature* Mrfloppy = Unit::GetCreature(*me, _mrfloppyGUID))
+ if (Creature* Mrfloppy = ObjectAccessor::GetCreature(*me, _mrfloppyGUID))
Mrfloppy->DisappearAndDie();
break;
}
@@ -761,7 +761,7 @@ class spell_shredder_delivery : public SpellScriptLoader
class spell_shredder_delivery_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_shredder_delivery_SpellScript)
+ PrepareSpellScript(spell_shredder_delivery_SpellScript);
bool Load() override
{
diff --git a/src/server/scripts/Northrend/zone_howling_fjord.cpp b/src/server/scripts/Northrend/zone_howling_fjord.cpp
index 1adf5aa0fa9..c577fb2864f 100644
--- a/src/server/scripts/Northrend/zone_howling_fjord.cpp
+++ b/src/server/scripts/Northrend/zone_howling_fjord.cpp
@@ -443,7 +443,7 @@ class spell_mindless_abomination_explosion_fx_master : public SpellScriptLoader
class spell_mindless_abomination_explosion_fx_master_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_mindless_abomination_explosion_fx_master_SpellScript)
+ PrepareSpellScript(spell_mindless_abomination_explosion_fx_master_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
diff --git a/src/server/scripts/Northrend/zone_icecrown.cpp b/src/server/scripts/Northrend/zone_icecrown.cpp
index 93e1f19b195..32b9805470e 100644
--- a/src/server/scripts/Northrend/zone_icecrown.cpp
+++ b/src/server/scripts/Northrend/zone_icecrown.cpp
@@ -595,14 +595,14 @@ public:
break;
case EVENT_INTRO_1:
{
- if (Creature* Dalfors = me->GetCreature(*me, guidDalfors))
+ if (Creature* Dalfors = ObjectAccessor::GetCreature(*me, guidDalfors))
Dalfors->AI()->Talk(DALFORS_SAY_PRE_1);
events.ScheduleEvent(EVENT_INTRO_2, 5000);
}
break;
case EVENT_INTRO_2:
{
- if (Creature* Dalfors = me->GetCreature(*me, guidDalfors))
+ if (Creature* Dalfors = ObjectAccessor::GetCreature(*me, guidDalfors))
{
Dalfors->SetFacingTo(6.215f);
Dalfors->AI()->Talk(DALFORS_SAY_PRE_2);
@@ -612,37 +612,37 @@ public:
break;
case EVENT_INTRO_3:
{
- if (Creature* Dalfors = me->GetCreature(*me, guidDalfors))
+ if (Creature* Dalfors = ObjectAccessor::GetCreature(*me, guidDalfors))
{
Dalfors->GetMotionMaster()->MovePoint(0, DalforsPos[2]);
Dalfors->SetHomePosition(DalforsPos[2]);
}
- if (Creature* Priest1 = me->GetCreature(*me, guidPriest[0]))
+ if (Creature* Priest1 = ObjectAccessor::GetCreature(*me, guidPriest[0]))
{
Priest1->SetFacingTo(5.7421f);
Priest1->SetHomePosition(Priest1Pos[1]);
}
- if (Creature* Priest2 = me->GetCreature(*me, guidPriest[1]))
+ if (Creature* Priest2 = ObjectAccessor::GetCreature(*me, guidPriest[1]))
{
Priest2->SetFacingTo(5.7421f);
Priest2->SetHomePosition(Priest2Pos[1]);
}
- if (Creature* Priest3 = me->GetCreature(*me, guidPriest[2]))
+ if (Creature* Priest3 = ObjectAccessor::GetCreature(*me, guidPriest[2]))
{
Priest3->SetFacingTo(5.7421f);
Priest3->SetHomePosition(Priest3Pos[1]);
}
- if (Creature* Mason1 = me->GetCreature(*me, guidMason[0]))
+ if (Creature* Mason1 = ObjectAccessor::GetCreature(*me, guidMason[0]))
{
Mason1->GetMotionMaster()->MovePoint(0, Mason1Pos[2]);
Mason1->SetHomePosition(Mason1Pos[2]);
}
- if (Creature* Mason2 = me->GetCreature(*me, guidMason[1]))
+ if (Creature* Mason2 = ObjectAccessor::GetCreature(*me, guidMason[1]))
{
Mason2->GetMotionMaster()->MovePoint(0, Mason2Pos[2]);
Mason2->SetHomePosition(Mason2Pos[2]);
}
- if (Creature* Mason3 = me->GetCreature(*me, guidMason[2]))
+ if (Creature* Mason3 = ObjectAccessor::GetCreature(*me, guidMason[2]))
{
Mason3->GetMotionMaster()->MovePoint(0, Mason3Pos[2]);
Mason3->SetHomePosition(Mason3Pos[2]);
@@ -653,17 +653,17 @@ public:
break;
case EVENT_MASON_ACTION:
{
- if (Creature* Mason1 = me->GetCreature(*me, guidMason[0]))
+ if (Creature* Mason1 = ObjectAccessor::GetCreature(*me, guidMason[0]))
{
Mason1->SetFacingTo(2.8972f);
Mason1->AI()->SetData(1, 1); // triggers SAI actions on npc
}
- if (Creature* Mason2 = me->GetCreature(*me, guidMason[1]))
+ if (Creature* Mason2 = ObjectAccessor::GetCreature(*me, guidMason[1]))
{
Mason2->SetFacingTo(3.1241f);
Mason2->AI()->SetData(1, 1); // triggers SAI actions on npc
}
- if (Creature* Mason3 = me->GetCreature(*me, guidMason[2]))
+ if (Creature* Mason3 = ObjectAccessor::GetCreature(*me, guidMason[2]))
{
Mason3->SetFacingTo(3.6651f);
Mason3->AI()->SetData(1, 1); // triggers SAI actions on npc
@@ -674,7 +674,7 @@ public:
{
if (Creature* LK = GetClosestCreatureWithEntry(me, NPC_LK, 100))
LK->AI()->Talk(LK_TALK_1);
- if (Creature* Dalfors = me->GetCreature(*me, guidDalfors))
+ if (Creature* Dalfors = ObjectAccessor::GetCreature(*me, guidDalfors))
Dalfors->AI()->Talk(DALFORS_SAY_START);
events.ScheduleEvent(EVENT_WAVE_SPAWN, 1000);
}
@@ -763,7 +763,7 @@ public:
}
if (PhaseCount == 8)
- if (Creature* Halof = me->GetCreature(*me, guidHalof))
+ if (Creature* Halof = ObjectAccessor::GetCreature(*me, guidHalof))
if (Halof->isDead())
{
DoCast(me, SPELL_CRUSADERS_SPIRE_VICTORY, true);
@@ -771,7 +771,7 @@ public:
Summons.DespawnEntry(NPC_REANIMATED_CAPTAIN);
Summons.DespawnEntry(NPC_SCOURGE_DRUDGE);
Summons.DespawnEntry(NPC_HALOF_THE_DEATHBRINGER);
- if (Creature* Dalfors = me->GetCreature(*me, guidDalfors))
+ if (Creature* Dalfors = ObjectAccessor::GetCreature(*me, guidDalfors))
Dalfors->AI()->Talk(DALFORS_YELL_FINISHED);
events.ScheduleEvent(EVENT_ENDED, 10000);
}
@@ -963,35 +963,35 @@ class npc_margrave_dhakar : public CreatureScript
}
case EVENT_LK_SAY_1:
{
- if (Creature* lichKing = Unit::GetCreature(*me, _lichKingGuid))
+ if (Creature* lichKing = ObjectAccessor::GetCreature(*me, _lichKingGuid))
lichKing->AI()->Talk(SAY_LK_1);
_events.ScheduleEvent(EVENT_LK_SAY_2, 5000);
break;
}
case EVENT_LK_SAY_2:
{
- if (Creature* lichKing = Unit::GetCreature(*me, _lichKingGuid))
+ if (Creature* lichKing = ObjectAccessor::GetCreature(*me, _lichKingGuid))
lichKing->AI()->Talk(SAY_LK_2);
_events.ScheduleEvent(EVENT_LK_SAY_3, 5000);
break;
}
case EVENT_LK_SAY_3:
{
- if (Creature* lichKing = Unit::GetCreature(*me, _lichKingGuid))
+ if (Creature* lichKing = ObjectAccessor::GetCreature(*me, _lichKingGuid))
lichKing->AI()->Talk(SAY_LK_3);
_events.ScheduleEvent(EVENT_LK_SAY_4, 5000);
break;
}
case EVENT_LK_SAY_4:
{
- if (Creature* lichKing = Unit::GetCreature(*me, _lichKingGuid))
+ if (Creature* lichKing = ObjectAccessor::GetCreature(*me, _lichKingGuid))
lichKing->AI()->Talk(SAY_LK_4);
_events.ScheduleEvent(EVENT_OUTRO, 12000);
break;
}
case EVENT_LK_SAY_5:
{
- if (Creature* lichKing = Unit::GetCreature(*me, _lichKingGuid))
+ if (Creature* lichKing = ObjectAccessor::GetCreature(*me, _lichKingGuid))
lichKing->AI()->Talk(SAY_LK_5);
_events.ScheduleEvent(EVENT_OUTRO, 8000);
break;
@@ -1001,7 +1001,7 @@ class npc_margrave_dhakar : public CreatureScript
if (Creature* olakin = me->FindNearestCreature(NPC_OLAKIN, 50.0f, true))
olakin->AI()->Talk(SAY_OLAKIN_PAY);
- if (Creature* lichKing = Unit::GetCreature(*me, _lichKingGuid))
+ if (Creature* lichKing = ObjectAccessor::GetCreature(*me, _lichKingGuid))
lichKing->DespawnOrUnsummon(0);
_events.ScheduleEvent(EVENT_START, 5000);
diff --git a/src/server/scripts/Northrend/zone_sholazar_basin.cpp b/src/server/scripts/Northrend/zone_sholazar_basin.cpp
index 54c07b17366..3ec138dcfaa 100644
--- a/src/server/scripts/Northrend/zone_sholazar_basin.cpp
+++ b/src/server/scripts/Northrend/zone_sholazar_basin.cpp
@@ -762,7 +762,7 @@ public:
class spell_q12620_the_lifewarden_wrath_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q12620_the_lifewarden_wrath_SpellScript)
+ PrepareSpellScript(spell_q12620_the_lifewarden_wrath_SpellScript);
void HandleSendEvent(SpellEffIndex effIndex)
{
@@ -850,7 +850,7 @@ public:
class spell_q12589_shoot_rjr_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q12589_shoot_rjr_SpellScript)
+ PrepareSpellScript(spell_q12589_shoot_rjr_SpellScript);
SpellCastResult CheckCast()
{
@@ -1109,7 +1109,7 @@ public:
class spell_shango_tracks_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_shango_tracks_SpellScript)
+ PrepareSpellScript(spell_shango_tracks_SpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
diff --git a/src/server/scripts/Northrend/zone_storm_peaks.cpp b/src/server/scripts/Northrend/zone_storm_peaks.cpp
index ee0c4522c8a..a7faf776721 100644
--- a/src/server/scripts/Northrend/zone_storm_peaks.cpp
+++ b/src/server/scripts/Northrend/zone_storm_peaks.cpp
@@ -732,7 +732,7 @@ class spell_jokkum_scriptcast : public SpellScriptLoader
class spell_jokkum_scriptcast_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_jokkum_scriptcast_AuraScript)
+ PrepareAuraScript(spell_jokkum_scriptcast_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -765,7 +765,7 @@ class spell_veranus_summon : public SpellScriptLoader
class spell_veranus_summon_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_veranus_summon_AuraScript)
+ PrepareAuraScript(spell_veranus_summon_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -804,7 +804,7 @@ class spell_close_rift : public SpellScriptLoader
class spell_close_rift_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_close_rift_AuraScript)
+ PrepareAuraScript(spell_close_rift_AuraScript);
bool Load() override
{
diff --git a/src/server/scripts/Northrend/zone_wintergrasp.cpp b/src/server/scripts/Northrend/zone_wintergrasp.cpp
index a2f0ff45787..fe74997bb39 100644
--- a/src/server/scripts/Northrend/zone_wintergrasp.cpp
+++ b/src/server/scripts/Northrend/zone_wintergrasp.cpp
@@ -481,7 +481,7 @@ class spell_wintergrasp_force_building : public SpellScriptLoader
class spell_wintergrasp_force_building_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_wintergrasp_force_building_SpellScript)
+ PrepareSpellScript(spell_wintergrasp_force_building_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -518,7 +518,7 @@ class spell_wintergrasp_grab_passenger : public SpellScriptLoader
class spell_wintergrasp_grab_passenger_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_wintergrasp_grab_passenger_SpellScript)
+ PrepareSpellScript(spell_wintergrasp_grab_passenger_SpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
@@ -574,7 +574,7 @@ public:
class spell_wintergrasp_defender_teleport_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_wintergrasp_defender_teleport_SpellScript)
+ PrepareSpellScript(spell_wintergrasp_defender_teleport_SpellScript);
SpellCastResult CheckCast()
{
@@ -605,7 +605,7 @@ public:
class spell_wintergrasp_defender_teleport_trigger_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_wintergrasp_defender_teleport_trigger_SpellScript)
+ PrepareSpellScript(spell_wintergrasp_defender_teleport_trigger_SpellScript);
void HandleDummy(SpellEffIndex /*effindex*/)
{
diff --git a/src/server/scripts/Northrend/zone_zuldrak.cpp b/src/server/scripts/Northrend/zone_zuldrak.cpp
index 632eaa7396b..cf8c4cd9b36 100644
--- a/src/server/scripts/Northrend/zone_zuldrak.cpp
+++ b/src/server/scripts/Northrend/zone_zuldrak.cpp
@@ -91,7 +91,7 @@ public:
{
if (caster->ToPlayer()->GetQuestStatus(QUEST_TROLLS_IS_GONE_CRAZY) == QUEST_STATUS_INCOMPLETE)
{
- if (Creature* rageclaw = Unit::GetCreature(*me, _rageclawGUID))
+ if (Creature* rageclaw = ObjectAccessor::GetCreature(*me, _rageclawGUID))
{
UnlockRageclaw(caster, rageclaw);
caster->ToPlayer()->KilledMonster(rageclaw->GetCreatureTemplate(), _rageclawGUID);
@@ -613,7 +613,7 @@ class spell_random_ingredient_aura : public SpellScriptLoader
class spell_random_ingredient_aura_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_random_ingredient_aura_AuraScript)
+ PrepareAuraScript(spell_random_ingredient_aura_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -660,7 +660,7 @@ class spell_random_ingredient : public SpellScriptLoader
class spell_random_ingredient_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_random_ingredient_SpellScript)
+ PrepareSpellScript(spell_random_ingredient_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -724,7 +724,7 @@ class spell_pot_check : public SpellScriptLoader
class spell_pot_check_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_pot_check_SpellScript)
+ PrepareSpellScript(spell_pot_check_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -817,7 +817,7 @@ class spell_fetch_ingredient_aura : public SpellScriptLoader
class spell_fetch_ingredient_aura_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_fetch_ingredient_aura_AuraScript)
+ PrepareAuraScript(spell_fetch_ingredient_aura_AuraScript);
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
diff --git a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp
index 9ab35aa188b..ea877435acf 100644
--- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp
+++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp
@@ -223,7 +223,7 @@ public:
summoned->SetDisplayId(soulmodel);
summoned->setFaction(me->getFaction());
- if (Unit* target = Unit::GetUnit(*me, soulholder))
+ if (Unit* target = ObjectAccessor::GetUnit(*me, soulholder))
{
CAST_AI(npc_stolen_soul::npc_stolen_soulAI, summoned->AI())->SetMyClass(soulclass);
diff --git a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp
index bd65cd9fc89..26e9df6620c 100644
--- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp
+++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp
@@ -92,7 +92,7 @@ public:
summoned->SetLevel(me->getLevel());
summoned->AddUnitState(UNIT_STATE_ROOT);
- if (Unit* pFocusedTarget = Unit::GetUnit(*me, FocusedTargetGUID))
+ if (Unit* pFocusedTarget = ObjectAccessor::GetUnit(*me, FocusedTargetGUID))
summoned->AI()->AttackStart(pFocusedTarget);
}
}
diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp
index d15ee3570c9..31adf1522d4 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp
@@ -181,7 +181,7 @@ class spell_murmur_sonic_boom : public SpellScriptLoader
class spell_murmur_sonic_boom_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_murmur_sonic_boom_SpellScript)
+ PrepareSpellScript(spell_murmur_sonic_boom_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -215,7 +215,7 @@ class spell_murmur_sonic_boom_effect : public SpellScriptLoader
class spell_murmur_sonic_boom_effect_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_murmur_sonic_boom_effect_SpellScript)
+ PrepareSpellScript(spell_murmur_sonic_boom_effect_SpellScript);
void CalcDamage()
{
@@ -258,7 +258,7 @@ class spell_murmur_thundering_storm : public SpellScriptLoader
class spell_murmur_thundering_storm_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_murmur_thundering_storm_SpellScript)
+ PrepareSpellScript(spell_murmur_thundering_storm_SpellScript);
void FilterTarget(std::list<WorldObject*>& targets)
{
diff --git a/src/server/scripts/Outland/BlackTemple/black_temple.cpp b/src/server/scripts/Outland/BlackTemple/black_temple.cpp
index 427265e2562..5edae14d47a 100644
--- a/src/server/scripts/Outland/BlackTemple/black_temple.cpp
+++ b/src/server/scripts/Outland/BlackTemple/black_temple.cpp
@@ -155,11 +155,11 @@ public:
case EVENT_SET_CHANNELERS:
{
for (std::list<uint64>::const_iterator itr = bloodmage.begin(); itr != bloodmage.end(); ++itr)
- if (Creature* bloodmage = (Unit::GetCreature(*me, *itr)))
+ if (Creature* bloodmage = (ObjectAccessor::GetCreature(*me, *itr)))
bloodmage->CastSpell((Unit*)NULL, SPELL_SUMMON_CHANNEL);
for (std::list<uint64>::const_iterator itr = deathshaper.begin(); itr != deathshaper.end(); ++itr)
- if (Creature* deathshaper = (Unit::GetCreature(*me, *itr)))
+ if (Creature* deathshaper = (ObjectAccessor::GetCreature(*me, *itr)))
deathshaper->CastSpell((Unit*)NULL, SPELL_SUMMON_CHANNEL);
events.ScheduleEvent(EVENT_SET_CHANNELERS, 12000);
diff --git a/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp b/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp
index 1f8c090230b..0004df68016 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp
@@ -150,7 +150,7 @@ public:
std::list<HostileReference*>::const_iterator itr = m_threatlist.begin();
for (; itr!= m_threatlist.end(); ++itr) //store the threat list in a different container
{
- Unit* target = Unit::GetUnit(*me, (*itr)->getUnitGuid());
+ Unit* target = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid());
//only on alive players
if (target && target->IsAlive() && target->GetTypeId() == TYPEID_PLAYER)
targets.push_back(target);
@@ -184,7 +184,7 @@ public:
void RevertThreatOnTarget(uint64 guid)
{
- if (Unit* unit = Unit::GetUnit(*me, guid))
+ if (Unit* unit = ObjectAccessor::GetUnit(*me, guid))
{
if (DoGetThreat(unit))
DoModifyThreatPercent(unit, -100);
diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
index f0498d8a5c2..b1c3d607396 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
@@ -596,9 +596,9 @@ public:
if (Conversation[count].creature == ILLIDAN_STORMRAGE)
creature = me;
else if (Conversation[count].creature == AKAMA)
- creature = (Unit::GetCreature((*me), AkamaGUID));
+ creature = (ObjectAccessor::GetCreature((*me), AkamaGUID));
else if (Conversation[count].creature == MAIEV_SHADOWSONG)
- creature = (Unit::GetCreature((*me), MaievGUID));
+ creature = (ObjectAccessor::GetCreature((*me), MaievGUID));
if (creature)
{
@@ -831,7 +831,7 @@ public:
{
if (GlaiveGUID[i])
{
- Unit* Glaive = Unit::GetUnit(*me, GlaiveGUID[i]);
+ Unit* Glaive = ObjectAccessor::GetUnit(*me, GlaiveGUID[i]);
if (Glaive)
{
Glaive->CastSpell(me, SPELL_GLAIVE_RETURNS, false); // Make it look like the Glaive flies back up to us
@@ -1437,7 +1437,7 @@ public:
std::vector<Unit*> eliteList;
for (ThreatContainer::StorageType::const_iterator itr = threatList.begin(); itr != threatList.end(); ++itr)
{
- Unit* unit = Unit::GetUnit(*me, (*itr)->getUnitGuid());
+ Unit* unit = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid());
if (unit && unit->GetEntry() == ILLIDARI_ELITE)
eliteList.push_back(unit);
}
@@ -1588,9 +1588,9 @@ public:
Unit* Spirit[2] = { NULL, NULL };
if (ChannelCount <= 5)
{
- Channel = Unit::GetUnit(*me, ChannelGUID);
- Spirit[0] = Unit::GetUnit(*me, SpiritGUID[0]);
- Spirit[1] = Unit::GetUnit(*me, SpiritGUID[1]);
+ Channel = ObjectAccessor::GetUnit(*me, ChannelGUID);
+ Spirit[0] = ObjectAccessor::GetUnit(*me, SpiritGUID[0]);
+ Spirit[1] = ObjectAccessor::GetUnit(*me, SpiritGUID[1]);
if (!Channel || !Spirit[0] || !Spirit[1])
return;
}
@@ -2007,7 +2007,7 @@ public:
// if (IllidanGUID && !SummonedBeams)
// {
- // if (Unit* Illidan = Unit::GetUnit(*me, IllidanGUID)
+ // if (Unit* Illidan = ObjectAccessor::GetUnit(*me, IllidanGUID)
// {
// /// @todo Find proper spells and properly apply 'caged' Illidan effect
// }
@@ -2068,7 +2068,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
- if (Unit* target = Unit::GetUnit(*me, TargetGUID))
+ if (Unit* target = ObjectAccessor::GetUnit(*me, TargetGUID))
target->RemoveAurasDueToSpell(SPELL_PARALYZE);
}
@@ -2157,7 +2157,7 @@ public:
if (!me->EnsureVictim()->HasAura(SPELL_PARASITIC_SHADOWFIEND)
&& !me->EnsureVictim()->HasAura(SPELL_PARASITIC_SHADOWFIEND2))
{
- if (Creature* illidan = Unit::GetCreature((*me), IllidanGUID))// summon only in 1. phase
+ if (Creature* illidan = ObjectAccessor::GetCreature((*me), IllidanGUID))// summon only in 1. phase
if (CAST_AI(boss_illidan_stormrage::boss_illidan_stormrageAI, illidan->AI())->Phase == PHASE_NORMAL)
me->CastSpell(me->GetVictim(), SPELL_PARASITIC_SHADOWFIEND2, true, 0, 0, IllidanGUID); // do not stack
}
diff --git a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp
index ac91c2ac034..db3fcea35db 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp
@@ -245,7 +245,7 @@ public:
{
if (TargetGUID[i])
{
- if (Unit* unit = Unit::GetUnit(*me, TargetGUID[i]))
+ if (Unit* unit = ObjectAccessor::GetUnit(*me, TargetGUID[i]))
unit->CastSpell(unit, SPELL_ATTRACTION, true);
TargetGUID[i] = 0;
}
diff --git a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp
index 39edb6b04aa..9b304c3cd7b 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp
@@ -229,7 +229,7 @@ public:
ThreatContainer::StorageType threatlist = target->getThreatManager().getThreatList();
for (ThreatContainer::StorageType::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
{
- Unit* unit = Unit::GetUnit(*me, (*itr)->getUnitGuid());
+ Unit* unit = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid());
if (unit)
{
DoModifyThreatPercent(unit, -100);
@@ -258,7 +258,7 @@ public:
Creature* Essence = NULL;
if (EssenceGUID)
{
- Essence = Unit::GetCreature(*me, EssenceGUID);
+ Essence = ObjectAccessor::GetCreature(*me, EssenceGUID);
if (!Essence)
{
EnterEvadeMode();
@@ -378,7 +378,7 @@ public:
void npc_enslaved_soul::npc_enslaved_soulAI::JustDied(Unit* /*killer*/)
{
if (ReliquaryGUID)
- if (Creature* Reliquary = (Unit::GetCreature((*me), ReliquaryGUID)))
+ if (Creature* Reliquary = (ObjectAccessor::GetCreature((*me), ReliquaryGUID)))
++(CAST_AI(boss_reliquary_of_souls::boss_reliquary_of_soulsAI, Reliquary->AI())->SoulDeathCount);
DoCast(me, SPELL_SOUL_RELEASE, true);
@@ -454,7 +454,7 @@ public:
ThreatContainer::StorageType::const_iterator itr = threatlist.begin();
for (; itr != threatlist.end(); ++itr)
{
- Unit* unit = Unit::GetUnit(*me, (*itr)->getUnitGuid());
+ Unit* unit = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid());
if (unit && unit->IsAlive() && (unit->GetTypeId() == TYPEID_PLAYER)) // Only alive players
targets.push_back(unit);
}
diff --git a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
index 8e5eb5ca888..b59d073c17d 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
@@ -777,7 +777,7 @@ public:
void IsSummonedBy(Unit* /*summoner*/) override
{
- if (Creature* summoner = (Unit::GetCreature((*me), summonerGuid)))
+ if (Creature* summoner = (ObjectAccessor::GetCreature((*me), summonerGuid)))
CAST_AI(npc_creature_generator_akama::npc_creature_generator_akamaAI, summoner->AI())->JustSummoned(me);
}
@@ -883,7 +883,7 @@ public:
void IsSummonedBy(Unit* /*summoner*/) override
{
- if (Creature* summoner = (Unit::GetCreature((*me), summonerGuid)))
+ if (Creature* summoner = (ObjectAccessor::GetCreature((*me), summonerGuid)))
CAST_AI(npc_creature_generator_akama::npc_creature_generator_akamaAI, summoner->AI())->JustSummoned(me);
}
@@ -973,7 +973,7 @@ public:
void IsSummonedBy(Unit* /*summoner*/) override
{
- if (Creature* summoner = (Unit::GetCreature((*me), summonerGuid)))
+ if (Creature* summoner = (ObjectAccessor::GetCreature((*me), summonerGuid)))
CAST_AI(npc_creature_generator_akama::npc_creature_generator_akamaAI, summoner->AI())->JustSummoned(me);
}
@@ -1053,7 +1053,7 @@ public:
void IsSummonedBy(Unit* /*summoner*/) override
{
- if (Creature* summoner = (Unit::GetCreature((*me), summonerGuid)))
+ if (Creature* summoner = (ObjectAccessor::GetCreature((*me), summonerGuid)))
CAST_AI(npc_creature_generator_akama::npc_creature_generator_akamaAI, summoner->AI())->JustSummoned(me);
}
@@ -1135,7 +1135,7 @@ public:
void IsSummonedBy(Unit* /*summoner*/) override
{
- if (Creature* summoner = (Unit::GetCreature((*me), summonerGuid)))
+ if (Creature* summoner = (ObjectAccessor::GetCreature((*me), summonerGuid)))
CAST_AI(npc_creature_generator_akama::npc_creature_generator_akamaAI, summoner->AI())->JustSummoned(me);
}
diff --git a/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp b/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp
index 98a349f3606..a705659337f 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp
@@ -178,7 +178,7 @@ public:
ThreatContainer::StorageType::const_iterator i = threatlist.begin();
for (i = threatlist.begin(); i != threatlist.end(); ++i)
{
- Unit* unit = Unit::GetUnit(*me, (*i)->getUnitGuid());
+ Unit* unit = ObjectAccessor::GetUnit(*me, (*i)->getUnitGuid());
if (unit && me->IsWithinMeleeRange(unit))
{
if (unit->GetHealth() > health)
diff --git a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp
index 35521a783be..0d9537b8b7a 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp
@@ -95,7 +95,7 @@ public:
{
DoZoneInCombat();
- Creature* Teron = (Unit::GetCreature((*me), TeronGUID));
+ Creature* Teron = (ObjectAccessor::GetCreature((*me), TeronGUID));
if ((Teron) && (!Teron->IsAlive() || Teron->IsInEvadeMode()))
Despawn();
}
@@ -177,7 +177,7 @@ public:
std::list<Unit*> targets;
for (; itr != threatlist.end(); ++itr)
{
- Unit* unit = Unit::GetUnit(*me, (*itr)->getUnitGuid());
+ Unit* unit = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid());
if (unit && unit->IsAlive())
targets.push_back(unit);
}
@@ -200,7 +200,7 @@ public:
if (CheckTeronTimer <= diff)
{
- Creature* Teron = (Unit::GetCreature((*me), TeronGUID));
+ Creature* Teron = (ObjectAccessor::GetCreature((*me), TeronGUID));
if (!Teron || !Teron->IsAlive() || Teron->IsInEvadeMode())
me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
@@ -324,7 +324,7 @@ public:
ThreatContainer::StorageType::const_iterator i = threatlist.begin();
for (i = threatlist.begin(); i != threatlist.end(); ++i)
{
- Unit* unit = Unit::GetUnit(*me, (*i)->getUnitGuid());
+ Unit* unit = ObjectAccessor::GetUnit(*me, (*i)->getUnitGuid());
if (unit && unit->IsAlive())
{
float threat = DoGetThreat(unit);
@@ -344,7 +344,7 @@ public:
Unit* ghost = NULL;
if (GhostGUID)
- ghost = Unit::GetUnit(*me, GhostGUID);
+ ghost = ObjectAccessor::GetUnit(*me, GhostGUID);
if (ghost && ghost->IsAlive() && ghost->HasAura(SPELL_SHADOW_OF_DEATH))
{
/*float x, y, z;
@@ -391,7 +391,7 @@ public:
Done = true;
if (AggroTargetGUID)
{
- Unit* unit = Unit::GetUnit(*me, AggroTargetGUID);
+ Unit* unit = ObjectAccessor::GetUnit(*me, AggroTargetGUID);
if (unit)
AttackStart(unit);
diff --git a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp
index 5228f891294..2362f534b05 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp
@@ -141,7 +141,7 @@ public:
if (!SpineTargetGUID)
return false;
- Unit* target = Unit::GetUnit(*me, SpineTargetGUID);
+ Unit* target = ObjectAccessor::GetUnit(*me, SpineTargetGUID);
if (target && target->HasAura(SPELL_IMPALING_SPINE))
target->RemoveAurasDueToSpell(SPELL_IMPALING_SPINE);
SpineTargetGUID=0;
diff --git a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
index d17f88de910..8fd9a421a49 100644
--- a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
+++ b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
@@ -182,7 +182,7 @@ public:
{
if (AggroYellTimer <= diff)
{
- if (Creature* pMember = Creature::GetCreature(*me, Council[YellCounter]))
+ if (Creature* pMember = ObjectAccessor::GetCreature(*me, Council[YellCounter]))
{
pMember->AI()->Talk(CouncilAggro[YellCounter].entry);
AggroYellTimer = CouncilAggro[YellCounter].timer;
@@ -197,7 +197,7 @@ public:
{
if (EnrageTimer <= diff)
{
- if (Creature* pMember = Creature::GetCreature(*me, Council[YellCounter]))
+ if (Creature* pMember = ObjectAccessor::GetCreature(*me, Council[YellCounter]))
{
pMember->CastSpell(pMember, SPELL_BERSERK, true);
pMember->AI()->Talk(CouncilEnrage[YellCounter].entry);
@@ -251,7 +251,7 @@ public:
Creature* pMember = NULL;
for (uint8 i = 0; i < 4; ++i)
{
- pMember = Unit::GetCreature((*me), Council[i]);
+ pMember = ObjectAccessor::GetCreature((*me), Council[i]);
if (!pMember)
continue;
@@ -330,7 +330,7 @@ public:
return;
}
- Creature* pMember = (Unit::GetCreature(*me, Council[DeathCount]));
+ Creature* pMember = (ObjectAccessor::GetCreature(*me, Council[DeathCount]));
if (pMember && pMember->IsAlive())
pMember->DealDamage(pMember, pMember->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
++DeathCount;
@@ -347,7 +347,7 @@ public:
{
if (Council[i])
{
- if (Creature* Member = (Unit::GetCreature((*me), Council[i])))
+ if (Creature* Member = (ObjectAccessor::GetCreature((*me), Council[i])))
{
// This is the evade/death check.
if (Member->IsAlive() && !Member->GetVictim())
@@ -407,7 +407,7 @@ struct boss_illidari_councilAI : public ScriptedAI
{
for (uint8 i = 0; i < 4; ++i)
{
- if (Unit* unit = Unit::GetUnit(*me, Council[i]))
+ if (Unit* unit = ObjectAccessor::GetUnit(*me, Council[i]))
if (unit != me && unit->GetVictim())
{
AttackStart(unit->GetVictim());
@@ -425,7 +425,7 @@ struct boss_illidari_councilAI : public ScriptedAI
damage /= 4;
for (uint8 i = 0; i < 4; ++i)
{
- if (Creature* unit = Unit::GetCreature(*me, Council[i]))
+ if (Creature* unit = ObjectAccessor::GetCreature(*me, Council[i]))
if (unit != me && damage < unit->GetHealth())
{
unit->ModifyHealth(-int32(damage));
@@ -493,7 +493,7 @@ public:
member = urand(1, 3);
if (member != 2) // No need to create another pointer to us using Unit::GetUnit
- unit = Unit::GetUnit(*me, Council[member]);
+ unit = ObjectAccessor::GetUnit(*me, Council[member]);
return unit;
}
@@ -507,7 +507,7 @@ public:
}
for (uint8 i = 0; i < 4; ++i)
{
- Unit* unit = Unit::GetUnit(*me, Council[i]);
+ Unit* unit = ObjectAccessor::GetUnit(*me, Council[i]);
if (unit)
unit->CastSpell(unit, spellid, true, 0, 0, me->GetGUID());
}
@@ -876,7 +876,7 @@ public:
class spell_boss_lady_malande_shield_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_boss_lady_malande_shield_AuraScript)
+ PrepareAuraScript(spell_boss_lady_malande_shield_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp
index 6d43b0e910c..c6b62ee8de7 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp
@@ -216,7 +216,7 @@ public:
//Only if not incombat check if the event is started
if (!me->IsInCombat() && instance->GetData(DATA_KARATHRESSEVENT))
{
- if (Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_KARATHRESSEVENT_STARTER)))
+ if (Unit* target = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_KARATHRESSEVENT_STARTER)))
{
AttackStart(target);
GetAdvisors();
@@ -357,7 +357,7 @@ public:
//Only if not incombat check if the event is started
if (!me->IsInCombat() && instance->GetData(DATA_KARATHRESSEVENT))
{
- if (Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_KARATHRESSEVENT_STARTER)))
+ if (Unit* target = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_KARATHRESSEVENT_STARTER)))
AttackStart(target);
}
@@ -484,7 +484,7 @@ public:
//Only if not incombat check if the event is started
if (!me->IsInCombat() && instance->GetData(DATA_KARATHRESSEVENT))
{
- if (Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_KARATHRESSEVENT_STARTER)))
+ if (Unit* target = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_KARATHRESSEVENT_STARTER)))
AttackStart(target);
}
@@ -515,7 +515,7 @@ public:
if (Spitfire_Timer <= diff)
{
DoCast(me, SPELL_SPITFIRE_TOTEM);
- if (Unit* SpitfireTotem = Unit::GetUnit(*me, CREATURE_SPITFIRE_TOTEM))
+ if (Unit* SpitfireTotem = ObjectAccessor::GetUnit(*me, CREATURE_SPITFIRE_TOTEM))
SpitfireTotem->ToCreature()->AI()->AttackStart(me->GetVictim());
Spitfire_Timer = 60000;
@@ -599,7 +599,7 @@ public:
//Only if not incombat check if the event is started
if (!me->IsInCombat() && instance->GetData(DATA_KARATHRESSEVENT))
{
- if (Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_KARATHRESSEVENT_STARTER)))
+ if (Unit* target = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_KARATHRESSEVENT_STARTER)))
AttackStart(target);
}
@@ -675,13 +675,13 @@ public:
switch (rand()%4)
{
case 0:
- unit = Unit::GetUnit(*me, instance->GetData64(DATA_KARATHRESS));
+ unit = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_KARATHRESS));
break;
case 1:
- unit = Unit::GetUnit(*me, instance->GetData64(DATA_SHARKKIS));
+ unit = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_SHARKKIS));
break;
case 2:
- unit = Unit::GetUnit(*me, instance->GetData64(DATA_TIDALVESS));
+ unit = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_TIDALVESS));
break;
case 3:
unit = me;
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp
index c4d21d30328..bcde75584fb 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp
@@ -162,7 +162,7 @@ public:
{
for (uint8 i = 0; i < 2; ++i)
{
- if (Creature* mob = Unit::GetCreature(*me, beams[i]))
+ if (Creature* mob = ObjectAccessor::GetCreature(*me, beams[i]))
{
mob->setDeathState(DEAD);
mob->RemoveCorpse();
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp
index dbf0c419fad..0745a85bf02 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp
@@ -207,7 +207,7 @@ public:
{
if (ShieldGeneratorChannel[i])
{
- if (Unit* remo = Unit::GetUnit(*me, ShieldGeneratorChannel[i]))
+ if (Unit* remo = ObjectAccessor::GetUnit(*me, ShieldGeneratorChannel[i]))
{
remo->setDeathState(JUST_DIED);
ShieldGeneratorChannel[i] = 0;
@@ -431,7 +431,7 @@ public:
std::list<HostileReference*> t_list = me->getThreatManager().getThreatList();
for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
{
- Unit* target = Unit::GetUnit(*me, (*itr)->getUnitGuid());
+ Unit* target = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid());
if (target && target->IsWithinDistInMap(me, 5)) // if in melee range
{
inMeleeRange = true;
@@ -620,7 +620,7 @@ public:
if (me->IsWithinDist3d(MIDDLE_X, MIDDLE_Y, MIDDLE_Z, 3))
DoCast(me, SPELL_SURGE);
}
- if (Creature* vashj = Unit::GetCreature(*me, VashjGUID))
+ if (Creature* vashj = ObjectAccessor::GetCreature(*me, VashjGUID))
if (!vashj->IsInCombat() || CAST_AI(boss_lady_vashj::boss_lady_vashjAI, vashj->AI())->Phase != 2 || vashj->isDead())
me->Kill(me);
Move = 1000;
@@ -662,7 +662,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
- if (Creature* vashj = Unit::GetCreature((*me), instance->GetData64(DATA_LADYVASHJ)))
+ if (Creature* vashj = ObjectAccessor::GetCreature((*me), instance->GetData64(DATA_LADYVASHJ)))
CAST_AI(boss_lady_vashj::boss_lady_vashjAI, vashj->AI())->EventTaintedElementalDeath();
}
@@ -778,7 +778,7 @@ public:
if (CheckTimer <= diff)
{
// check if vashj is death
- Unit* Vashj = Unit::GetUnit(*me, instance->GetData64(DATA_LADYVASHJ));
+ Unit* Vashj = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_LADYVASHJ));
if (!Vashj || !Vashj->IsAlive() || CAST_AI(boss_lady_vashj::boss_lady_vashjAI, Vashj->ToCreature()->AI())->Phase != 3)
{
// remove
@@ -833,7 +833,7 @@ public:
{
if (CheckTimer <= diff)
{
- Unit* vashj = Unit::GetUnit(*me, instance->GetData64(DATA_LADYVASHJ));
+ Unit* vashj = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_LADYVASHJ));
if (vashj && vashj->IsAlive())
{
@@ -865,7 +865,7 @@ public:
return true;
}
- Creature* vashj = Unit::GetCreature((*player), instance->GetData64(DATA_LADYVASHJ));
+ Creature* vashj = ObjectAccessor::GetCreature((*player), instance->GetData64(DATA_LADYVASHJ));
if (vashj && (CAST_AI(boss_lady_vashj::boss_lady_vashjAI, vashj->AI())->Phase == 2))
{
if (GameObject* gObj = targets.GetGOTarget())
@@ -901,7 +901,7 @@ public:
}
// get and remove channel
- if (Unit* channel = Unit::GetCreature(*vashj, CAST_AI(boss_lady_vashj::boss_lady_vashjAI, vashj->AI())->ShieldGeneratorChannel[channelIdentifier]))
+ if (Unit* channel = ObjectAccessor::GetCreature(*vashj, CAST_AI(boss_lady_vashj::boss_lady_vashjAI, vashj->AI())->ShieldGeneratorChannel[channelIdentifier]))
channel->setDeathState(JUST_DIED); // call Unsummon()
instance->SetData(identifier, 1);
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp
index 462babdc597..cc09952d336 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp
@@ -112,7 +112,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
- Unit* unit = Unit::GetUnit(*me, victimGUID);
+ Unit* unit = ObjectAccessor::GetUnit(*me, victimGUID);
if (unit && unit->HasAura(SPELL_INSIDIOUS_WHISPER))
unit->RemoveAurasDueToSpell(SPELL_INSIDIOUS_WHISPER);
}
@@ -141,7 +141,7 @@ public:
if (me->EnsureVictim()->GetGUID() != victimGUID)
{
DoModifyThreatPercent(me->GetVictim(), -100);
- Unit* owner = Unit::GetUnit(*me, victimGUID);
+ Unit* owner = ObjectAccessor::GetUnit(*me, victimGUID);
if (owner && owner->IsAlive())
{
me->AddThreat(owner, 999999);
@@ -249,7 +249,7 @@ public:
{
for (uint8 i = 0; i < 3; ++i)
{
- if (Creature* add = Unit::GetCreature(*me, SpellBinderGUID[i]))
+ if (Creature* add = ObjectAccessor::GetCreature(*me, SpellBinderGUID[i]))
add->DisappearAndDie();
float nx = x;
@@ -297,7 +297,7 @@ public:
uint8 AliveChannelers = 0;
for (uint8 i = 0; i < 3; ++i)
{
- Unit* add = Unit::GetUnit(*me, SpellBinderGUID[i]);
+ Unit* add = ObjectAccessor::GetUnit(*me, SpellBinderGUID[i]);
if (add && add->IsAlive())
++AliveChannelers;
}
@@ -350,7 +350,7 @@ public:
if (InnderDemon[i])
{
//delete creature
- Creature* creature = Unit::GetCreature((*me), InnderDemon[i]);
+ Creature* creature = ObjectAccessor::GetCreature((*me), InnderDemon[i]);
if (creature && creature->IsAlive())
{
creature->DespawnOrUnsummon();
@@ -368,10 +368,10 @@ public:
{
if (InnderDemon[i] > 0)
{
- Creature* unit = Unit::GetCreature((*me), InnderDemon[i]);
+ Creature* unit = ObjectAccessor::GetCreature((*me), InnderDemon[i]);
if (unit && unit->IsAlive())
{
- Unit* unit_target = Unit::GetUnit(*unit, unit->AI()->GetGUID(INNER_DEMON_VICTIM));
+ Unit* unit_target = ObjectAccessor::GetUnit(*unit, unit->AI()->GetGUID(INNER_DEMON_VICTIM));
if (unit_target && unit_target->IsAlive())
{
unit->CastSpell(unit_target, SPELL_CONSUMING_MADNESS, true);
@@ -397,7 +397,7 @@ public:
//despawn copy
if (Demon)
{
- if (Creature* pDemon = Unit::GetCreature(*me, Demon))
+ if (Creature* pDemon = ObjectAccessor::GetCreature(*me, Demon))
pDemon->DespawnOrUnsummon();
}
instance->SetData(DATA_LEOTHERASTHEBLINDEVENT, DONE);
@@ -518,7 +518,7 @@ public:
std::vector<Unit*> TargetList;
for (ThreatContainer::StorageType::const_iterator itr = ThreatList.begin(); itr != ThreatList.end(); ++itr)
{
- Unit* tempTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid());
+ Unit* tempTarget = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid());
if (tempTarget && tempTarget->GetTypeId() == TYPEID_PLAYER && tempTarget->GetGUID() != me->EnsureVictim()->GetGUID() && TargetList.size()<5)
TargetList.push_back(tempTarget);
}
@@ -701,7 +701,7 @@ public:
Earthshock_Timer = urand(5000, 10000);
instance->SetData64(DATA_LEOTHERAS_EVENT_STARTER, 0);
- Creature* leotheras = Unit::GetCreature(*me, leotherasGUID);
+ Creature* leotheras = ObjectAccessor::GetCreature(*me, leotherasGUID);
if (leotheras && leotheras->IsAlive())
CAST_AI(boss_leotheras_the_blind::boss_leotheras_the_blindAI, leotheras->AI())->CheckChannelers(/*false*/);
}
@@ -724,7 +724,7 @@ public:
{
if (leotherasGUID)
{
- Creature* leotheras = Unit::GetCreature(*me, leotherasGUID);
+ Creature* leotheras = ObjectAccessor::GetCreature(*me, leotherasGUID);
if (leotheras && leotheras->IsAlive())
DoCast(leotheras, BANISH_BEAM);
}
@@ -739,7 +739,7 @@ public:
if (!me->IsInCombat() && instance->GetData64(DATA_LEOTHERAS_EVENT_STARTER))
{
Unit* victim = NULL;
- victim = Unit::GetUnit(*me, instance->GetData64(DATA_LEOTHERAS_EVENT_STARTER));
+ victim = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_LEOTHERAS_EVENT_STARTER));
if (victim)
AttackStart(victim);
}
diff --git a/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_the_black_stalker.cpp b/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_the_black_stalker.cpp
index 4f8c9390ba4..7e37c22565a 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_the_black_stalker.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_the_black_stalker.cpp
@@ -98,7 +98,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
for (std::list<uint64>::const_iterator i = Striders.begin(); i != Striders.end(); ++i)
- if (Creature* strider = Unit::GetCreature(*me, *i))
+ if (Creature* strider = ObjectAccessor::GetCreature(*me, *i))
strider->DisappearAndDie();
}
@@ -132,7 +132,7 @@ public:
{
if (LevitatedTarget_Timer <= diff)
{
- if (Unit* target = Unit::GetUnit(*me, LevitatedTarget))
+ if (Unit* target = ObjectAccessor::GetUnit(*me, LevitatedTarget))
{
if (!target->HasAura(SPELL_LEVITATE))
{
diff --git a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp
index 595bf13791d..592ffc1f69e 100644
--- a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp
+++ b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp
@@ -263,7 +263,7 @@ class spell_gruul_shatter : public SpellScriptLoader
class spell_gruul_shatter_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gruul_shatter_SpellScript)
+ PrepareSpellScript(spell_gruul_shatter_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -302,7 +302,7 @@ class spell_gruul_shatter_effect : public SpellScriptLoader
class spell_gruul_shatter_effect_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gruul_shatter_effect_SpellScript)
+ PrepareSpellScript(spell_gruul_shatter_effect_SpellScript);
void CalculateDamage()
{
diff --git a/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp b/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp
index c1e9d0a2b91..89aad2534f0 100644
--- a/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp
+++ b/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp
@@ -530,7 +530,7 @@ public:
std::vector<Unit*> target_list;
for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
{
- target = Unit::GetUnit(*me, (*itr)->getUnitGuid());
+ target = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid());
//15 yard radius minimum
if (target && target->IsWithinDist(me, 15, false))
target_list.push_back(target);
diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp
index 23dabdfd80f..063a30ca875 100644
--- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp
@@ -195,7 +195,7 @@ class spell_broggok_poison_cloud : public SpellScriptLoader
class spell_broggok_poison_cloud_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_broggok_poison_cloud_AuraScript)
+ PrepareAuraScript(spell_broggok_poison_cloud_AuraScript);
bool Validate(SpellInfo const* spellInfo) override
{
diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp
index 066772cb0f7..c85a26a25ab 100644
--- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp
@@ -118,7 +118,7 @@ class boss_kelidan_the_breaker : public CreatureScript
}
for (uint8 i=0; i<5; ++i)
{
- Creature* channeler = Unit::GetCreature(*me, Channelers[i]);
+ Creature* channeler = ObjectAccessor::GetCreature(*me, Channelers[i]);
if (who && channeler && !channeler->IsInCombat())
channeler->AI()->AttackStart(who);
}
@@ -128,7 +128,7 @@ class boss_kelidan_the_breaker : public CreatureScript
{
for (uint8 i=0; i<5; ++i)
{
- Creature* channeler = Unit::GetCreature(*me, Channelers[i]);
+ Creature* channeler = ObjectAccessor::GetCreature(*me, Channelers[i]);
if (channeler && channeler->IsAlive())
return;
}
@@ -147,7 +147,7 @@ class boss_kelidan_the_breaker : public CreatureScript
uint8 i;
for (i=0; i<5; ++i)
{
- Creature* channeler = Unit::GetCreature(*me, Channelers[i]);
+ Creature* channeler = ObjectAccessor::GetCreature(*me, Channelers[i]);
if (channeler && channeler->GetGUID() == channeler1->GetGUID())
break;
}
@@ -158,7 +158,7 @@ class boss_kelidan_the_breaker : public CreatureScript
{
for (uint8 i=0; i<5; ++i)
{
- Creature* channeler = Unit::GetCreature(*me, Channelers[i]);
+ Creature* channeler = ObjectAccessor::GetCreature(*me, Channelers[i]);
if (!channeler || channeler->isDead())
channeler = me->SummonCreature(ENTRY_CHANNELER, ShadowmoonChannelers[i][0], ShadowmoonChannelers[i][1], ShadowmoonChannelers[i][2], ShadowmoonChannelers[i][3], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
if (channeler)
@@ -313,7 +313,7 @@ class npc_shadowmoon_channeler : public CreatureScript
if (Creature* Kelidan = me->FindNearestCreature(ENTRY_KELIDAN, 100))
{
uint64 channeler = CAST_AI(boss_kelidan_the_breaker::boss_kelidan_the_breakerAI, Kelidan->AI())->GetChanneled(me);
- if (Unit* channeled = Unit::GetUnit(*me, channeler))
+ if (Unit* channeled = ObjectAccessor::GetUnit(*me, channeler))
DoCast(channeled, SPELL_CHANNELING);
}
check_Timer = 5000;
diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp
index 424090c87d0..b15bd18c97c 100644
--- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp
@@ -124,7 +124,7 @@ class boss_nazan : public CreatureScript
if (flight) // phase 1 - the flight
{
- Creature* Vazruden = Unit::GetCreature(*me, VazrudenGUID);
+ Creature* Vazruden = ObjectAccessor::GetCreature(*me, VazrudenGUID);
if (Fly_Timer < diff || !(Vazruden && Vazruden->IsAlive() && Vazruden->HealthAbovePct(20)))
{
flight = false;
@@ -300,7 +300,7 @@ class boss_vazruden_the_herald : public CreatureScript
{
if (summoned)
{
- Creature* Nazan = Unit::GetCreature(*me, NazanGUID);
+ Creature* Nazan = ObjectAccessor::GetCreature(*me, NazanGUID);
if (!Nazan)
Nazan = me->FindNearestCreature(NPC_NAZAN, 5000);
if (Nazan)
@@ -309,7 +309,7 @@ class boss_vazruden_the_herald : public CreatureScript
NazanGUID = 0;
}
- Creature* Vazruden = Unit::GetCreature(*me, VazrudenGUID);
+ Creature* Vazruden = ObjectAccessor::GetCreature(*me, VazrudenGUID);
if (!Vazruden)
Vazruden = me->FindNearestCreature(NPC_VAZRUDEN, 5000);
if (Vazruden)
@@ -404,8 +404,8 @@ class boss_vazruden_the_herald : public CreatureScript
default: // adds do the job now
if (check <= diff)
{
- Creature* Nazan = Unit::GetCreature(*me, NazanGUID);
- Creature* Vazruden = Unit::GetCreature(*me, VazrudenGUID);
+ Creature* Nazan = ObjectAccessor::GetCreature(*me, NazanGUID);
+ Creature* Vazruden = ObjectAccessor::GetCreature(*me, VazrudenGUID);
if ((Nazan && Nazan->IsAlive()) || (Vazruden && Vazruden->IsAlive()))
{
if ((Nazan && Nazan->GetVictim()) || (Vazruden && Vazruden->GetVictim()))
diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
index 91aad3c00eb..1bdaf4fc260 100644
--- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
@@ -257,7 +257,7 @@ class boss_magtheridon : public CreatureScript
{
// to avoid multiclicks from 1 cube
if (uint64 guid = Cube[cubeGUID])
- DebuffClicker(Unit::GetUnit(*me, guid));
+ DebuffClicker(ObjectAccessor::GetUnit(*me, guid));
Cube[cubeGUID] = clickerGUID;
NeedCheckCube = true;
}
@@ -280,7 +280,7 @@ class boss_magtheridon : public CreatureScript
// if not - apply mind exhaustion and delete from clicker's list
for (CubeMap::iterator i = Cube.begin(); i != Cube.end(); ++i)
{
- Unit* clicker = Unit::GetUnit(*me, (*i).second);
+ Unit* clicker = ObjectAccessor::GetUnit(*me, (*i).second);
if (!clicker || !clicker->HasAura(SPELL_SHADOW_GRASP))
{
DebuffClicker(clicker);
@@ -588,7 +588,7 @@ public:
if (instance->GetData(DATA_MAGTHERIDON_EVENT) != IN_PROGRESS)
return true;
- Creature* Magtheridon =Unit::GetCreature(*go, instance->GetData64(DATA_MAGTHERIDON));
+ Creature* Magtheridon =ObjectAccessor::GetCreature(*go, instance->GetData64(DATA_MAGTHERIDON));
if (!Magtheridon || !Magtheridon->IsAlive())
return true;
diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp
index 187e5b4993b..88c3041b62c 100644
--- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp
@@ -323,7 +323,7 @@ class npc_fel_orc_convert : public CreatureScript
{
events.ScheduleEvent(EVENT_HEMORRHAGE, 3000);
- if (Creature* Kurse = Unit::GetCreature(*me, instance->GetData64(NPC_GRAND_WARLOCK_NETHEKURSE)))
+ if (Creature* Kurse = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_GRAND_WARLOCK_NETHEKURSE)))
if (me->IsWithinDist(Kurse, 45.0f))
Kurse->AI()->SetData(SETDATA_DATA, SETDATA_PEON_AGGRO);
}
@@ -333,7 +333,7 @@ class npc_fel_orc_convert : public CreatureScript
if (instance->GetBossState(DATA_NETHEKURSE) != IN_PROGRESS)
return;
- if (Creature* Kurse = Unit::GetCreature(*me, instance->GetData64(NPC_GRAND_WARLOCK_NETHEKURSE)))
+ if (Creature* Kurse = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_GRAND_WARLOCK_NETHEKURSE)))
Kurse->AI()->SetData(SETDATA_DATA, SETDATA_PEON_DEATH);
}
diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp
index 69be4b46eff..b03fc651e12 100644
--- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp
@@ -142,13 +142,13 @@ class boss_warbringer_omrogg : public CreatureScript
void Reset() override
{
- if (Unit* LeftHead = Unit::GetUnit(*me, LeftHeadGUID))
+ if (Unit* LeftHead = ObjectAccessor::GetUnit(*me, LeftHeadGUID))
{
LeftHead->setDeathState(JUST_DIED);
LeftHeadGUID = 0;
}
- if (Unit* RightHead = Unit::GetUnit(*me, RightHeadGUID))
+ if (Unit* RightHead = ObjectAccessor::GetUnit(*me, RightHeadGUID))
{
RightHead->setDeathState(JUST_DIED);
RightHeadGUID = 0;
@@ -172,8 +172,8 @@ class boss_warbringer_omrogg : public CreatureScript
void DoYellForThreat()
{
- Creature* LeftHead = Creature::GetCreature(*me, LeftHeadGUID);
- Creature* RightHead = Unit::GetCreature(*me, RightHeadGUID);
+ Creature* LeftHead = ObjectAccessor::GetCreature(*me, LeftHeadGUID);
+ Creature* RightHead = ObjectAccessor::GetCreature(*me, RightHeadGUID);
if (!LeftHead || !RightHead)
return;
@@ -193,7 +193,7 @@ class boss_warbringer_omrogg : public CreatureScript
me->SummonCreature(NPC_LEFT_HEAD, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0);
me->SummonCreature(NPC_RIGHT_HEAD, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0);
- if (Creature* LeftHead = Creature::GetCreature(*me, LeftHeadGUID))
+ if (Creature* LeftHead = ObjectAccessor::GetCreature(*me, LeftHeadGUID))
{
iaggro = rand()%3;
@@ -221,8 +221,8 @@ class boss_warbringer_omrogg : public CreatureScript
void KilledUnit(Unit* /*victim*/) override
{
- Creature* LeftHead = Creature::GetCreature(*me, LeftHeadGUID);
- Creature* RightHead = Creature::GetCreature(*me, RightHeadGUID);
+ Creature* LeftHead = ObjectAccessor::GetCreature(*me, LeftHeadGUID);
+ Creature* RightHead = ObjectAccessor::GetCreature(*me, RightHeadGUID);
if (!LeftHead || !RightHead)
return;
@@ -247,8 +247,8 @@ class boss_warbringer_omrogg : public CreatureScript
void JustDied(Unit* /*killer*/) override
{
- Creature* LeftHead = Creature::GetCreature(*me, LeftHeadGUID);
- Creature* RightHead = Creature::GetCreature(*me, RightHeadGUID);
+ Creature* LeftHead = ObjectAccessor::GetCreature(*me, LeftHeadGUID);
+ Creature* RightHead = ObjectAccessor::GetCreature(*me, RightHeadGUID);
if (!LeftHead || !RightHead)
return;
@@ -266,8 +266,8 @@ class boss_warbringer_omrogg : public CreatureScript
{
Delay_Timer = 3500;
- Creature* LeftHead = Creature::GetCreature(*me, LeftHeadGUID);
- Creature* RightHead = Creature::GetCreature(*me, RightHeadGUID);
+ Creature* LeftHead = ObjectAccessor::GetCreature(*me, LeftHeadGUID);
+ Creature* RightHead = ObjectAccessor::GetCreature(*me, RightHeadGUID);
if (!LeftHead || !RightHead)
return;
diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp
index f918038b369..66aa02bbeaf 100644
--- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp
@@ -145,7 +145,7 @@ class boss_warchief_kargath_bladefist : public CreatureScript
{
for (std::vector<uint64>::const_iterator itr = adds.begin(); itr!= adds.end(); ++itr)
{
- Creature* creature = Unit::GetCreature(*me, *itr);
+ Creature* creature = ObjectAccessor::GetCreature(*me, *itr);
if (creature && creature->IsAlive())
{
creature->GetMotionMaster()->Clear(true);
@@ -157,7 +157,7 @@ class boss_warchief_kargath_bladefist : public CreatureScript
for (std::vector<uint64>::const_iterator itr = assassins.begin(); itr!= assassins.end(); ++itr)
{
- Creature* creature = Unit::GetCreature(*me, *itr);
+ Creature* creature = ObjectAccessor::GetCreature(*me, *itr);
if (creature && creature->IsAlive())
{
creature->GetMotionMaster()->Clear(true);
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp
index ead163b3a82..bcc8b0c5a48 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp
@@ -494,7 +494,7 @@ class npc_ember_of_alar : public CreatureScript
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
if (instance->GetData(DATA_ALAREVENT) == 2)
{
- if (Unit* Alar = Unit::GetUnit(*me, instance->GetData64(DATA_ALAR)))
+ if (Unit* Alar = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_ALAR)))
{
int32 AlarHealth = int32(Alar->GetHealth()) - int32(Alar->CountPctFromMaxHealth(3));
if (AlarHealth > 0)
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
index 716963391e6..2cac4a0be1a 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
@@ -464,7 +464,7 @@ class npc_solarium_priest : public CreatureScript
switch (urand(0, 1))
{
case 0:
- target = Unit::GetUnit(*me, instance->GetData64(DATA_ASTROMANCER));
+ target = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_ASTROMANCER));
break;
case 1:
target = me;
@@ -513,7 +513,7 @@ class spell_astromancer_wrath_of_the_astromancer : public SpellScriptLoader
class spell_astromancer_wrath_of_the_astromancer_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_astromancer_wrath_of_the_astromancer_AuraScript)
+ PrepareAuraScript(spell_astromancer_wrath_of_the_astromancer_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
index 016e68a4e8d..6fbe633dd45 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
@@ -183,7 +183,7 @@ struct advisorbase_ai : public ScriptedAI
//reset encounter
if (instance->GetData(DATA_KAELTHASEVENT) == 1 || instance->GetData(DATA_KAELTHASEVENT) == 3)
- if (Creature* Kaelthas = Unit::GetCreature(*me, instance->GetData64(DATA_KAELTHAS)))
+ if (Creature* Kaelthas = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_KAELTHAS)))
Kaelthas->AI()->EnterEvadeMode();
}
@@ -262,7 +262,7 @@ struct advisorbase_ai : public ScriptedAI
DelayRes_Timer = 0;
FakeDeath = false;
- Unit* Target = Unit::GetUnit(*me, DelayRes_Target);
+ Unit* Target = ObjectAccessor::GetUnit(*me, DelayRes_Target);
if (!Target)
Target = me->GetVictim();
@@ -351,7 +351,7 @@ class boss_kaelthas : public CreatureScript
{
for (uint8 i = 0; i < MAX_ADVISORS; ++i)
{
- if (Creature* creature = Unit::GetCreature(*me, m_auiAdvisorGuid[i]))
+ if (Creature* creature = ObjectAccessor::GetCreature(*me, m_auiAdvisorGuid[i]))
{
creature->Respawn();
creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
@@ -468,7 +468,7 @@ class boss_kaelthas : public CreatureScript
for (uint8 i = 0; i < MAX_ADVISORS; ++i)
{
- if (Unit* pAdvisor = Unit::GetUnit(*me, m_auiAdvisorGuid[i]))
+ if (Unit* pAdvisor = ObjectAccessor::GetUnit(*me, m_auiAdvisorGuid[i]))
pAdvisor->Kill(pAdvisor);
}
}
@@ -502,7 +502,7 @@ class boss_kaelthas : public CreatureScript
case 1:
if (Phase_Timer <= diff)
{
- Advisor = (Unit::GetCreature(*me, m_auiAdvisorGuid[0]));
+ Advisor = (ObjectAccessor::GetCreature(*me, m_auiAdvisorGuid[0]));
if (Advisor)
{
@@ -520,7 +520,7 @@ class boss_kaelthas : public CreatureScript
//Subphase 2 - Start
case 2:
- Advisor = (Unit::GetCreature(*me, m_auiAdvisorGuid[0]));
+ Advisor = (ObjectAccessor::GetCreature(*me, m_auiAdvisorGuid[0]));
if (Advisor && (Advisor->getStandState() == UNIT_STAND_STATE_DEAD))
{
@@ -536,7 +536,7 @@ class boss_kaelthas : public CreatureScript
case 3:
if (Phase_Timer <= diff)
{
- Advisor = (Unit::GetCreature(*me, m_auiAdvisorGuid[1]));
+ Advisor = (ObjectAccessor::GetCreature(*me, m_auiAdvisorGuid[1]));
if (Advisor)
{
@@ -554,7 +554,7 @@ class boss_kaelthas : public CreatureScript
//Subphase 3 - Start
case 4:
- Advisor = (Unit::GetCreature(*me, m_auiAdvisorGuid[1]));
+ Advisor = (ObjectAccessor::GetCreature(*me, m_auiAdvisorGuid[1]));
if (Advisor && (Advisor->getStandState() == UNIT_STAND_STATE_DEAD))
{
@@ -570,7 +570,7 @@ class boss_kaelthas : public CreatureScript
case 5:
if (Phase_Timer <= diff)
{
- Advisor = (Unit::GetCreature(*me, m_auiAdvisorGuid[2]));
+ Advisor = (ObjectAccessor::GetCreature(*me, m_auiAdvisorGuid[2]));
if (Advisor)
{
@@ -588,7 +588,7 @@ class boss_kaelthas : public CreatureScript
//Subphase 4 - Start
case 6:
- Advisor = (Unit::GetCreature(*me, m_auiAdvisorGuid[2]));
+ Advisor = (ObjectAccessor::GetCreature(*me, m_auiAdvisorGuid[2]));
if (Advisor && (Advisor->getStandState() == UNIT_STAND_STATE_DEAD))
{
@@ -604,7 +604,7 @@ class boss_kaelthas : public CreatureScript
case 7:
if (Phase_Timer <= diff)
{
- Advisor = (Unit::GetCreature(*me, m_auiAdvisorGuid[3]));
+ Advisor = (ObjectAccessor::GetCreature(*me, m_auiAdvisorGuid[3]));
if (Advisor)
{
@@ -623,7 +623,7 @@ class boss_kaelthas : public CreatureScript
//End of phase 1
case 8:
- Advisor = (Unit::GetCreature(*me, m_auiAdvisorGuid[3]));
+ Advisor = (ObjectAccessor::GetCreature(*me, m_auiAdvisorGuid[3]));
if (Advisor && (Advisor->getStandState() == UNIT_STAND_STATE_DEAD))
{
@@ -692,7 +692,7 @@ class boss_kaelthas : public CreatureScript
Creature* Advisor;
for (uint8 i = 0; i < MAX_ADVISORS; ++i)
{
- Advisor = Unit::GetCreature(*me, m_auiAdvisorGuid[i]);
+ Advisor = ObjectAccessor::GetCreature(*me, m_auiAdvisorGuid[i]);
if (!Advisor)
TC_LOG_ERROR("scripts", "SD2: Kael'Thas Advisor %u does not exist. Possibly despawned? Incorrectly Killed?", i);
@@ -896,7 +896,7 @@ class boss_kaelthas : public CreatureScript
// 1) Kael'thas will portal the whole raid right into his body
for (i = threatlist.begin(); i != threatlist.end(); ++i)
{
- Unit* unit = Unit::GetUnit(*me, (*i)->getUnitGuid());
+ Unit* unit = ObjectAccessor::GetUnit(*me, (*i)->getUnitGuid());
if (unit && (unit->GetTypeId() == TYPEID_PLAYER))
{
//Use work around packet to prevent player from being dropped from combat
@@ -917,7 +917,7 @@ class boss_kaelthas : public CreatureScript
// 2) At that point he will put a Gravity Lapse debuff on everyone
for (i = threatlist.begin(); i != threatlist.end(); ++i)
{
- if (Unit* unit = Unit::GetUnit(*me, (*i)->getUnitGuid()))
+ if (Unit* unit = ObjectAccessor::GetUnit(*me, (*i)->getUnitGuid()))
{
DoCast(unit, SPELL_KNOCKBACK, true);
//Gravity lapse - needs an exception in Spell system to work
@@ -949,7 +949,7 @@ class boss_kaelthas : public CreatureScript
//Remove flight
for (i = threatlist.begin(); i != threatlist.end(); ++i)
{
- if (Unit* unit = Unit::GetUnit(*me, (*i)->getUnitGuid()))
+ if (Unit* unit = ObjectAccessor::GetUnit(*me, (*i)->getUnitGuid()))
{
//Using packet workaround
WorldPacket data(SMSG_MOVE_UNSET_CAN_FLY, 12);
@@ -1288,7 +1288,7 @@ class boss_grand_astromancer_capernian : public CreatureScript
ThreatContainer::StorageType const &threatlist = me->getThreatManager().getThreatList();
for (ThreatContainer::StorageType::const_iterator i = threatlist.begin(); i!= threatlist.end(); ++i)
{
- Unit* unit = Unit::GetUnit(*me, (*i)->getUnitGuid());
+ Unit* unit = ObjectAccessor::GetUnit(*me, (*i)->getUnitGuid());
//if in melee range
if (unit && unit->IsWithinDistInMap(me, 5))
{
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp
index 58b5972c25c..634d54ed58b 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp
@@ -122,7 +122,7 @@ class boss_void_reaver : public CreatureScript
std::vector<Unit*> target_list;
for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
{
- target = Unit::GetUnit(*me, (*itr)->getUnitGuid());
+ target = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid());
if (!target)
continue;
// exclude pets & totems, 18 yard radius minimum
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp
index 7ea39f3faed..f8861d1fa7f 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp
@@ -163,7 +163,7 @@ class spell_capacitus_polarity_charge : public SpellScriptLoader
class spell_capacitus_polarity_charge_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_capacitus_polarity_charge_SpellScript)
+ PrepareSpellScript(spell_capacitus_polarity_charge_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -231,7 +231,7 @@ class spell_capacitus_polarity_shift : public SpellScriptLoader
class spell_capacitus_polarity_shift_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_capacitus_polarity_shift_SpellScript)
+ PrepareSpellScript(spell_capacitus_polarity_shift_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_commander_sarannis.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_commander_sarannis.cpp
index 4320dbc422f..7b831e82a75 100644
--- a/src/server/scripts/Outland/TempestKeep/botanica/boss_commander_sarannis.cpp
+++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_commander_sarannis.cpp
@@ -156,7 +156,7 @@ class spell_commander_sarannis_summon_reinforcements : public SpellScriptLoader
class spell_commander_sarannis_summon_reinforcements_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_commander_sarannis_summon_reinforcements_SpellScript)
+ PrepareSpellScript(spell_commander_sarannis_summon_reinforcements_SpellScript);
void HandleCast(SpellEffIndex /*effIndex*/)
{
diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp
index 53727db2f4b..2c15a6dd30d 100644
--- a/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp
+++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp
@@ -151,7 +151,7 @@ class boss_high_botanist_freywinn : public CreatureScript
{
for (std::list<uint64>::iterator itr = Adds_List.begin(); itr != Adds_List.end(); ++itr)
{
- if (Unit* temp = Unit::GetUnit(*me, *itr))
+ if (Unit* temp = ObjectAccessor::GetUnit(*me, *itr))
{
if (!temp->IsAlive())
{
diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp
index c9dd31cdc76..a1335290d5a 100644
--- a/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp
+++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp
@@ -97,7 +97,7 @@ class npc_warp_splinter_treant : public CreatureScript
{
if (WarpGuid && check_Timer <= diff)
{
- if (Unit* Warp = Unit::GetUnit(*me, WarpGuid))
+ if (Unit* Warp = ObjectAccessor::GetUnit(*me, WarpGuid))
{
if (me->IsWithinMeleeRange(Warp, 2.5f))
{
diff --git a/src/server/scripts/Outland/boss_doomlord_kazzak.cpp b/src/server/scripts/Outland/boss_doomlord_kazzak.cpp
index 3eeaf8ecafa..eea03aae343 100644
--- a/src/server/scripts/Outland/boss_doomlord_kazzak.cpp
+++ b/src/server/scripts/Outland/boss_doomlord_kazzak.cpp
@@ -182,7 +182,7 @@ class spell_mark_of_kazzak : public SpellScriptLoader
class spell_mark_of_kazzak_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_mark_of_kazzak_AuraScript)
+ PrepareAuraScript(spell_mark_of_kazzak_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override
{
diff --git a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp
index 2f60a4e9106..d21b92d3e92 100644
--- a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp
+++ b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp
@@ -1187,7 +1187,7 @@ class spell_oscillating_field : public SpellScriptLoader
class spell_oscillating_field_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_oscillating_field_SpellScript)
+ PrepareSpellScript(spell_oscillating_field_SpellScript);
void HandleEffect(SpellEffIndex /*effIndex*/)
{
diff --git a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp
index 7b9b2be4674..0da70207a04 100644
--- a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp
+++ b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp
@@ -318,7 +318,7 @@ public:
if (type != POINT_MOTION_TYPE || id != 1)
return;
- if (Creature* helboar = me->GetCreature(*me, helboarGUID))
+ if (Creature* helboar = ObjectAccessor::GetCreature(*me, helboarGUID))
{
helboar->RemoveCorpse();
DoCast(SPELL_SUMMON_POO);
diff --git a/src/server/scripts/Outland/zone_netherstorm.cpp b/src/server/scripts/Outland/zone_netherstorm.cpp
index 8fac7853f26..cb75ee3b2ad 100644
--- a/src/server/scripts/Outland/zone_netherstorm.cpp
+++ b/src/server/scripts/Outland/zone_netherstorm.cpp
@@ -243,7 +243,7 @@ public:
case 1:
if (someplayer)
{
- Unit* u = Unit::GetUnit(*me, someplayer);
+ Unit* u = ObjectAccessor::GetUnit(*me, someplayer);
if (u && u->GetTypeId() == TYPEID_PLAYER)
Talk(EMOTE_START, u);
}
@@ -795,7 +795,7 @@ public:
for (std::list<HostileReference*>::const_iterator itr = AggroList.begin(); itr != AggroList.end(); ++itr)
{
- if (Unit* unit = Unit::GetUnit(*me, (*itr)->getUnitGuid()))
+ if (Unit* unit = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid()))
{
if (unit->GetCreateMana() > 0)
UnitsWithMana.push_back(unit);
diff --git a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp
index c9ad9a6964d..ba20c7e020b 100644
--- a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp
+++ b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp
@@ -133,7 +133,7 @@ public:
{
if (bCanEat && !bIsEating)
{
- if (Unit* unit = Unit::GetUnit(*me, uiPlayerGUID))
+ if (Unit* unit = ObjectAccessor::GetUnit(*me, uiPlayerGUID))
{
if (GameObject* go = unit->FindNearestGameObject(GO_CARCASS, 10))
{
@@ -273,7 +273,7 @@ public:
{
if (PlayerGUID)
{
- Unit* player = Unit::GetUnit(*me, PlayerGUID);
+ Unit* player = ObjectAccessor::GetUnit(*me, PlayerGUID);
if (player)
DoCast(player, SPELL_FORCE_OF_NELTHARAKU, true);
@@ -1225,7 +1225,7 @@ public:
if (TorlothAnim[AnimationCount].creature == 1)
{
- creature = (Unit::GetCreature(*me, LordIllidanGUID));
+ creature = (ObjectAccessor::GetCreature(*me, LordIllidanGUID));
if (!creature)
return;
@@ -1326,7 +1326,7 @@ public:
break;
}
- if (Creature* LordIllidan = (Unit::GetCreature(*me, LordIllidanGUID)))
+ if (Creature* LordIllidan = (ObjectAccessor::GetCreature(*me, LordIllidanGUID)))
LordIllidan->AI()->EnterEvadeMode();
}
};
@@ -1507,7 +1507,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
me->RemoveCorpse();
- if (Creature* LordIllidan = (Unit::GetCreature(*me, LordIllidanGUID)))
+ if (Creature* LordIllidan = (ObjectAccessor::GetCreature(*me, LordIllidanGUID)))
if (LordIllidan)
CAST_AI(npc_lord_illidan_stormrage::npc_lord_illidan_stormrageAI, LordIllidan->AI())->LiveCounter();
}
@@ -1824,7 +1824,7 @@ class spell_unlocking_zuluheds_chains : public SpellScriptLoader
class spell_unlocking_zuluheds_chains_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_unlocking_zuluheds_chains_SpellScript)
+ PrepareSpellScript(spell_unlocking_zuluheds_chains_SpellScript);
void HandleAfterHit()
{
diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp
index 1637f588eef..6a6ee144aac 100644
--- a/src/server/scripts/Spells/spell_dk.cpp
+++ b/src/server/scripts/Spells/spell_dk.cpp
@@ -79,7 +79,7 @@ class spell_dk_anti_magic_shell_raid : public SpellScriptLoader
class spell_dk_anti_magic_shell_raid_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dk_anti_magic_shell_raid_AuraScript)
+ PrepareAuraScript(spell_dk_anti_magic_shell_raid_AuraScript);
uint32 absorbPct;
@@ -121,7 +121,7 @@ class spell_dk_anti_magic_shell_self : public SpellScriptLoader
class spell_dk_anti_magic_shell_self_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dk_anti_magic_shell_self_AuraScript)
+ PrepareAuraScript(spell_dk_anti_magic_shell_self_AuraScript);
uint32 absorbPct, hpPct;
bool Load() override
@@ -178,7 +178,7 @@ class spell_dk_anti_magic_zone : public SpellScriptLoader
class spell_dk_anti_magic_zone_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dk_anti_magic_zone_AuraScript)
+ PrepareAuraScript(spell_dk_anti_magic_zone_AuraScript);
uint32 absorbPct;
@@ -229,7 +229,7 @@ class spell_dk_blood_boil : public SpellScriptLoader
class spell_dk_blood_boil_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_dk_blood_boil_SpellScript)
+ PrepareSpellScript(spell_dk_blood_boil_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -275,7 +275,7 @@ class spell_dk_blood_gorged : public SpellScriptLoader
class spell_dk_blood_gorged_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dk_blood_gorged_AuraScript)
+ PrepareAuraScript(spell_dk_blood_gorged_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -349,7 +349,7 @@ class spell_dk_corpse_explosion : public SpellScriptLoader
class spell_dk_corpse_explosion_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_dk_corpse_explosion_SpellScript)
+ PrepareSpellScript(spell_dk_corpse_explosion_SpellScript);
bool Validate(SpellInfo const* spellInfo) override
{
@@ -448,7 +448,7 @@ class spell_dk_death_coil : public SpellScriptLoader
class spell_dk_death_coil_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_dk_death_coil_SpellScript)
+ PrepareSpellScript(spell_dk_death_coil_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -515,7 +515,7 @@ class spell_dk_death_gate : public SpellScriptLoader
class spell_dk_death_gate_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_dk_death_gate_SpellScript)
+ PrepareSpellScript(spell_dk_death_gate_SpellScript);
SpellCastResult CheckClass()
{
@@ -556,7 +556,7 @@ class spell_dk_death_grip : public SpellScriptLoader
class spell_dk_death_grip_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_dk_death_grip_SpellScript)
+ PrepareSpellScript(spell_dk_death_grip_SpellScript);
void HandleDummy(SpellEffIndex /*effIndex*/)
{
@@ -590,7 +590,7 @@ class spell_dk_death_pact : public SpellScriptLoader
class spell_dk_death_pact_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_dk_death_pact_SpellScript)
+ PrepareSpellScript(spell_dk_death_pact_SpellScript);
SpellCastResult CheckCast()
{
@@ -646,7 +646,7 @@ class spell_dk_death_strike : public SpellScriptLoader
class spell_dk_death_strike_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_dk_death_strike_SpellScript)
+ PrepareSpellScript(spell_dk_death_strike_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -690,7 +690,7 @@ class spell_dk_ghoul_explode : public SpellScriptLoader
class spell_dk_ghoul_explode_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_dk_ghoul_explode_SpellScript)
+ PrepareSpellScript(spell_dk_ghoul_explode_SpellScript);
bool Validate(SpellInfo const* spellInfo) override
{
@@ -738,7 +738,7 @@ class spell_dk_icebound_fortitude : public SpellScriptLoader
class spell_dk_icebound_fortitude_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dk_icebound_fortitude_AuraScript)
+ PrepareAuraScript(spell_dk_icebound_fortitude_AuraScript);
bool Load() override
{
@@ -787,7 +787,7 @@ class spell_dk_improved_blood_presence : public SpellScriptLoader
class spell_dk_improved_blood_presence_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dk_improved_blood_presence_AuraScript)
+ PrepareAuraScript(spell_dk_improved_blood_presence_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -834,7 +834,7 @@ class spell_dk_improved_frost_presence : public SpellScriptLoader
class spell_dk_improved_frost_presence_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dk_improved_frost_presence_AuraScript)
+ PrepareAuraScript(spell_dk_improved_frost_presence_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -881,7 +881,7 @@ class spell_dk_improved_unholy_presence : public SpellScriptLoader
class spell_dk_improved_unholy_presence_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dk_improved_unholy_presence_AuraScript)
+ PrepareAuraScript(spell_dk_improved_unholy_presence_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -941,7 +941,7 @@ class spell_dk_presence : public SpellScriptLoader
class spell_dk_presence_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dk_presence_AuraScript)
+ PrepareAuraScript(spell_dk_presence_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -1057,7 +1057,7 @@ class spell_dk_raise_dead : public SpellScriptLoader
class spell_dk_raise_dead_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_dk_raise_dead_SpellScript)
+ PrepareSpellScript(spell_dk_raise_dead_SpellScript);
bool Validate(SpellInfo const* spellInfo) override
{
@@ -1190,7 +1190,7 @@ class spell_dk_rune_tap_party : public SpellScriptLoader
class spell_dk_rune_tap_party_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_dk_rune_tap_party_SpellScript)
+ PrepareSpellScript(spell_dk_rune_tap_party_SpellScript);
void CheckTargets(std::list<WorldObject*>& targets)
{
@@ -1217,7 +1217,7 @@ class spell_dk_scent_of_blood : public SpellScriptLoader
class spell_dk_scent_of_blood_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dk_scent_of_blood_AuraScript)
+ PrepareAuraScript(spell_dk_scent_of_blood_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -1253,7 +1253,7 @@ class spell_dk_scourge_strike : public SpellScriptLoader
class spell_dk_scourge_strike_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_dk_scourge_strike_SpellScript)
+ PrepareSpellScript(spell_dk_scourge_strike_SpellScript);
float multiplier;
bool Load() override
@@ -1316,7 +1316,7 @@ class spell_dk_spell_deflection : public SpellScriptLoader
class spell_dk_spell_deflection_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dk_spell_deflection_AuraScript)
+ PrepareAuraScript(spell_dk_spell_deflection_AuraScript);
uint32 absorbPct;
@@ -1360,7 +1360,7 @@ class spell_dk_vampiric_blood : public SpellScriptLoader
class spell_dk_vampiric_blood_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dk_vampiric_blood_AuraScript)
+ PrepareAuraScript(spell_dk_vampiric_blood_AuraScript);
void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
{
@@ -1387,7 +1387,7 @@ class spell_dk_will_of_the_necropolis : public SpellScriptLoader
class spell_dk_will_of_the_necropolis_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dk_will_of_the_necropolis_AuraScript)
+ PrepareAuraScript(spell_dk_will_of_the_necropolis_AuraScript);
bool Validate(SpellInfo const* spellInfo) override
{
diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp
index e16b3113545..e466c15d417 100644
--- a/src/server/scripts/Spells/spell_druid.cpp
+++ b/src/server/scripts/Spells/spell_druid.cpp
@@ -54,7 +54,7 @@ class spell_dru_dash : public SpellScriptLoader
class spell_dru_dash_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dru_dash_AuraScript)
+ PrepareAuraScript(spell_dru_dash_AuraScript);
void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
{
@@ -83,7 +83,7 @@ class spell_dru_enrage : public SpellScriptLoader
class spell_dru_enrage_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_dru_enrage_SpellScript)
+ PrepareSpellScript(spell_dru_enrage_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -119,7 +119,7 @@ class spell_dru_glyph_of_starfire : public SpellScriptLoader
class spell_dru_glyph_of_starfire_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_dru_glyph_of_starfire_SpellScript)
+ PrepareSpellScript(spell_dru_glyph_of_starfire_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -172,7 +172,7 @@ class spell_dru_idol_lifebloom : public SpellScriptLoader
class spell_dru_idol_lifebloom_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dru_idol_lifebloom_AuraScript)
+ PrepareAuraScript(spell_dru_idol_lifebloom_AuraScript);
void HandleEffectCalcSpellMod(AuraEffect const* aurEff, SpellModifier*& spellMod)
{
@@ -207,7 +207,7 @@ class spell_dru_innervate : public SpellScriptLoader
class spell_dru_innervate_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dru_innervate_AuraScript)
+ PrepareAuraScript(spell_dru_innervate_AuraScript);
void CalculateAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
{
@@ -234,7 +234,7 @@ class spell_dru_insect_swarm : public SpellScriptLoader
class spell_dru_insect_swarm_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dru_insect_swarm_AuraScript)
+ PrepareAuraScript(spell_dru_insect_swarm_AuraScript);
void CalculateAmount(AuraEffect const* aurEff, int32 & amount, bool & /*canBeRecalculated*/)
{
@@ -263,7 +263,7 @@ class spell_dru_lifebloom : public SpellScriptLoader
class spell_dru_lifebloom_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dru_lifebloom_AuraScript)
+ PrepareAuraScript(spell_dru_lifebloom_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -345,7 +345,7 @@ class spell_dru_living_seed : public SpellScriptLoader
class spell_dru_living_seed_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dru_living_seed_AuraScript)
+ PrepareAuraScript(spell_dru_living_seed_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -381,7 +381,7 @@ class spell_dru_living_seed_proc : public SpellScriptLoader
class spell_dru_living_seed_proc_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dru_living_seed_proc_AuraScript)
+ PrepareAuraScript(spell_dru_living_seed_proc_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -416,7 +416,7 @@ class spell_dru_moonkin_form_passive : public SpellScriptLoader
class spell_dru_moonkin_form_passive_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dru_moonkin_form_passive_AuraScript)
+ PrepareAuraScript(spell_dru_moonkin_form_passive_AuraScript);
uint32 absorbPct;
@@ -460,7 +460,7 @@ class spell_dru_owlkin_frenzy : public SpellScriptLoader
class spell_dru_owlkin_frenzy_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dru_owlkin_frenzy_AuraScript)
+ PrepareAuraScript(spell_dru_owlkin_frenzy_AuraScript);
void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
{
@@ -487,7 +487,7 @@ class spell_dru_predatory_strikes : public SpellScriptLoader
class spell_dru_predatory_strikes_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dru_predatory_strikes_AuraScript)
+ PrepareAuraScript(spell_dru_predatory_strikes_AuraScript);
void UpdateAmount(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -516,7 +516,7 @@ class spell_dru_primal_tenacity : public SpellScriptLoader
class spell_dru_primal_tenacity_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dru_primal_tenacity_AuraScript)
+ PrepareAuraScript(spell_dru_primal_tenacity_AuraScript);
uint32 absorbPct;
@@ -560,7 +560,7 @@ class spell_dru_rip : public SpellScriptLoader
class spell_dru_rip_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dru_rip_AuraScript)
+ PrepareAuraScript(spell_dru_rip_AuraScript);
bool Load() override
{
@@ -608,7 +608,7 @@ class spell_dru_savage_defense : public SpellScriptLoader
class spell_dru_savage_defense_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dru_savage_defense_AuraScript)
+ PrepareAuraScript(spell_dru_savage_defense_AuraScript);
uint32 absorbPct;
@@ -651,7 +651,7 @@ class spell_dru_savage_roar : public SpellScriptLoader
class spell_dru_savage_roar_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_dru_savage_roar_SpellScript)
+ PrepareSpellScript(spell_dru_savage_roar_SpellScript);
SpellCastResult CheckCast()
{
@@ -670,7 +670,7 @@ class spell_dru_savage_roar : public SpellScriptLoader
class spell_dru_savage_roar_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dru_savage_roar_AuraScript)
+ PrepareAuraScript(spell_dru_savage_roar_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -716,7 +716,7 @@ class spell_dru_starfall_aoe : public SpellScriptLoader
class spell_dru_starfall_aoe_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_dru_starfall_aoe_SpellScript)
+ PrepareSpellScript(spell_dru_starfall_aoe_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets)
{
@@ -743,7 +743,7 @@ class spell_dru_starfall_dummy : public SpellScriptLoader
class spell_dru_starfall_dummy_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_dru_starfall_dummy_SpellScript)
+ PrepareSpellScript(spell_dru_starfall_dummy_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets)
{
@@ -789,7 +789,7 @@ class spell_dru_survival_instincts : public SpellScriptLoader
class spell_dru_survival_instincts_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_dru_survival_instincts_SpellScript)
+ PrepareSpellScript(spell_dru_survival_instincts_SpellScript);
SpellCastResult CheckCast()
{
@@ -808,7 +808,7 @@ class spell_dru_survival_instincts : public SpellScriptLoader
class spell_dru_survival_instincts_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dru_survival_instincts_AuraScript)
+ PrepareAuraScript(spell_dru_survival_instincts_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -855,7 +855,7 @@ class spell_dru_swift_flight_passive : public SpellScriptLoader
class spell_dru_swift_flight_passive_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dru_swift_flight_passive_AuraScript)
+ PrepareAuraScript(spell_dru_swift_flight_passive_AuraScript);
bool Load() override
{
@@ -889,7 +889,7 @@ class spell_dru_tiger_s_fury : public SpellScriptLoader
class spell_dru_tiger_s_fury_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_dru_tiger_s_fury_SpellScript)
+ PrepareSpellScript(spell_dru_tiger_s_fury_SpellScript);
void OnHit()
{
@@ -917,7 +917,7 @@ class spell_dru_typhoon : public SpellScriptLoader
class spell_dru_typhoon_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_dru_typhoon_SpellScript)
+ PrepareSpellScript(spell_dru_typhoon_SpellScript);
void HandleKnockBack(SpellEffIndex effIndex)
{
@@ -946,7 +946,7 @@ class spell_dru_t10_restoration_4p_bonus : public SpellScriptLoader
class spell_dru_t10_restoration_4p_bonus_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_dru_t10_restoration_4p_bonus_SpellScript)
+ PrepareSpellScript(spell_dru_t10_restoration_4p_bonus_SpellScript);
bool Load() override
{
@@ -1018,7 +1018,7 @@ class spell_dru_wild_growth : public SpellScriptLoader
class spell_dru_wild_growth_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_dru_wild_growth_SpellScript)
+ PrepareSpellScript(spell_dru_wild_growth_SpellScript);
bool Validate(SpellInfo const* spellInfo) override
{
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index 5c90109998e..4c72d790059 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -45,7 +45,7 @@ class spell_gen_absorb0_hitlimit1 : public SpellScriptLoader
class spell_gen_absorb0_hitlimit1_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_gen_absorb0_hitlimit1_AuraScript)
+ PrepareAuraScript(spell_gen_absorb0_hitlimit1_AuraScript);
uint32 limit;
@@ -90,7 +90,7 @@ class spell_gen_adaptive_warding : public SpellScriptLoader
class spell_gen_adaptive_warding_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_gen_adaptive_warding_AuraScript)
+ PrepareAuraScript(spell_gen_adaptive_warding_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -171,7 +171,7 @@ class spell_gen_allow_cast_from_item_only : public SpellScriptLoader
class spell_gen_allow_cast_from_item_only_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_allow_cast_from_item_only_SpellScript)
+ PrepareSpellScript(spell_gen_allow_cast_from_item_only_SpellScript);
SpellCastResult CheckRequirement()
{
@@ -205,7 +205,7 @@ class spell_gen_animal_blood : public SpellScriptLoader
class spell_gen_animal_blood_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_gen_animal_blood_AuraScript)
+ PrepareAuraScript(spell_gen_animal_blood_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -249,7 +249,7 @@ class spell_gen_aura_of_anger : public SpellScriptLoader
class spell_gen_aura_of_anger_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_gen_aura_of_anger_AuraScript)
+ PrepareAuraScript(spell_gen_aura_of_anger_AuraScript);
void HandleEffectPeriodicUpdate(AuraEffect* aurEff)
{
@@ -287,7 +287,7 @@ class spell_gen_aura_service_uniform : public SpellScriptLoader
class spell_gen_aura_service_uniform_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_gen_aura_service_uniform_AuraScript)
+ PrepareAuraScript(spell_gen_aura_service_uniform_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -336,7 +336,7 @@ class spell_gen_av_drekthar_presence : public SpellScriptLoader
class spell_gen_av_drekthar_presence_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_gen_av_drekthar_presence_AuraScript)
+ PrepareAuraScript(spell_gen_av_drekthar_presence_AuraScript);
bool CheckAreaTarget(Unit* target)
{
@@ -384,7 +384,7 @@ class spell_gen_bandage : public SpellScriptLoader
class spell_gen_bandage_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_bandage_SpellScript)
+ PrepareSpellScript(spell_gen_bandage_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -436,7 +436,7 @@ class spell_gen_bonked : public SpellScriptLoader
class spell_gen_bonked_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_bonked_SpellScript)
+ PrepareSpellScript(spell_gen_bonked_SpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
@@ -509,7 +509,7 @@ class spell_gen_break_shield: public SpellScriptLoader
class spell_gen_break_shield_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_break_shield_SpellScript)
+ PrepareSpellScript(spell_gen_break_shield_SpellScript);
void HandleScriptEffect(SpellEffIndex effIndex)
{
@@ -586,7 +586,7 @@ class spell_gen_burn_brutallus : public SpellScriptLoader
class spell_gen_burn_brutallus_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_gen_burn_brutallus_AuraScript)
+ PrepareAuraScript(spell_gen_burn_brutallus_AuraScript);
void HandleEffectPeriodicUpdate(AuraEffect* aurEff)
{
@@ -618,7 +618,7 @@ class spell_gen_cannibalize : public SpellScriptLoader
class spell_gen_cannibalize_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_cannibalize_SpellScript)
+ PrepareSpellScript(spell_gen_cannibalize_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -671,7 +671,7 @@ class spell_gen_chaos_blast : public SpellScriptLoader
class spell_gen_chaos_blast_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_chaos_blast_SpellScript)
+ PrepareSpellScript(spell_gen_chaos_blast_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -706,7 +706,7 @@ class spell_gen_clone : public SpellScriptLoader
class spell_gen_clone_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_clone_SpellScript)
+ PrepareSpellScript(spell_gen_clone_SpellScript);
void HandleScriptEffect(SpellEffIndex effIndex)
{
@@ -746,7 +746,7 @@ class spell_gen_clone_weapon : public SpellScriptLoader
class spell_gen_clone_weapon_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_clone_weapon_SpellScript)
+ PrepareSpellScript(spell_gen_clone_weapon_SpellScript);
void HandleScriptEffect(SpellEffIndex effIndex)
{
@@ -773,7 +773,7 @@ class spell_gen_clone_weapon_aura : public SpellScriptLoader
class spell_gen_clone_weapon_auraScript : public AuraScript
{
- PrepareAuraScript(spell_gen_clone_weapon_auraScript)
+ PrepareAuraScript(spell_gen_clone_weapon_auraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -895,7 +895,7 @@ class spell_gen_count_pct_from_max_hp : public SpellScriptLoader
class spell_gen_count_pct_from_max_hp_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_count_pct_from_max_hp_SpellScript)
+ PrepareSpellScript(spell_gen_count_pct_from_max_hp_SpellScript);
public:
spell_gen_count_pct_from_max_hp_SpellScript(int32 damagePct) : SpellScript(), _damagePct(damagePct) { }
@@ -940,7 +940,7 @@ class spell_gen_create_lance : public SpellScriptLoader
class spell_gen_create_lance_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_create_lance_SpellScript)
+ PrepareSpellScript(spell_gen_create_lance_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -982,7 +982,7 @@ class spell_gen_creature_permanent_feign_death : public SpellScriptLoader
class spell_gen_creature_permanent_feign_death_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_gen_creature_permanent_feign_death_AuraScript)
+ PrepareAuraScript(spell_gen_creature_permanent_feign_death_AuraScript);
void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -1024,7 +1024,7 @@ class spell_gen_dalaran_disguise : public SpellScriptLoader
class spell_gen_dalaran_disguise_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_dalaran_disguise_SpellScript)
+ PrepareSpellScript(spell_gen_dalaran_disguise_SpellScript);
bool Validate(SpellInfo const* spellInfo) override
{
@@ -1096,7 +1096,7 @@ class spell_gen_damage_reduction_aura : public SpellScriptLoader
class spell_gen_damage_reduction_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_gen_damage_reduction_AuraScript)
+ PrepareAuraScript(spell_gen_damage_reduction_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -1151,7 +1151,7 @@ class spell_gen_defend : public SpellScriptLoader
class spell_gen_defend_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_gen_defend_AuraScript)
+ PrepareAuraScript(spell_gen_defend_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -1230,7 +1230,7 @@ class spell_gen_despawn_self : public SpellScriptLoader
class spell_gen_despawn_self_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_despawn_self_SpellScript)
+ PrepareSpellScript(spell_gen_despawn_self_SpellScript);
bool Load() override
{
@@ -1268,7 +1268,7 @@ class spell_gen_divine_storm_cd_reset : public SpellScriptLoader
class spell_gen_divine_storm_cd_reset_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_divine_storm_cd_reset_SpellScript)
+ PrepareSpellScript(spell_gen_divine_storm_cd_reset_SpellScript);
bool Load() override
{
@@ -1308,7 +1308,7 @@ class spell_gen_ds_flush_knockback : public SpellScriptLoader
class spell_gen_ds_flush_knockback_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_ds_flush_knockback_SpellScript)
+ PrepareSpellScript(spell_gen_ds_flush_knockback_SpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
@@ -1351,7 +1351,7 @@ class spell_gen_dummy_trigger : public SpellScriptLoader
class spell_gen_dummy_trigger_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_dummy_trigger_SpellScript)
+ PrepareSpellScript(spell_gen_dummy_trigger_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -1390,7 +1390,7 @@ class spell_gen_dungeon_credit : public SpellScriptLoader
class spell_gen_dungeon_credit_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_dungeon_credit_SpellScript)
+ PrepareSpellScript(spell_gen_dungeon_credit_SpellScript);
bool Load() override
{
@@ -1445,7 +1445,7 @@ class spell_gen_elune_candle : public SpellScriptLoader
class spell_gen_elune_candle_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_elune_candle_SpellScript)
+ PrepareSpellScript(spell_gen_elune_candle_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -1512,7 +1512,7 @@ class spell_gen_gadgetzan_transporter_backfire : public SpellScriptLoader
class spell_gen_gadgetzan_transporter_backfire_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_gadgetzan_transporter_backfire_SpellScript)
+ PrepareSpellScript(spell_gen_gadgetzan_transporter_backfire_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -1555,7 +1555,7 @@ class spell_gen_gift_of_naaru : public SpellScriptLoader
class spell_gen_gift_of_naaru_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_gen_gift_of_naaru_AuraScript)
+ PrepareAuraScript(spell_gen_gift_of_naaru_AuraScript);
void CalculateAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
{
@@ -1613,7 +1613,7 @@ class spell_gen_gnomish_transporter : public SpellScriptLoader
class spell_gen_gnomish_transporter_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_gnomish_transporter_SpellScript)
+ PrepareSpellScript(spell_gen_gnomish_transporter_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -1647,7 +1647,7 @@ class spell_gen_gunship_portal : public SpellScriptLoader
class spell_gen_gunship_portal_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_gunship_portal_SpellScript)
+ PrepareSpellScript(spell_gen_gunship_portal_SpellScript);
bool Load() override
{
@@ -1686,7 +1686,7 @@ class spell_gen_launch : public SpellScriptLoader
class spell_gen_launch_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_launch_SpellScript)
+ PrepareSpellScript(spell_gen_launch_SpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
@@ -1734,7 +1734,7 @@ class spell_gen_lifeblood : public SpellScriptLoader
class spell_gen_lifeblood_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_gen_lifeblood_AuraScript)
+ PrepareAuraScript(spell_gen_lifeblood_AuraScript);
void CalculateAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
{
@@ -1770,7 +1770,7 @@ class spell_gen_lifebloom : public SpellScriptLoader
class spell_gen_lifebloom_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_gen_lifebloom_AuraScript)
+ PrepareAuraScript(spell_gen_lifebloom_AuraScript);
public:
spell_gen_lifebloom_AuraScript(uint32 spellId) : AuraScript(), _spellId(spellId) { }
@@ -1824,7 +1824,7 @@ class spell_gen_magic_rooster : public SpellScriptLoader
class spell_gen_magic_rooster_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_magic_rooster_SpellScript)
+ PrepareSpellScript(spell_gen_magic_rooster_SpellScript);
void HandleScript(SpellEffIndex effIndex)
{
@@ -1923,7 +1923,7 @@ class spell_gen_mount : public SpellScriptLoader
class spell_gen_mount_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_mount_SpellScript)
+ PrepareSpellScript(spell_gen_mount_SpellScript);
public:
spell_gen_mount_SpellScript(uint32 mount0, uint32 mount60, uint32 mount100, uint32 mount150, uint32 mount280, uint32 mount310) : SpellScript(),
@@ -2094,7 +2094,7 @@ class spell_gen_mounted_charge: public SpellScriptLoader
class spell_gen_mounted_charge_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_mounted_charge_SpellScript)
+ PrepareSpellScript(spell_gen_mounted_charge_SpellScript);
void HandleScriptEffect(SpellEffIndex effIndex)
{
@@ -2211,7 +2211,7 @@ class spell_gen_netherbloom : public SpellScriptLoader
class spell_gen_netherbloom_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_netherbloom_SpellScript)
+ PrepareSpellScript(spell_gen_netherbloom_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -2269,7 +2269,7 @@ class spell_gen_nightmare_vine : public SpellScriptLoader
class spell_gen_nightmare_vine_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_nightmare_vine_SpellScript)
+ PrepareSpellScript(spell_gen_nightmare_vine_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -2320,7 +2320,7 @@ class spell_gen_obsidian_armor : public SpellScriptLoader
class spell_gen_obsidian_armor_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_gen_obsidian_armor_AuraScript)
+ PrepareAuraScript(spell_gen_obsidian_armor_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -2491,7 +2491,7 @@ class spell_gen_on_tournament_mount : public SpellScriptLoader
class spell_gen_on_tournament_mount_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_gen_on_tournament_mount_AuraScript)
+ PrepareAuraScript(spell_gen_on_tournament_mount_AuraScript);
uint32 _pennantSpellId;
@@ -2649,7 +2649,7 @@ class spell_gen_oracle_wolvar_reputation : public SpellScriptLoader
class spell_gen_oracle_wolvar_reputation_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_oracle_wolvar_reputation_SpellScript)
+ PrepareSpellScript(spell_gen_oracle_wolvar_reputation_SpellScript);
bool Load() override
{
@@ -2701,7 +2701,7 @@ class spell_gen_orc_disguise : public SpellScriptLoader
class spell_gen_orc_disguise_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_orc_disguise_SpellScript)
+ PrepareSpellScript(spell_gen_orc_disguise_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -2751,7 +2751,7 @@ class spell_gen_parachute : public SpellScriptLoader
class spell_gen_parachute_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_gen_parachute_AuraScript)
+ PrepareAuraScript(spell_gen_parachute_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -2795,7 +2795,7 @@ class spell_gen_parachute_ic : public SpellScriptLoader
class spell_gen_parachute_ic_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_gen_parachute_ic_AuraScript)
+ PrepareAuraScript(spell_gen_parachute_ic_AuraScript);
void HandleTriggerSpell(AuraEffect const* /*aurEff*/)
{
@@ -2830,7 +2830,7 @@ class spell_gen_pet_summoned : public SpellScriptLoader
class spell_gen_pet_summoned_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_pet_summoned_SpellScript)
+ PrepareSpellScript(spell_gen_pet_summoned_SpellScript);
bool Load() override
{
@@ -2843,7 +2843,7 @@ class spell_gen_pet_summoned : public SpellScriptLoader
if (player->GetLastPetNumber())
{
PetType newPetType = (player->getClass() == CLASS_HUNTER) ? HUNTER_PET : SUMMON_PET;
- auto newPet = new Pet(player, newPetType);
+ Pet* newPet = new Pet(player, newPetType);
if (newPet->LoadPetFromDB(player, 0, player->GetLastPetNumber(), true))
{
// revive the pet if it is dead
@@ -2887,7 +2887,7 @@ class spell_gen_profession_research : public SpellScriptLoader
class spell_gen_profession_research_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_profession_research_SpellScript)
+ PrepareSpellScript(spell_gen_profession_research_SpellScript);
bool Load() override
{
@@ -2937,7 +2937,7 @@ class spell_gen_remove_flight_auras : public SpellScriptLoader
class spell_gen_remove_flight_auras_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_remove_flight_auras_SpellScript)
+ PrepareSpellScript(spell_gen_remove_flight_auras_SpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
@@ -2985,7 +2985,7 @@ class spell_gen_replenishment : public SpellScriptLoader
class spell_gen_replenishment_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_replenishment_SpellScript)
+ PrepareSpellScript(spell_gen_replenishment_SpellScript);
void RemoveInvalidTargets(std::list<WorldObject*>& targets)
{
@@ -3024,7 +3024,7 @@ class spell_gen_replenishment : public SpellScriptLoader
class spell_gen_replenishment_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_gen_replenishment_AuraScript)
+ PrepareAuraScript(spell_gen_replenishment_AuraScript);
bool Load() override
{
@@ -3070,7 +3070,7 @@ class spell_gen_seaforium_blast : public SpellScriptLoader
class spell_gen_seaforium_blast_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_seaforium_blast_SpellScript)
+ PrepareSpellScript(spell_gen_seaforium_blast_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -3122,7 +3122,7 @@ class spell_gen_spectator_cheer_trigger : public SpellScriptLoader
class spell_gen_spectator_cheer_trigger_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_spectator_cheer_trigger_SpellScript)
+ PrepareSpellScript(spell_gen_spectator_cheer_trigger_SpellScript);
void HandleDummy(SpellEffIndex /*effIndex*/)
{
@@ -3148,7 +3148,7 @@ class spell_gen_spirit_healer_res : public SpellScriptLoader
class spell_gen_spirit_healer_res_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_spirit_healer_res_SpellScript)
+ PrepareSpellScript(spell_gen_spirit_healer_res_SpellScript);
bool Load() override
{
@@ -3191,7 +3191,7 @@ class spell_gen_summon_elemental : public SpellScriptLoader
class spell_gen_summon_elemental_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_gen_summon_elemental_AuraScript)
+ PrepareAuraScript(spell_gen_summon_elemental_AuraScript);
public:
spell_gen_summon_elemental_AuraScript(uint32 spellId) : AuraScript(), _spellId(spellId) { }
@@ -3249,7 +3249,7 @@ class spell_gen_summon_tournament_mount : public SpellScriptLoader
class spell_gen_summon_tournament_mount_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_summon_tournament_mount_SpellScript)
+ PrepareSpellScript(spell_gen_summon_tournament_mount_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -3292,7 +3292,7 @@ class spell_gen_throw_shield : public SpellScriptLoader
class spell_gen_throw_shield_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_throw_shield_SpellScript)
+ PrepareSpellScript(spell_gen_throw_shield_SpellScript);
void HandleScriptEffect(SpellEffIndex effIndex)
{
@@ -3325,7 +3325,7 @@ class spell_gen_tournament_duel : public SpellScriptLoader
class spell_gen_tournament_duel_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_tournament_duel_SpellScript)
+ PrepareSpellScript(spell_gen_tournament_duel_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -3371,7 +3371,7 @@ class spell_gen_tournament_pennant : public SpellScriptLoader
class spell_gen_tournament_pennant_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_gen_tournament_pennant_AuraScript)
+ PrepareAuraScript(spell_gen_tournament_pennant_AuraScript);
bool Load() override
{
@@ -3412,7 +3412,7 @@ class spell_pvp_trinket_wotf_shared_cd : public SpellScriptLoader
class spell_pvp_trinket_wotf_shared_cd_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_pvp_trinket_wotf_shared_cd_SpellScript)
+ PrepareSpellScript(spell_pvp_trinket_wotf_shared_cd_SpellScript);
bool Load() override
{
@@ -3458,7 +3458,7 @@ class spell_gen_turkey_marker : public SpellScriptLoader
class spell_gen_turkey_marker_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_gen_turkey_marker_AuraScript)
+ PrepareAuraScript(spell_gen_turkey_marker_AuraScript);
void OnApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
{
@@ -3512,7 +3512,7 @@ class spell_gen_upper_deck_create_foam_sword : public SpellScriptLoader
class spell_gen_upper_deck_create_foam_sword_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_upper_deck_create_foam_sword_SpellScript)
+ PrepareSpellScript(spell_gen_upper_deck_create_foam_sword_SpellScript);
void HandleScript(SpellEffIndex effIndex)
{
@@ -3554,7 +3554,7 @@ class spell_gen_vehicle_scaling : public SpellScriptLoader
class spell_gen_vehicle_scaling_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_gen_vehicle_scaling_AuraScript)
+ PrepareAuraScript(spell_gen_vehicle_scaling_AuraScript);
bool Load() override
{
@@ -3614,7 +3614,7 @@ class spell_gen_vendor_bark_trigger : public SpellScriptLoader
class spell_gen_vendor_bark_trigger_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_vendor_bark_trigger_SpellScript)
+ PrepareSpellScript(spell_gen_vendor_bark_trigger_SpellScript);
void HandleDummy(SpellEffIndex /* effIndex */)
{
@@ -3643,7 +3643,7 @@ class spell_gen_wg_water : public SpellScriptLoader
class spell_gen_wg_water_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_wg_water_SpellScript)
+ PrepareSpellScript(spell_gen_wg_water_SpellScript);
SpellCastResult CheckCast()
{
@@ -3676,7 +3676,7 @@ class spell_gen_whisper_gulch_yogg_saron_whisper : public SpellScriptLoader
class spell_gen_whisper_gulch_yogg_saron_whisper_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_gen_whisper_gulch_yogg_saron_whisper_AuraScript)
+ PrepareAuraScript(spell_gen_whisper_gulch_yogg_saron_whisper_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -3710,7 +3710,7 @@ class spell_gen_eject_all_passengers : public SpellScriptLoader
class spell_gen_eject_all_passengers_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_gen_eject_all_passengers_SpellScript)
+ PrepareSpellScript(spell_gen_eject_all_passengers_SpellScript);
void RemoveVehicleAuras()
{
diff --git a/src/server/scripts/Spells/spell_holiday.cpp b/src/server/scripts/Spells/spell_holiday.cpp
index 08984fd86d4..85bf85fa2d2 100644
--- a/src/server/scripts/Spells/spell_holiday.cpp
+++ b/src/server/scripts/Spells/spell_holiday.cpp
@@ -48,7 +48,7 @@ class spell_love_is_in_the_air_romantic_picnic : public SpellScriptLoader
class spell_love_is_in_the_air_romantic_picnic_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_love_is_in_the_air_romantic_picnic_AuraScript)
+ PrepareAuraScript(spell_love_is_in_the_air_romantic_picnic_AuraScript);
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -134,7 +134,7 @@ class spell_hallow_end_trick : public SpellScriptLoader
class spell_hallow_end_trick_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_hallow_end_trick_SpellScript)
+ PrepareSpellScript(spell_hallow_end_trick_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -207,7 +207,7 @@ class spell_hallow_end_trick_or_treat : public SpellScriptLoader
class spell_hallow_end_trick_or_treat_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_hallow_end_trick_or_treat_SpellScript)
+ PrepareSpellScript(spell_hallow_end_trick_or_treat_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -245,7 +245,7 @@ class spell_hallow_end_tricky_treat : public SpellScriptLoader
class spell_hallow_end_tricky_treat_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_hallow_end_tricky_treat_SpellScript)
+ PrepareSpellScript(spell_hallow_end_tricky_treat_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -296,7 +296,7 @@ class spell_pilgrims_bounty_buff_food : public SpellScriptLoader
class spell_pilgrims_bounty_buff_food_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_pilgrims_bounty_buff_food_AuraScript)
+ PrepareAuraScript(spell_pilgrims_bounty_buff_food_AuraScript);
private:
uint32 const _triggeredSpellId;
@@ -347,7 +347,7 @@ class spell_winter_veil_mistletoe : public SpellScriptLoader
class spell_winter_veil_mistletoe_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_winter_veil_mistletoe_SpellScript)
+ PrepareSpellScript(spell_winter_veil_mistletoe_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -395,7 +395,7 @@ class spell_winter_veil_px_238_winter_wondervolt : public SpellScriptLoader
class spell_winter_veil_px_238_winter_wondervolt_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_winter_veil_px_238_winter_wondervolt_SpellScript)
+ PrepareSpellScript(spell_winter_veil_px_238_winter_wondervolt_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp
index eaefe3f8631..725312eafce 100644
--- a/src/server/scripts/Spells/spell_hunter.cpp
+++ b/src/server/scripts/Spells/spell_hunter.cpp
@@ -65,7 +65,7 @@ class spell_hun_aspect_of_the_beast : public SpellScriptLoader
class spell_hun_aspect_of_the_beast_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_hun_aspect_of_the_beast_AuraScript)
+ PrepareAuraScript(spell_hun_aspect_of_the_beast_AuraScript);
bool Load() override
{
@@ -114,7 +114,7 @@ class spell_hun_ascpect_of_the_viper : public SpellScriptLoader
class spell_hun_ascpect_of_the_viper_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_hun_ascpect_of_the_viper_AuraScript)
+ PrepareAuraScript(spell_hun_ascpect_of_the_viper_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -175,7 +175,7 @@ class spell_hun_chimera_shot : public SpellScriptLoader
class spell_hun_chimera_shot_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_hun_chimera_shot_SpellScript)
+ PrepareSpellScript(spell_hun_chimera_shot_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -268,7 +268,7 @@ class spell_hun_disengage : public SpellScriptLoader
class spell_hun_disengage_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_hun_disengage_SpellScript)
+ PrepareSpellScript(spell_hun_disengage_SpellScript);
SpellCastResult CheckCast()
{
@@ -299,7 +299,7 @@ class spell_hun_improved_mend_pet : public SpellScriptLoader
class spell_hun_improved_mend_pet_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_hun_improved_mend_pet_AuraScript)
+ PrepareAuraScript(spell_hun_improved_mend_pet_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -339,7 +339,7 @@ class spell_hun_invigoration : public SpellScriptLoader
class spell_hun_invigoration_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_hun_invigoration_SpellScript)
+ PrepareSpellScript(spell_hun_invigoration_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -376,7 +376,7 @@ class spell_hun_last_stand_pet : public SpellScriptLoader
class spell_hun_last_stand_pet_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_hun_last_stand_pet_SpellScript)
+ PrepareSpellScript(spell_hun_last_stand_pet_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -412,7 +412,7 @@ class spell_hun_masters_call : public SpellScriptLoader
class spell_hun_masters_call_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_hun_masters_call_SpellScript)
+ PrepareSpellScript(spell_hun_masters_call_SpellScript);
bool Validate(SpellInfo const* spellInfo) override
{
@@ -464,7 +464,7 @@ class spell_hun_misdirection : public SpellScriptLoader
class spell_hun_misdirection_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_hun_misdirection_AuraScript)
+ PrepareAuraScript(spell_hun_misdirection_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -512,7 +512,7 @@ class spell_hun_misdirection_proc : public SpellScriptLoader
class spell_hun_misdirection_proc_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_hun_misdirection_proc_AuraScript)
+ PrepareAuraScript(spell_hun_misdirection_proc_AuraScript);
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -539,7 +539,7 @@ class spell_hun_pet_carrion_feeder : public SpellScriptLoader
class spell_hun_pet_carrion_feeder_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_hun_pet_carrion_feeder_SpellScript)
+ PrepareSpellScript(spell_hun_pet_carrion_feeder_SpellScript);
bool Load() override
{
@@ -596,7 +596,7 @@ class spell_hun_pet_heart_of_the_phoenix : public SpellScriptLoader
class spell_hun_pet_heart_of_the_phoenix_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_hun_pet_heart_of_the_phoenix_SpellScript)
+ PrepareSpellScript(spell_hun_pet_heart_of_the_phoenix_SpellScript);
bool Load() override
{
@@ -643,7 +643,7 @@ class spell_hun_readiness : public SpellScriptLoader
class spell_hun_readiness_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_hun_readiness_SpellScript)
+ PrepareSpellScript(spell_hun_readiness_SpellScript);
bool Load() override
{
@@ -692,7 +692,7 @@ class spell_hun_scatter_shot : public SpellScriptLoader
class spell_hun_scatter_shot_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_hun_scatter_shot_SpellScript)
+ PrepareSpellScript(spell_hun_scatter_shot_SpellScript);
bool Load() override
{
@@ -728,7 +728,7 @@ class spell_hun_sniper_training : public SpellScriptLoader
class spell_hun_sniper_training_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_hun_sniper_training_AuraScript)
+ PrepareAuraScript(spell_hun_sniper_training_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -744,8 +744,13 @@ class spell_hun_sniper_training : public SpellScriptLoader
{
Unit* target = GetTarget();
uint32 spellId = SPELL_HUNTER_SNIPER_TRAINING_BUFF_R1 + GetId() - SPELL_HUNTER_SNIPER_TRAINING_R1;
- if (!target->HasAura(spellId))
- target->CastSpell(target, spellId, true, 0, aurEff);
+ target->CastSpell(target, spellId, true, 0, aurEff);
+ if (Player* playerTarget = GetUnitOwner()->ToPlayer())
+ {
+ int32 baseAmount = aurEff->GetBaseAmount();
+ int32 amount = playerTarget->CalculateSpellDamage(playerTarget, GetSpellInfo(), aurEff->GetEffIndex(), &baseAmount);
+ GetEffect(EFFECT_0)->SetAmount(amount);
+ }
}
}
@@ -782,7 +787,7 @@ class spell_hun_tame_beast : public SpellScriptLoader
class spell_hun_tame_beast_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_hun_tame_beast_SpellScript)
+ PrepareSpellScript(spell_hun_tame_beast_SpellScript);
SpellCastResult CheckCast()
{
@@ -835,7 +840,7 @@ class spell_hun_target_only_pet_and_owner : public SpellScriptLoader
class spell_hun_target_only_pet_and_owner_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_hun_target_only_pet_and_owner_SpellScript)
+ PrepareSpellScript(spell_hun_target_only_pet_and_owner_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets)
{
@@ -866,7 +871,7 @@ class spell_hun_viper_attack_speed : public SpellScriptLoader
class spell_hun_viper_attack_speed_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_hun_viper_attack_speed_AuraScript)
+ PrepareAuraScript(spell_hun_viper_attack_speed_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp
index 41e0dcbebca..a17d7dce2ea 100644
--- a/src/server/scripts/Spells/spell_item.cpp
+++ b/src/server/scripts/Spells/spell_item.cpp
@@ -40,7 +40,7 @@ class spell_item_trigger_spell : public SpellScriptLoader
class spell_item_trigger_spell_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_trigger_spell_SpellScript)
+ PrepareSpellScript(spell_item_trigger_spell_SpellScript);
private:
uint32 _triggeredSpellId;
@@ -86,7 +86,7 @@ class spell_item_aegis_of_preservation : public SpellScriptLoader
class spell_item_aegis_of_preservation_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_item_aegis_of_preservation_AuraScript)
+ PrepareAuraScript(spell_item_aegis_of_preservation_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -121,7 +121,7 @@ class spell_item_arcane_shroud : public SpellScriptLoader
class spell_item_arcane_shroud_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_item_arcane_shroud_AuraScript)
+ PrepareAuraScript(spell_item_arcane_shroud_AuraScript);
void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
{
@@ -155,7 +155,7 @@ class spell_item_blessing_of_ancient_kings : public SpellScriptLoader
class spell_item_blessing_of_ancient_kings_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_item_blessing_of_ancient_kings_AuraScript)
+ PrepareAuraScript(spell_item_blessing_of_ancient_kings_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -215,7 +215,7 @@ class spell_item_defibrillate : public SpellScriptLoader
class spell_item_defibrillate_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_defibrillate_SpellScript)
+ PrepareSpellScript(spell_item_defibrillate_SpellScript);
public:
spell_item_defibrillate_SpellScript(uint8 chance, uint32 failSpell) : SpellScript(), _chance(chance), _failSpell(failSpell) { }
@@ -270,7 +270,7 @@ class spell_item_desperate_defense : public SpellScriptLoader
class spell_item_desperate_defense_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_item_desperate_defense_AuraScript)
+ PrepareAuraScript(spell_item_desperate_defense_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -315,7 +315,7 @@ class spell_item_deviate_fish : public SpellScriptLoader
class spell_item_deviate_fish_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_deviate_fish_SpellScript)
+ PrepareSpellScript(spell_item_deviate_fish_SpellScript);
bool Load() override
{
@@ -357,7 +357,7 @@ class spell_item_echoes_of_light : public SpellScriptLoader
class spell_item_echoes_of_light_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_echoes_of_light_SpellScript)
+ PrepareSpellScript(spell_item_echoes_of_light_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets)
{
@@ -399,7 +399,7 @@ class spell_item_flask_of_the_north : public SpellScriptLoader
class spell_item_flask_of_the_north_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_flask_of_the_north_SpellScript)
+ PrepareSpellScript(spell_item_flask_of_the_north_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -468,7 +468,7 @@ class spell_item_gnomish_death_ray : public SpellScriptLoader
class spell_item_gnomish_death_ray_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_gnomish_death_ray_SpellScript)
+ PrepareSpellScript(spell_item_gnomish_death_ray_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -519,7 +519,7 @@ class spell_item_make_a_wish : public SpellScriptLoader
class spell_item_make_a_wish_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_make_a_wish_SpellScript)
+ PrepareSpellScript(spell_item_make_a_wish_SpellScript);
bool Load() override
{
@@ -568,7 +568,7 @@ class spell_item_mingos_fortune_generator : public SpellScriptLoader
class spell_item_mingos_fortune_generator_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_mingos_fortune_generator_SpellScript)
+ PrepareSpellScript(spell_item_mingos_fortune_generator_SpellScript);
void HandleDummy(SpellEffIndex effIndex)
{
@@ -628,7 +628,7 @@ class spell_item_necrotic_touch : public SpellScriptLoader
class spell_item_necrotic_touch_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_item_necrotic_touch_AuraScript)
+ PrepareAuraScript(spell_item_necrotic_touch_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -678,7 +678,7 @@ class spell_item_net_o_matic : public SpellScriptLoader
class spell_item_net_o_matic_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_net_o_matic_SpellScript)
+ PrepareSpellScript(spell_item_net_o_matic_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -730,7 +730,7 @@ class spell_item_noggenfogger_elixir : public SpellScriptLoader
class spell_item_noggenfogger_elixir_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_noggenfogger_elixir_SpellScript)
+ PrepareSpellScript(spell_item_noggenfogger_elixir_SpellScript);
bool Load() override
{
@@ -777,7 +777,7 @@ class spell_item_piccolo_of_the_flaming_fire : public SpellScriptLoader
class spell_item_piccolo_of_the_flaming_fire_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_piccolo_of_the_flaming_fire_SpellScript)
+ PrepareSpellScript(spell_item_piccolo_of_the_flaming_fire_SpellScript);
void HandleScript(SpellEffIndex effIndex)
{
@@ -815,7 +815,7 @@ class spell_item_savory_deviate_delight : public SpellScriptLoader
class spell_item_savory_deviate_delight_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_savory_deviate_delight_SpellScript)
+ PrepareSpellScript(spell_item_savory_deviate_delight_SpellScript);
bool Load() override
{
@@ -876,7 +876,7 @@ class spell_item_scroll_of_recall : public SpellScriptLoader
class spell_item_scroll_of_recall_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_scroll_of_recall_SpellScript)
+ PrepareSpellScript(spell_item_scroll_of_recall_SpellScript);
bool Load() override
{
@@ -943,7 +943,7 @@ class spell_item_unsated_craving : public SpellScriptLoader
class spell_item_unsated_craving_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_item_unsated_craving_AuraScript)
+ PrepareAuraScript(spell_item_unsated_craving_AuraScript);
bool CheckProc(ProcEventInfo& procInfo)
{
@@ -977,7 +977,7 @@ class spell_item_shadows_fate : public SpellScriptLoader
class spell_item_shadows_fate_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_item_shadows_fate_AuraScript)
+ PrepareAuraScript(spell_item_shadows_fate_AuraScript);
void HandleProc(ProcEventInfo& procInfo)
{
@@ -1018,7 +1018,7 @@ class spell_item_shadowmourne : public SpellScriptLoader
class spell_item_shadowmourne_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_item_shadowmourne_AuraScript)
+ PrepareAuraScript(spell_item_shadowmourne_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -1075,7 +1075,7 @@ class spell_item_shadowmourne_soul_fragment : public SpellScriptLoader
class spell_item_shadowmourne_soul_fragment_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_item_shadowmourne_soul_fragment_AuraScript)
+ PrepareAuraScript(spell_item_shadowmourne_soul_fragment_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -1144,7 +1144,7 @@ class spell_item_six_demon_bag : public SpellScriptLoader
class spell_item_six_demon_bag_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_six_demon_bag_SpellScript)
+ PrepareSpellScript(spell_item_six_demon_bag_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -1204,7 +1204,7 @@ class spell_item_the_eye_of_diminution : public SpellScriptLoader
class spell_item_the_eye_of_diminution_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_item_the_eye_of_diminution_AuraScript)
+ PrepareAuraScript(spell_item_the_eye_of_diminution_AuraScript);
void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
{
@@ -1241,7 +1241,7 @@ class spell_item_underbelly_elixir : public SpellScriptLoader
class spell_item_underbelly_elixir_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_underbelly_elixir_SpellScript)
+ PrepareSpellScript(spell_item_underbelly_elixir_SpellScript);
bool Load() override
{
@@ -1292,7 +1292,7 @@ class spell_item_red_rider_air_rifle : public SpellScriptLoader
class spell_item_red_rider_air_rifle_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_red_rider_air_rifle_SpellScript)
+ PrepareSpellScript(spell_item_red_rider_air_rifle_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -1357,7 +1357,7 @@ class spell_item_create_heart_candy : public SpellScriptLoader
class spell_item_create_heart_candy_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_create_heart_candy_SpellScript)
+ PrepareSpellScript(spell_item_create_heart_candy_SpellScript);
void HandleScript(SpellEffIndex effIndex)
{
@@ -1388,7 +1388,7 @@ class spell_item_book_of_glyph_mastery : public SpellScriptLoader
class spell_item_book_of_glyph_mastery_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_book_of_glyph_mastery_SpellScript)
+ PrepareSpellScript(spell_item_book_of_glyph_mastery_SpellScript);
bool Load() override
{
@@ -1442,7 +1442,7 @@ class spell_item_gift_of_the_harvester : public SpellScriptLoader
class spell_item_gift_of_the_harvester_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_gift_of_the_harvester_SpellScript)
+ PrepareSpellScript(spell_item_gift_of_the_harvester_SpellScript);
SpellCastResult CheckRequirement()
{
@@ -1483,7 +1483,7 @@ class spell_item_map_of_the_geyser_fields : public SpellScriptLoader
class spell_item_map_of_the_geyser_fields_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_map_of_the_geyser_fields_SpellScript)
+ PrepareSpellScript(spell_item_map_of_the_geyser_fields_SpellScript);
SpellCastResult CheckSinkholes()
{
@@ -1523,7 +1523,7 @@ class spell_item_vanquished_clutches : public SpellScriptLoader
class spell_item_vanquished_clutches_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_vanquished_clutches_SpellScript)
+ PrepareSpellScript(spell_item_vanquished_clutches_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -1574,7 +1574,7 @@ class spell_item_ashbringer : public SpellScriptLoader
class spell_item_ashbringer_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_ashbringer_SpellScript)
+ PrepareSpellScript(spell_item_ashbringer_SpellScript);
bool Load() override
{
@@ -1623,7 +1623,7 @@ class spell_magic_eater_food : public SpellScriptLoader
class spell_magic_eater_food_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_magic_eater_food_AuraScript)
+ PrepareAuraScript(spell_magic_eater_food_AuraScript);
void HandleTriggerSpell(AuraEffect const* /*aurEff*/)
{
@@ -1671,7 +1671,7 @@ class spell_item_shimmering_vessel : public SpellScriptLoader
class spell_item_shimmering_vessel_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_shimmering_vessel_SpellScript)
+ PrepareSpellScript(spell_item_shimmering_vessel_SpellScript);
void HandleDummy(SpellEffIndex /* effIndex */)
{
@@ -1704,7 +1704,7 @@ class spell_item_purify_helboar_meat : public SpellScriptLoader
class spell_item_purify_helboar_meat_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_purify_helboar_meat_SpellScript)
+ PrepareSpellScript(spell_item_purify_helboar_meat_SpellScript);
bool Load() override
{
@@ -1748,7 +1748,7 @@ class spell_item_crystal_prison_dummy_dnd : public SpellScriptLoader
class spell_item_crystal_prison_dummy_dnd_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_crystal_prison_dummy_dnd_SpellScript)
+ PrepareSpellScript(spell_item_crystal_prison_dummy_dnd_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -1795,7 +1795,7 @@ class spell_item_reindeer_transformation : public SpellScriptLoader
class spell_item_reindeer_transformation_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_reindeer_transformation_SpellScript)
+ PrepareSpellScript(spell_item_reindeer_transformation_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -1860,7 +1860,7 @@ class spell_item_nigh_invulnerability : public SpellScriptLoader
class spell_item_nigh_invulnerability_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_nigh_invulnerability_SpellScript)
+ PrepareSpellScript(spell_item_nigh_invulnerability_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -1906,7 +1906,7 @@ class spell_item_poultryizer : public SpellScriptLoader
class spell_item_poultryizer_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_poultryizer_SpellScript)
+ PrepareSpellScript(spell_item_poultryizer_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -1946,7 +1946,7 @@ class spell_item_socrethars_stone : public SpellScriptLoader
class spell_item_socrethars_stone_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_socrethars_stone_SpellScript)
+ PrepareSpellScript(spell_item_socrethars_stone_SpellScript);
bool Load() override
{
@@ -2001,7 +2001,7 @@ class spell_item_demon_broiled_surprise : public SpellScriptLoader
class spell_item_demon_broiled_surprise_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_demon_broiled_surprise_SpellScript)
+ PrepareSpellScript(spell_item_demon_broiled_surprise_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -2058,7 +2058,7 @@ class spell_item_complete_raptor_capture : public SpellScriptLoader
class spell_item_complete_raptor_capture_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_complete_raptor_capture_SpellScript)
+ PrepareSpellScript(spell_item_complete_raptor_capture_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -2104,7 +2104,7 @@ class spell_item_impale_leviroth : public SpellScriptLoader
class spell_item_impale_leviroth_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_impale_leviroth_SpellScript)
+ PrepareSpellScript(spell_item_impale_leviroth_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -2149,7 +2149,7 @@ class spell_item_brewfest_mount_transformation : public SpellScriptLoader
class spell_item_brewfest_mount_transformation_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_brewfest_mount_transformation_SpellScript)
+ PrepareSpellScript(spell_item_brewfest_mount_transformation_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -2212,7 +2212,7 @@ class spell_item_nitro_boots : public SpellScriptLoader
class spell_item_nitro_boots_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_nitro_boots_SpellScript)
+ PrepareSpellScript(spell_item_nitro_boots_SpellScript);
bool Load() override
{
@@ -2231,7 +2231,8 @@ class spell_item_nitro_boots : public SpellScriptLoader
void HandleDummy(SpellEffIndex /* effIndex */)
{
Unit* caster = GetCaster();
- caster->CastSpell(caster, roll_chance_i(95) ? SPELL_NITRO_BOOTS_SUCCESS : SPELL_NITRO_BOOTS_BACKFIRE, true, GetCastItem());
+ bool success = caster->GetMap()->IsDungeon() || roll_chance_i(95);
+ caster->CastSpell(caster, success ? SPELL_NITRO_BOOTS_SUCCESS : SPELL_NITRO_BOOTS_BACKFIRE, true, GetCastItem());
}
void Register() override
@@ -2259,7 +2260,7 @@ class spell_item_teach_language : public SpellScriptLoader
class spell_item_teach_language_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_teach_language_SpellScript)
+ PrepareSpellScript(spell_item_teach_language_SpellScript);
bool Load() override
{
@@ -2305,7 +2306,7 @@ class spell_item_rocket_boots : public SpellScriptLoader
class spell_item_rocket_boots_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_rocket_boots_SpellScript)
+ PrepareSpellScript(spell_item_rocket_boots_SpellScript);
bool Load() override
{
@@ -2362,7 +2363,7 @@ class spell_item_pygmy_oil : public SpellScriptLoader
class spell_item_pygmy_oil_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_pygmy_oil_SpellScript)
+ PrepareSpellScript(spell_item_pygmy_oil_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -2408,7 +2409,7 @@ class spell_item_unusual_compass : public SpellScriptLoader
class spell_item_unusual_compass_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_unusual_compass_SpellScript)
+ PrepareSpellScript(spell_item_unusual_compass_SpellScript);
void HandleDummy(SpellEffIndex /* effIndex */)
{
@@ -2443,7 +2444,7 @@ class spell_item_chicken_cover : public SpellScriptLoader
class spell_item_chicken_cover_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_chicken_cover_SpellScript)
+ PrepareSpellScript(spell_item_chicken_cover_SpellScript);
bool Load() override
{
@@ -2496,7 +2497,7 @@ class spell_item_refocus : public SpellScriptLoader
class spell_item_refocus_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_refocus_SpellScript)
+ PrepareSpellScript(spell_item_refocus_SpellScript);
void HandleDummy(SpellEffIndex /*effIndex*/)
{
@@ -2534,7 +2535,7 @@ class spell_item_muisek_vessel : public SpellScriptLoader
class spell_item_muisek_vessel_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_muisek_vessel_SpellScript)
+ PrepareSpellScript(spell_item_muisek_vessel_SpellScript);
void HandleDummy(SpellEffIndex /*effIndex*/)
{
@@ -2566,7 +2567,7 @@ public:
class spell_item_greatmothers_soulcatcher_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_greatmothers_soulcatcher_SpellScript)
+ PrepareSpellScript(spell_item_greatmothers_soulcatcher_SpellScript);
void HandleDummy(SpellEffIndex /*effIndex*/)
{
diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp
index 1f41c7974cd..edb9cd04b44 100644
--- a/src/server/scripts/Spells/spell_mage.cpp
+++ b/src/server/scripts/Spells/spell_mage.cpp
@@ -82,7 +82,7 @@ class spell_mage_blast_wave : public SpellScriptLoader
class spell_mage_blast_wave_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_mage_blast_wave_SpellScript)
+ PrepareSpellScript(spell_mage_blast_wave_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -117,7 +117,7 @@ class spell_mage_burnout : public SpellScriptLoader
class spell_mage_burnout_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_mage_burnout_AuraScript)
+ PrepareAuraScript(spell_mage_burnout_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -162,7 +162,7 @@ class spell_mage_cold_snap : public SpellScriptLoader
class spell_mage_cold_snap_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_mage_cold_snap_SpellScript)
+ PrepareSpellScript(spell_mage_cold_snap_SpellScript);
bool Load() override
{
@@ -210,7 +210,7 @@ class spell_mage_fire_frost_ward : public SpellScriptLoader
class spell_mage_fire_frost_ward_AuraScript : public spell_mage_incanters_absorbtion_base_AuraScript
{
- PrepareAuraScript(spell_mage_fire_frost_ward_AuraScript)
+ PrepareAuraScript(spell_mage_fire_frost_ward_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -276,7 +276,7 @@ class spell_mage_focus_magic : public SpellScriptLoader
class spell_mage_focus_magic_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_mage_focus_magic_AuraScript)
+ PrepareAuraScript(spell_mage_focus_magic_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -327,7 +327,7 @@ class spell_mage_ice_barrier : public SpellScriptLoader
class spell_mage_ice_barrier_AuraScript : public spell_mage_incanters_absorbtion_base_AuraScript
{
- PrepareAuraScript(spell_mage_ice_barrier_AuraScript)
+ PrepareAuraScript(spell_mage_ice_barrier_AuraScript);
void CalculateAmount(AuraEffect const* aurEff, int32& amount, bool& canBeRecalculated)
{
@@ -370,7 +370,7 @@ class spell_mage_ignite : public SpellScriptLoader
class spell_mage_ignite_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_mage_ignite_AuraScript)
+ PrepareAuraScript(spell_mage_ignite_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -417,7 +417,7 @@ class spell_mage_living_bomb : public SpellScriptLoader
class spell_mage_living_bomb_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_mage_living_bomb_AuraScript)
+ PrepareAuraScript(spell_mage_living_bomb_AuraScript);
bool Validate(SpellInfo const* spell) override
{
@@ -456,7 +456,7 @@ class spell_mage_mana_shield : public SpellScriptLoader
class spell_mage_mana_shield_AuraScript : public spell_mage_incanters_absorbtion_base_AuraScript
{
- PrepareAuraScript(spell_mage_mana_shield_AuraScript)
+ PrepareAuraScript(spell_mage_mana_shield_AuraScript);
void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& canBeRecalculated)
{
@@ -494,7 +494,7 @@ class spell_mage_master_of_elements : public SpellScriptLoader
class spell_mage_master_of_elements_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_mage_master_of_elements_AuraScript)
+ PrepareAuraScript(spell_mage_master_of_elements_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -546,7 +546,7 @@ class spell_mage_polymorph_cast_visual : public SpellScriptLoader
class spell_mage_polymorph_cast_visual_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_mage_polymorph_cast_visual_SpellScript)
+ PrepareSpellScript(spell_mage_polymorph_cast_visual_SpellScript);
static const uint32 PolymorhForms[6];
@@ -596,7 +596,7 @@ class spell_mage_summon_water_elemental : public SpellScriptLoader
class spell_mage_summon_water_elemental_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_mage_summon_water_elemental_SpellScript)
+ PrepareSpellScript(spell_mage_summon_water_elemental_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp
index 753d521c652..bf4f1b77a19 100644
--- a/src/server/scripts/Spells/spell_paladin.cpp
+++ b/src/server/scripts/Spells/spell_paladin.cpp
@@ -97,7 +97,7 @@ class spell_pal_ardent_defender : public SpellScriptLoader
class spell_pal_ardent_defender_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_pal_ardent_defender_AuraScript)
+ PrepareAuraScript(spell_pal_ardent_defender_AuraScript);
uint32 absorbPct, healPct;
@@ -173,7 +173,7 @@ class spell_pal_aura_mastery : public SpellScriptLoader
class spell_pal_aura_mastery_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_pal_aura_mastery_AuraScript)
+ PrepareAuraScript(spell_pal_aura_mastery_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -213,7 +213,7 @@ class spell_pal_aura_mastery_immune : public SpellScriptLoader
class spell_pal_aura_mastery_immune_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_pal_aura_mastery_immune_AuraScript)
+ PrepareAuraScript(spell_pal_aura_mastery_immune_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -247,7 +247,7 @@ class spell_pal_avenging_wrath : public SpellScriptLoader
class spell_pal_avenging_wrath_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_pal_avenging_wrath_AuraScript)
+ PrepareAuraScript(spell_pal_avenging_wrath_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -293,7 +293,7 @@ class spell_pal_blessing_of_faith : public SpellScriptLoader
class spell_pal_blessing_of_faith_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_pal_blessing_of_faith_SpellScript)
+ PrepareSpellScript(spell_pal_blessing_of_faith_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -350,7 +350,7 @@ class spell_pal_blessing_of_sanctuary : public SpellScriptLoader
class spell_pal_blessing_of_sanctuary_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_pal_blessing_of_sanctuary_AuraScript)
+ PrepareAuraScript(spell_pal_blessing_of_sanctuary_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -408,7 +408,7 @@ class spell_pal_divine_sacrifice : public SpellScriptLoader
class spell_pal_divine_sacrifice_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_pal_divine_sacrifice_AuraScript)
+ PrepareAuraScript(spell_pal_divine_sacrifice_AuraScript);
uint32 groupSize, minHpPct;
int32 remainingAmount;
@@ -463,7 +463,7 @@ class spell_pal_divine_storm : public SpellScriptLoader
class spell_pal_divine_storm_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_pal_divine_storm_SpellScript)
+ PrepareSpellScript(spell_pal_divine_storm_SpellScript);
uint32 healPct;
@@ -506,7 +506,7 @@ class spell_pal_divine_storm_dummy : public SpellScriptLoader
class spell_pal_divine_storm_dummy_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_pal_divine_storm_dummy_SpellScript)
+ PrepareSpellScript(spell_pal_divine_storm_dummy_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -552,7 +552,7 @@ class spell_pal_exorcism_and_holy_wrath_damage : public SpellScriptLoader
class spell_pal_exorcism_and_holy_wrath_damage_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_pal_exorcism_and_holy_wrath_damage_AuraScript)
+ PrepareAuraScript(spell_pal_exorcism_and_holy_wrath_damage_AuraScript);
void HandleEffectCalcSpellMod(AuraEffect const* aurEff, SpellModifier*& spellMod)
{
@@ -588,7 +588,7 @@ class spell_pal_eye_for_an_eye : public SpellScriptLoader
class spell_pal_eye_for_an_eye_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_pal_eye_for_an_eye_AuraScript)
+ PrepareAuraScript(spell_pal_eye_for_an_eye_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -625,7 +625,7 @@ class spell_pal_glyph_of_holy_light : public SpellScriptLoader
class spell_pal_glyph_of_holy_light_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_pal_glyph_of_holy_light_SpellScript)
+ PrepareSpellScript(spell_pal_glyph_of_holy_light_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets)
{
@@ -658,7 +658,7 @@ class spell_pal_guarded_by_the_light : public SpellScriptLoader
class spell_pal_guarded_by_the_light_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_pal_guarded_by_the_light_SpellScript)
+ PrepareSpellScript(spell_pal_guarded_by_the_light_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -694,7 +694,7 @@ class spell_pal_hand_of_sacrifice : public SpellScriptLoader
class spell_pal_hand_of_sacrifice_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_pal_hand_of_sacrifice_AuraScript)
+ PrepareAuraScript(spell_pal_hand_of_sacrifice_AuraScript);
int32 remainingAmount;
@@ -738,7 +738,7 @@ class spell_pal_hand_of_salvation : public SpellScriptLoader
class spell_pal_hand_of_salvation_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_pal_hand_of_salvation_AuraScript)
+ PrepareAuraScript(spell_pal_hand_of_salvation_AuraScript);
void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
{
@@ -771,7 +771,7 @@ class spell_pal_holy_shock : public SpellScriptLoader
class spell_pal_holy_shock_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_pal_holy_shock_SpellScript)
+ PrepareSpellScript(spell_pal_holy_shock_SpellScript);
bool Validate(SpellInfo const* spellInfo) override
{
@@ -849,7 +849,7 @@ class spell_pal_improved_aura : public SpellScriptLoader
class spell_pal_improved_aura_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_pal_improved_aura_AuraScript)
+ PrepareAuraScript(spell_pal_improved_aura_AuraScript);
public:
spell_pal_improved_aura_AuraScript(uint32 spellId) : AuraScript(), _spellId(spellId) { }
@@ -910,7 +910,7 @@ class spell_pal_improved_aura_effect : public SpellScriptLoader
class spell_pal_improved_aura_effect_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_pal_improved_aura_effect_AuraScript)
+ PrepareAuraScript(spell_pal_improved_aura_effect_AuraScript);
bool CheckAreaTarget(Unit* target)
{
@@ -950,7 +950,7 @@ class spell_pal_item_healing_discount : public SpellScriptLoader
class spell_pal_item_healing_discount_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_pal_item_healing_discount_AuraScript)
+ PrepareAuraScript(spell_pal_item_healing_discount_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -987,7 +987,7 @@ class spell_pal_judgement : public SpellScriptLoader
class spell_pal_judgement_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_pal_judgement_SpellScript)
+ PrepareSpellScript(spell_pal_judgement_SpellScript);
public:
spell_pal_judgement_SpellScript(uint32 spellId) : SpellScript(), _spellId(spellId) { }
@@ -1046,7 +1046,7 @@ class spell_pal_judgement_of_command : public SpellScriptLoader
class spell_pal_judgement_of_command_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_pal_judgement_of_command_SpellScript)
+ PrepareSpellScript(spell_pal_judgement_of_command_SpellScript);
void HandleDummy(SpellEffIndex /*effIndex*/)
{
@@ -1075,7 +1075,7 @@ class spell_pal_lay_on_hands : public SpellScriptLoader
class spell_pal_lay_on_hands_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_pal_lay_on_hands_SpellScript)
+ PrepareSpellScript(spell_pal_lay_on_hands_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -1131,7 +1131,7 @@ class spell_pal_righteous_defense : public SpellScriptLoader
class spell_pal_righteous_defense_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_pal_righteous_defense_SpellScript)
+ PrepareSpellScript(spell_pal_righteous_defense_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -1195,7 +1195,7 @@ class spell_pal_sacred_shield : public SpellScriptLoader
class spell_pal_sacred_shield_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_pal_sacred_shield_AuraScript)
+ PrepareAuraScript(spell_pal_sacred_shield_AuraScript);
void CalculateAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
{
@@ -1239,7 +1239,7 @@ class spell_pal_seal_of_righteousness : public SpellScriptLoader
class spell_pal_seal_of_righteousness_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_pal_seal_of_righteousness_AuraScript)
+ PrepareAuraScript(spell_pal_seal_of_righteousness_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
diff --git a/src/server/scripts/Spells/spell_pet.cpp b/src/server/scripts/Spells/spell_pet.cpp
index 6eabf61b053..775f9f505f9 100644
--- a/src/server/scripts/Spells/spell_pet.cpp
+++ b/src/server/scripts/Spells/spell_pet.cpp
@@ -93,7 +93,7 @@ class spell_gen_pet_calculate : public SpellScriptLoader
class spell_gen_pet_calculate_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_gen_pet_calculate_AuraScript)
+ PrepareAuraScript(spell_gen_pet_calculate_AuraScript);
bool Load() override
{
@@ -227,7 +227,7 @@ public:
class spell_warl_pet_scaling_01_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_warl_pet_scaling_01_AuraScript)
+ PrepareAuraScript(spell_warl_pet_scaling_01_AuraScript);
bool Load() override
{
@@ -364,7 +364,7 @@ public:
class spell_warl_pet_scaling_02_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_warl_pet_scaling_02_AuraScript)
+ PrepareAuraScript(spell_warl_pet_scaling_02_AuraScript);
bool Load() override
{
@@ -477,7 +477,7 @@ public:
class spell_warl_pet_scaling_03_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_warl_pet_scaling_03_AuraScript)
+ PrepareAuraScript(spell_warl_pet_scaling_03_AuraScript);
bool Load() override
{
@@ -544,7 +544,7 @@ public:
class spell_warl_pet_scaling_04_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_warl_pet_scaling_04_AuraScript)
+ PrepareAuraScript(spell_warl_pet_scaling_04_AuraScript);
bool Load() override
{
@@ -584,7 +584,7 @@ public:
class spell_warl_pet_scaling_05_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_warl_pet_scaling_05_AuraScript)
+ PrepareAuraScript(spell_warl_pet_scaling_05_AuraScript);
bool Load() override
{
@@ -659,7 +659,7 @@ public:
class spell_warl_pet_passive_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_warl_pet_passive_AuraScript)
+ PrepareAuraScript(spell_warl_pet_passive_AuraScript);
bool Load() override
{
@@ -732,7 +732,7 @@ public:
class spell_warl_pet_passive_damage_done_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_warl_pet_passive_damage_done_AuraScript)
+ PrepareAuraScript(spell_warl_pet_passive_damage_done_AuraScript);
bool Load() override
{
@@ -783,7 +783,7 @@ public:
class spell_warl_pet_passive_voidwalker_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_warl_pet_passive_voidwalker_AuraScript)
+ PrepareAuraScript(spell_warl_pet_passive_voidwalker_AuraScript);
bool Load() override
{
@@ -821,7 +821,7 @@ public:
class spell_sha_pet_scaling_04_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_sha_pet_scaling_04_AuraScript)
+ PrepareAuraScript(spell_sha_pet_scaling_04_AuraScript);
bool Load() override
{
@@ -880,7 +880,7 @@ public:
class spell_hun_pet_scaling_01_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_hun_pet_scaling_01_AuraScript)
+ PrepareAuraScript(spell_hun_pet_scaling_01_AuraScript);
void CalculateStaminaAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
{
@@ -1006,7 +1006,7 @@ public:
class spell_hun_pet_scaling_02_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_hun_pet_scaling_02_AuraScript)
+ PrepareAuraScript(spell_hun_pet_scaling_02_AuraScript);
bool Load() override
{
@@ -1093,7 +1093,7 @@ public:
class spell_hun_pet_scaling_03_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_hun_pet_scaling_03_AuraScript)
+ PrepareAuraScript(spell_hun_pet_scaling_03_AuraScript);
bool Load() override
{
@@ -1180,7 +1180,7 @@ public:
class spell_hun_pet_scaling_04_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_hun_pet_scaling_04_AuraScript)
+ PrepareAuraScript(spell_hun_pet_scaling_04_AuraScript);
bool Load() override
{
@@ -1261,7 +1261,7 @@ public:
class spell_hun_pet_passive_crit_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_hun_pet_passive_crit_AuraScript)
+ PrepareAuraScript(spell_hun_pet_passive_crit_AuraScript);
bool Load() override
{
@@ -1332,7 +1332,7 @@ public:
class spell_hun_pet_passive_damage_done_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_hun_pet_passive_damage_done_AuraScript)
+ PrepareAuraScript(spell_hun_pet_passive_damage_done_AuraScript);
bool Load() override
{
@@ -1390,7 +1390,7 @@ public:
class spell_hun_animal_handler_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_hun_animal_handler_AuraScript)
+ PrepareAuraScript(spell_hun_animal_handler_AuraScript);
bool Load() override
{
@@ -1432,7 +1432,7 @@ public:
class spell_dk_avoidance_passive_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dk_avoidance_passive_AuraScript)
+ PrepareAuraScript(spell_dk_avoidance_passive_AuraScript);
bool Load() override
{
@@ -1476,7 +1476,7 @@ public:
class spell_dk_pet_scaling_01_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dk_pet_scaling_01_AuraScript)
+ PrepareAuraScript(spell_dk_pet_scaling_01_AuraScript);
bool Load() override
{
@@ -1579,7 +1579,7 @@ public:
class spell_dk_pet_scaling_02_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dk_pet_scaling_02_AuraScript)
+ PrepareAuraScript(spell_dk_pet_scaling_02_AuraScript);
bool Load() override
{
@@ -1622,7 +1622,7 @@ public:
class spell_dk_pet_scaling_03_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dk_pet_scaling_03_AuraScript)
+ PrepareAuraScript(spell_dk_pet_scaling_03_AuraScript);
bool Load() override
{
@@ -1685,7 +1685,7 @@ public:
class spell_dk_rune_weapon_scaling_02_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dk_rune_weapon_scaling_02_AuraScript)
+ PrepareAuraScript(spell_dk_rune_weapon_scaling_02_AuraScript);
bool Load() override
{
diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp
index 3345a4a6eef..f96a30c903a 100644
--- a/src/server/scripts/Spells/spell_priest.cpp
+++ b/src/server/scripts/Spells/spell_priest.cpp
@@ -96,7 +96,7 @@ class spell_pri_circle_of_healing : public SpellScriptLoader
class spell_pri_circle_of_healing_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_pri_circle_of_healing_SpellScript)
+ PrepareSpellScript(spell_pri_circle_of_healing_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -138,7 +138,7 @@ class spell_pri_divine_aegis : public SpellScriptLoader
class spell_pri_divine_aegis_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_pri_divine_aegis_AuraScript)
+ PrepareAuraScript(spell_pri_divine_aegis_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -188,7 +188,7 @@ class spell_pri_divine_hymn : public SpellScriptLoader
class spell_pri_divine_hymn_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_pri_divine_hymn_SpellScript)
+ PrepareSpellScript(spell_pri_divine_hymn_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets)
{
@@ -223,7 +223,7 @@ class spell_pri_glyph_of_prayer_of_healing : public SpellScriptLoader
class spell_pri_glyph_of_prayer_of_healing_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_pri_glyph_of_prayer_of_healing_AuraScript)
+ PrepareAuraScript(spell_pri_glyph_of_prayer_of_healing_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -261,7 +261,7 @@ class spell_pri_guardian_spirit : public SpellScriptLoader
class spell_pri_guardian_spirit_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_pri_guardian_spirit_AuraScript)
+ PrepareAuraScript(spell_pri_guardian_spirit_AuraScript);
uint32 healPct;
@@ -318,7 +318,7 @@ class spell_pri_hymn_of_hope : public SpellScriptLoader
class spell_pri_hymn_of_hope_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_pri_hymn_of_hope_SpellScript)
+ PrepareSpellScript(spell_pri_hymn_of_hope_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets)
{
@@ -354,7 +354,7 @@ class spell_pri_item_greater_heal_refund : public SpellScriptLoader
class spell_pri_item_greater_heal_refund_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_pri_item_greater_heal_refund_AuraScript)
+ PrepareAuraScript(spell_pri_item_greater_heal_refund_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -389,7 +389,7 @@ class spell_pri_lightwell_renew : public SpellScriptLoader
class spell_pri_lightwell_renew_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_pri_lightwell_renew_AuraScript)
+ PrepareAuraScript(spell_pri_lightwell_renew_AuraScript);
void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
{
@@ -421,7 +421,7 @@ class spell_pri_mana_burn : public SpellScriptLoader
class spell_pri_mana_burn_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_pri_mana_burn_SpellScript)
+ PrepareSpellScript(spell_pri_mana_burn_SpellScript);
void HandleAfterHit()
{
@@ -449,7 +449,7 @@ class spell_pri_mana_leech : public SpellScriptLoader
class spell_pri_mana_leech_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_pri_mana_leech_AuraScript)
+ PrepareAuraScript(spell_pri_mana_leech_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -500,7 +500,7 @@ class spell_pri_mind_sear : public SpellScriptLoader
class spell_pri_mind_sear_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_pri_mind_sear_SpellScript)
+ PrepareSpellScript(spell_pri_mind_sear_SpellScript);
void FilterTargets(std::list<WorldObject*>& unitList)
{
@@ -527,7 +527,7 @@ class spell_pri_pain_and_suffering_proc : public SpellScriptLoader
class spell_pri_pain_and_suffering_proc_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_pri_pain_and_suffering_proc_SpellScript)
+ PrepareSpellScript(spell_pri_pain_and_suffering_proc_SpellScript);
void HandleEffectScriptEffect(SpellEffIndex /*effIndex*/)
{
@@ -557,7 +557,7 @@ class spell_pri_penance : public SpellScriptLoader
class spell_pri_penance_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_pri_penance_SpellScript)
+ PrepareSpellScript(spell_pri_penance_SpellScript);
bool Load() override
{
@@ -630,7 +630,7 @@ class spell_pri_power_word_shield : public SpellScriptLoader
class spell_pri_power_word_shield_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_pri_power_word_shield_AuraScript)
+ PrepareAuraScript(spell_pri_power_word_shield_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -705,7 +705,7 @@ class spell_pri_prayer_of_mending_heal : public SpellScriptLoader
class spell_pri_prayer_of_mending_heal_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_pri_prayer_of_mending_heal_SpellScript)
+ PrepareSpellScript(spell_pri_prayer_of_mending_heal_SpellScript);
void HandleHeal(SpellEffIndex /*effIndex*/)
{
@@ -740,7 +740,7 @@ class spell_pri_renew : public SpellScriptLoader
class spell_pri_renew_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_pri_renew_AuraScript)
+ PrepareAuraScript(spell_pri_renew_AuraScript);
bool Load() override
{
@@ -783,7 +783,7 @@ class spell_pri_shadow_word_death : public SpellScriptLoader
class spell_pri_shadow_word_death_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_pri_shadow_word_death_SpellScript)
+ PrepareSpellScript(spell_pri_shadow_word_death_SpellScript);
void HandleDamage()
{
@@ -816,7 +816,7 @@ class spell_pri_vampiric_touch : public SpellScriptLoader
class spell_pri_vampiric_touch_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_pri_vampiric_touch_AuraScript)
+ PrepareAuraScript(spell_pri_vampiric_touch_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp
index 76355a5f1fd..f895381574e 100644
--- a/src/server/scripts/Spells/spell_quest.cpp
+++ b/src/server/scripts/Spells/spell_quest.cpp
@@ -33,7 +33,7 @@
class spell_generic_quest_update_entry_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_generic_quest_update_entry_SpellScript)
+ PrepareSpellScript(spell_generic_quest_update_entry_SpellScript);
private:
uint16 _spellEffect;
uint8 _effIndex;
@@ -99,7 +99,7 @@ class spell_q2203_thaumaturgy_channel : public SpellScriptLoader
class spell_q2203_thaumaturgy_channel_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_q2203_thaumaturgy_channel_AuraScript)
+ PrepareAuraScript(spell_q2203_thaumaturgy_channel_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -142,7 +142,7 @@ class spell_q5206_test_fetid_skull : public SpellScriptLoader
class spell_q5206_test_fetid_skull_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q5206_test_fetid_skull_SpellScript)
+ PrepareSpellScript(spell_q5206_test_fetid_skull_SpellScript);
bool Load() override
{
@@ -194,7 +194,7 @@ class spell_q6124_6129_apply_salve : public SpellScriptLoader
class spell_q6124_6129_apply_salve_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q6124_6129_apply_salve_SpellScript)
+ PrepareSpellScript(spell_q6124_6129_apply_salve_SpellScript);
bool Load() override
{
@@ -274,7 +274,7 @@ class spell_q11396_11399_force_shield_arcane_purple_x3 : public SpellScriptLoade
class spell_q11396_11399_force_shield_arcane_purple_x3_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_q11396_11399_force_shield_arcane_purple_x3_AuraScript)
+ PrepareAuraScript(spell_q11396_11399_force_shield_arcane_purple_x3_AuraScript);
void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -310,7 +310,7 @@ class spell_q11396_11399_scourging_crystal_controller : public SpellScriptLoader
class spell_q11396_11399_scourging_crystal_controller_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q11396_11399_scourging_crystal_controller_SpellScript)
+ PrepareSpellScript(spell_q11396_11399_scourging_crystal_controller_SpellScript);
bool Validate(SpellInfo const* /*spellEntry*/) override
{
@@ -348,7 +348,7 @@ class spell_q11396_11399_scourging_crystal_controller_dummy : public SpellScript
class spell_q11396_11399_scourging_crystal_controller_dummy_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q11396_11399_scourging_crystal_controller_dummy_SpellScript)
+ PrepareSpellScript(spell_q11396_11399_scourging_crystal_controller_dummy_SpellScript);
bool Validate(SpellInfo const* /*spellEntry*/) override
{
@@ -411,7 +411,7 @@ class spell_q11587_arcane_prisoner_rescue : public SpellScriptLoader
class spell_q11587_arcane_prisoner_rescue_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q11587_arcane_prisoner_rescue_SpellScript)
+ PrepareSpellScript(spell_q11587_arcane_prisoner_rescue_SpellScript);
bool Validate(SpellInfo const* /*spellEntry*/) override
{
@@ -469,7 +469,7 @@ class spell_q11730_ultrasonic_screwdriver : public SpellScriptLoader
class spell_q11730_ultrasonic_screwdriver_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q11730_ultrasonic_screwdriver_SpellScript)
+ PrepareSpellScript(spell_q11730_ultrasonic_screwdriver_SpellScript);
bool Load() override
{
@@ -539,7 +539,7 @@ class spell_q12459_seeds_of_natures_wrath : public SpellScriptLoader
class spell_q12459_seeds_of_natures_wrath_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q12459_seeds_of_natures_wrath_SpellScript)
+ PrepareSpellScript(spell_q12459_seeds_of_natures_wrath_SpellScript);
void HandleDummy(SpellEffIndex /*effIndex*/)
{
@@ -586,7 +586,7 @@ class spell_q12634_despawn_fruit_tosser : public SpellScriptLoader
class spell_q12634_despawn_fruit_tosser_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q12634_despawn_fruit_tosser_SpellScript)
+ PrepareSpellScript(spell_q12634_despawn_fruit_tosser_SpellScript);
bool Validate(SpellInfo const* /*spellEntry*/) override
{
@@ -630,7 +630,7 @@ class spell_q12683_take_sputum_sample : public SpellScriptLoader
class spell_q12683_take_sputum_sample_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q12683_take_sputum_sample_SpellScript)
+ PrepareSpellScript(spell_q12683_take_sputum_sample_SpellScript);
void HandleDummy(SpellEffIndex /*effIndex*/)
{
@@ -675,7 +675,7 @@ class spell_q12851_going_bearback : public SpellScriptLoader
class spell_q12851_going_bearback_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_q12851_going_bearback_AuraScript)
+ PrepareAuraScript(spell_q12851_going_bearback_AuraScript);
void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -733,7 +733,7 @@ class spell_q12937_relief_for_the_fallen : public SpellScriptLoader
class spell_q12937_relief_for_the_fallen_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q12937_relief_for_the_fallen_SpellScript)
+ PrepareSpellScript(spell_q12937_relief_for_the_fallen_SpellScript);
bool Load() override
{
@@ -784,7 +784,7 @@ class spell_q10041_q10040_who_are_they : public SpellScriptLoader
class spell_q10041_q10040_who_are_they_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q10041_q10040_who_are_they_SpellScript)
+ PrepareSpellScript(spell_q10041_q10040_who_are_they_SpellScript);
bool Validate(SpellInfo const* /*spellEntry*/) override
{
@@ -828,7 +828,7 @@ class spell_symbol_of_life_dummy : public SpellScriptLoader
class spell_symbol_of_life_dummy_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_symbol_of_life_dummy_SpellScript)
+ PrepareSpellScript(spell_symbol_of_life_dummy_SpellScript);
void HandleDummy(SpellEffIndex /*effIndex*/)
{
@@ -871,7 +871,7 @@ class spell_q12659_ahunaes_knife : public SpellScriptLoader
class spell_q12659_ahunaes_knife_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q12659_ahunaes_knife_SpellScript)
+ PrepareSpellScript(spell_q12659_ahunaes_knife_SpellScript);
bool Load() override
{
@@ -915,7 +915,7 @@ class spell_q9874_liquid_fire : public SpellScriptLoader
class spell_q9874_liquid_fire_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q9874_liquid_fire_SpellScript)
+ PrepareSpellScript(spell_q9874_liquid_fire_SpellScript);
bool Load() override
{
@@ -960,7 +960,7 @@ class spell_q12805_lifeblood_dummy : public SpellScriptLoader
class spell_q12805_lifeblood_dummy_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q12805_lifeblood_dummy_SpellScript)
+ PrepareSpellScript(spell_q12805_lifeblood_dummy_SpellScript);
bool Load() override
{
@@ -1008,7 +1008,7 @@ class spell_q13280_13283_plant_battle_standard: public SpellScriptLoader
class spell_q13280_13283_plant_battle_standard_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q13280_13283_plant_battle_standard_SpellScript)
+ PrepareSpellScript(spell_q13280_13283_plant_battle_standard_SpellScript);
void HandleDummy(SpellEffIndex /*effIndex*/)
{
@@ -1045,7 +1045,7 @@ class spell_q14112_14145_chum_the_water: public SpellScriptLoader
class spell_q14112_14145_chum_the_water_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q14112_14145_chum_the_water_SpellScript)
+ PrepareSpellScript(spell_q14112_14145_chum_the_water_SpellScript);
bool Validate(SpellInfo const* /*spellEntry*/) override
{
@@ -1087,7 +1087,7 @@ class spell_q9452_cast_net: public SpellScriptLoader
class spell_q9452_cast_net_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q9452_cast_net_SpellScript)
+ PrepareSpellScript(spell_q9452_cast_net_SpellScript);
bool Load() override
{
@@ -1130,7 +1130,7 @@ public:
class spell_q12987_read_pronouncement_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_q12987_read_pronouncement_AuraScript)
+ PrepareAuraScript(spell_q12987_read_pronouncement_AuraScript);
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -1171,7 +1171,7 @@ class spell_q12277_wintergarde_mine_explosion : public SpellScriptLoader
class spell_q12277_wintergarde_mine_explosion_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q12277_wintergarde_mine_explosion_SpellScript)
+ PrepareSpellScript(spell_q12277_wintergarde_mine_explosion_SpellScript);
void HandleDummy(SpellEffIndex /*effIndex*/)
{
@@ -1224,7 +1224,7 @@ public:
class spell_q12066_bunny_kill_credit_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q12066_bunny_kill_credit_SpellScript)
+ PrepareSpellScript(spell_q12066_bunny_kill_credit_SpellScript);
void HandleDummy(SpellEffIndex /*effIndex*/)
{
@@ -1262,7 +1262,7 @@ class spell_q12735_song_of_cleansing : public SpellScriptLoader
class spell_q12735_song_of_cleansing_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q12735_song_of_cleansing_SpellScript)
+ PrepareSpellScript(spell_q12735_song_of_cleansing_SpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
@@ -1307,7 +1307,7 @@ class spell_q12372_cast_from_gossip_trigger : public SpellScriptLoader
class spell_q12372_cast_from_gossip_trigger_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q12372_cast_from_gossip_trigger_SpellScript)
+ PrepareSpellScript(spell_q12372_cast_from_gossip_trigger_SpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
@@ -1343,7 +1343,7 @@ class spell_q12372_destabilize_azure_dragonshrine_dummy : public SpellScriptLoad
class spell_q12372_destabilize_azure_dragonshrine_dummy_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q12372_destabilize_azure_dragonshrine_dummy_SpellScript)
+ PrepareSpellScript(spell_q12372_destabilize_azure_dragonshrine_dummy_SpellScript);
void HandleDummy(SpellEffIndex /*effIndex*/)
{
@@ -1375,7 +1375,7 @@ class spell_q12372_azure_on_death_force_whisper : public SpellScriptLoader
class spell_q12372_azure_on_death_force_whisper_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q12372_azure_on_death_force_whisper_SpellScript)
+ PrepareSpellScript(spell_q12372_azure_on_death_force_whisper_SpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
@@ -1414,7 +1414,7 @@ class spell_q11010_q11102_q11023_aggro_check_aura : public SpellScriptLoader
class spell_q11010_q11102_q11023_aggro_check_aura_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_q11010_q11102_q11023_aggro_check_aura_AuraScript)
+ PrepareAuraScript(spell_q11010_q11102_q11023_aggro_check_aura_AuraScript);
void HandleTriggerSpell(AuraEffect const* /*aurEff*/)
{
@@ -1443,7 +1443,7 @@ class spell_q11010_q11102_q11023_aggro_check : public SpellScriptLoader
class spell_q11010_q11102_q11023_aggro_check_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q11010_q11102_q11023_aggro_check_SpellScript)
+ PrepareSpellScript(spell_q11010_q11102_q11023_aggro_check_SpellScript);
void HandleDummy(SpellEffIndex /*effIndex*/)
{
@@ -1473,7 +1473,7 @@ class spell_q11010_q11102_q11023_aggro_burst : public SpellScriptLoader
class spell_q11010_q11102_q11023_aggro_burst_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_q11010_q11102_q11023_aggro_burst_AuraScript)
+ PrepareAuraScript(spell_q11010_q11102_q11023_aggro_burst_AuraScript);
void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
{
@@ -1502,7 +1502,7 @@ class spell_q11010_q11102_q11023_choose_loc : public SpellScriptLoader
class spell_q11010_q11102_q11023_choose_loc_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q11010_q11102_q11023_choose_loc_SpellScript)
+ PrepareSpellScript(spell_q11010_q11102_q11023_choose_loc_SpellScript);
void HandleDummy(SpellEffIndex /*effIndex*/)
{
@@ -1540,7 +1540,7 @@ class spell_q11010_q11102_q11023_q11008_check_fly_mount : public SpellScriptLoad
class spell_q11010_q11102_q11023_q11008_check_fly_mount_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q11010_q11102_q11023_q11008_check_fly_mount_SpellScript)
+ PrepareSpellScript(spell_q11010_q11102_q11023_q11008_check_fly_mount_SpellScript);
SpellCastResult CheckRequirement()
{
@@ -1575,7 +1575,7 @@ class spell_q12527_zuldrak_rat : public SpellScriptLoader
class spell_q12527_zuldrak_rat_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q12527_zuldrak_rat_SpellScript)
+ PrepareSpellScript(spell_q12527_zuldrak_rat_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -1614,7 +1614,7 @@ class spell_q12661_q12669_q12676_q12677_q12713_summon_stefan : public SpellScrip
class spell_q12661_q12669_q12676_q12677_q12713_summon_stefan_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q12661_q12669_q12676_q12677_q12713_summon_stefan_SpellScript)
+ PrepareSpellScript(spell_q12661_q12669_q12676_q12677_q12713_summon_stefan_SpellScript);
void SetDest(SpellDestination& dest)
{
@@ -1647,7 +1647,7 @@ class spell_q12730_quenching_mist : public SpellScriptLoader
class spell_q12730_quenching_mist_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_q12730_quenching_mist_AuraScript)
+ PrepareAuraScript(spell_q12730_quenching_mist_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -1690,7 +1690,7 @@ class spell_q13291_q13292_q13239_q13261_frostbrood_skytalon_grab_decoy : public
class spell_q13291_q13292_q13239_q13261_frostbrood_skytalon_grab_decoy_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q13291_q13292_q13239_q13261_frostbrood_skytalon_grab_decoy_SpellScript)
+ PrepareSpellScript(spell_q13291_q13292_q13239_q13261_frostbrood_skytalon_grab_decoy_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -1729,7 +1729,7 @@ class spell_q13291_q13292_q13239_q13261_armored_decoy_summon_skytalon : public S
class spell_q13291_q13292_q13239_q13261_armored_decoy_summon_skytalon_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q13291_q13292_q13239_q13261_armored_decoy_summon_skytalon_SpellScript)
+ PrepareSpellScript(spell_q13291_q13292_q13239_q13261_armored_decoy_summon_skytalon_SpellScript);
void SetDest(SpellDestination& dest)
{
@@ -1758,7 +1758,7 @@ class spell_q12847_summon_soul_moveto_bunny : public SpellScriptLoader
class spell_q12847_summon_soul_moveto_bunny_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q12847_summon_soul_moveto_bunny_SpellScript)
+ PrepareSpellScript(spell_q12847_summon_soul_moveto_bunny_SpellScript);
void SetDest(SpellDestination& dest)
{
@@ -1793,7 +1793,7 @@ class spell_q13011_bear_flank_master : public SpellScriptLoader
class spell_q13011_bear_flank_master_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q13011_bear_flank_master_SpellScript)
+ PrepareSpellScript(spell_q13011_bear_flank_master_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -1843,7 +1843,7 @@ class spell_q13086_cannons_target : public SpellScriptLoader
class spell_q13086_cannons_target_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q13086_cannons_target_SpellScript)
+ PrepareSpellScript(spell_q13086_cannons_target_SpellScript);
bool Validate(SpellInfo const* spellInfo) override
{
@@ -1894,7 +1894,7 @@ class spell_q12690_burst_at_the_seams : public SpellScriptLoader
class spell_q12690_burst_at_the_seams_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q12690_burst_at_the_seams_SpellScript)
+ PrepareSpellScript(spell_q12690_burst_at_the_seams_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -1970,7 +1970,7 @@ class spell_q12308_escape_from_silverbrook : public SpellScriptLoader
class spell_q12308_escape_from_silverbrook_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q12308_escape_from_silverbrook_SpellScript)
+ PrepareSpellScript(spell_q12308_escape_from_silverbrook_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -2004,7 +2004,7 @@ class spell_q12308_escape_from_silverbrook_summon_worgen : public SpellScriptLoa
class spell_q12308_escape_from_silverbrook_summon_worgen_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q12308_escape_from_silverbrook_summon_worgen_SpellScript)
+ PrepareSpellScript(spell_q12308_escape_from_silverbrook_summon_worgen_SpellScript);
void ModDest(SpellDestination& dest)
{
@@ -2049,7 +2049,7 @@ class spell_q12641_death_comes_from_on_high : public SpellScriptLoader
class spell_q12641_death_comes_from_on_high_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q12641_death_comes_from_on_high_SpellScript)
+ PrepareSpellScript(spell_q12641_death_comes_from_on_high_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -2106,7 +2106,7 @@ class spell_q12619_emblazon_runeblade : public SpellScriptLoader
class spell_q12619_emblazon_runeblade_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_q12619_emblazon_runeblade_AuraScript)
+ PrepareAuraScript(spell_q12619_emblazon_runeblade_AuraScript);
void HandleEffectPeriodic(AuraEffect const* aurEff)
{
@@ -2135,7 +2135,7 @@ class spell_q12619_emblazon_runeblade_effect : public SpellScriptLoader
class spell_q12619_emblazon_runeblade_effect_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q12619_emblazon_runeblade_effect_SpellScript)
+ PrepareSpellScript(spell_q12619_emblazon_runeblade_effect_SpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
@@ -2167,7 +2167,7 @@ class spell_q12919_gymers_grab : public SpellScriptLoader
class spell_q12919_gymers_grab_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q12919_gymers_grab_SpellScript)
+ PrepareSpellScript(spell_q12919_gymers_grab_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -2209,7 +2209,7 @@ class spell_q12919_gymers_throw : public SpellScriptLoader
class spell_q12919_gymers_throw_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q12919_gymers_throw_SpellScript)
+ PrepareSpellScript(spell_q12919_gymers_throw_SpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
@@ -2246,7 +2246,7 @@ class spell_q13400_illidan_kill_master : public SpellScriptLoader
class spell_q13400_illidan_kill_master_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q13400_illidan_kill_master_SpellScript)
+ PrepareSpellScript(spell_q13400_illidan_kill_master_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -2288,7 +2288,7 @@ class spell_q14100_q14111_make_player_destroy_totems : public SpellScriptLoader
class spell_q14100_q14111_make_player_destroy_totems_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q14100_q14111_make_player_destroy_totems_SpellScript)
+ PrepareSpellScript(spell_q14100_q14111_make_player_destroy_totems_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp
index 16538484100..bf413aef6a3 100644
--- a/src/server/scripts/Spells/spell_rogue.cpp
+++ b/src/server/scripts/Spells/spell_rogue.cpp
@@ -50,7 +50,7 @@ class spell_rog_blade_flurry : public SpellScriptLoader
class spell_rog_blade_flurry_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_rog_blade_flurry_AuraScript)
+ PrepareAuraScript(spell_rog_blade_flurry_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -105,7 +105,7 @@ class spell_rog_cheat_death : public SpellScriptLoader
class spell_rog_cheat_death_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_rog_cheat_death_AuraScript)
+ PrepareAuraScript(spell_rog_cheat_death_AuraScript);
uint32 absorbChance;
@@ -168,7 +168,7 @@ class spell_rog_deadly_poison : public SpellScriptLoader
class spell_rog_deadly_poison_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_rog_deadly_poison_SpellScript)
+ PrepareSpellScript(spell_rog_deadly_poison_SpellScript);
bool Load() override
{
@@ -263,7 +263,7 @@ class spell_rog_killing_spree : public SpellScriptLoader
class spell_rog_killing_spree_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_rog_killing_spree_SpellScript)
+ PrepareSpellScript(spell_rog_killing_spree_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets)
{
@@ -294,7 +294,7 @@ class spell_rog_killing_spree : public SpellScriptLoader
class spell_rog_killing_spree_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_rog_killing_spree_AuraScript)
+ PrepareAuraScript(spell_rog_killing_spree_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -362,7 +362,7 @@ class spell_rog_nerves_of_steel : public SpellScriptLoader
class spell_rog_nerves_of_steel_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_rog_nerves_of_steel_AuraScript)
+ PrepareAuraScript(spell_rog_nerves_of_steel_AuraScript);
uint32 absorbPct;
@@ -406,7 +406,7 @@ class spell_rog_preparation : public SpellScriptLoader
class spell_rog_preparation_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_rog_preparation_SpellScript)
+ PrepareSpellScript(spell_rog_preparation_SpellScript);
bool Load() override
{
@@ -473,7 +473,7 @@ class spell_rog_prey_on_the_weak : public SpellScriptLoader
class spell_rog_prey_on_the_weak_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_rog_prey_on_the_weak_AuraScript)
+ PrepareAuraScript(spell_rog_prey_on_the_weak_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -518,7 +518,7 @@ class spell_rog_rupture : public SpellScriptLoader
class spell_rog_rupture_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_rog_rupture_AuraScript)
+ PrepareAuraScript(spell_rog_rupture_AuraScript);
bool Load() override
{
@@ -570,7 +570,7 @@ class spell_rog_shiv : public SpellScriptLoader
class spell_rog_shiv_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_rog_shiv_SpellScript)
+ PrepareSpellScript(spell_rog_shiv_SpellScript);
bool Load() override
{
@@ -611,7 +611,7 @@ class spell_rog_tricks_of_the_trade : public SpellScriptLoader
class spell_rog_tricks_of_the_trade_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_rog_tricks_of_the_trade_AuraScript)
+ PrepareAuraScript(spell_rog_tricks_of_the_trade_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -675,7 +675,7 @@ class spell_rog_tricks_of_the_trade_proc : public SpellScriptLoader
class spell_rog_tricks_of_the_trade_proc_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_rog_tricks_of_the_trade_proc_AuraScript)
+ PrepareAuraScript(spell_rog_tricks_of_the_trade_proc_AuraScript);
void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp
index 1d1d8223a2a..61ff79c505e 100644
--- a/src/server/scripts/Spells/spell_shaman.cpp
+++ b/src/server/scripts/Spells/spell_shaman.cpp
@@ -70,7 +70,7 @@ class spell_sha_ancestral_awakening_proc : public SpellScriptLoader
class spell_sha_ancestral_awakening_proc_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_sha_ancestral_awakening_proc_SpellScript)
+ PrepareSpellScript(spell_sha_ancestral_awakening_proc_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -119,7 +119,7 @@ class spell_sha_astral_shift : public SpellScriptLoader
class spell_sha_astral_shift_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_sha_astral_shift_AuraScript)
+ PrepareAuraScript(spell_sha_astral_shift_AuraScript);
uint32 absorbPct;
@@ -163,7 +163,7 @@ class spell_sha_bloodlust : public SpellScriptLoader
class spell_sha_bloodlust_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_sha_bloodlust_SpellScript)
+ PrepareSpellScript(spell_sha_bloodlust_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -206,7 +206,7 @@ class spell_sha_chain_heal : public SpellScriptLoader
class spell_sha_chain_heal_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_sha_chain_heal_SpellScript)
+ PrepareSpellScript(spell_sha_chain_heal_SpellScript);
bool Load() override
{
@@ -256,7 +256,7 @@ class spell_sha_cleansing_totem_pulse : public SpellScriptLoader
class spell_sha_cleansing_totem_pulse_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_sha_cleansing_totem_pulse_SpellScript)
+ PrepareSpellScript(spell_sha_cleansing_totem_pulse_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -292,7 +292,7 @@ class spell_sha_earth_shield : public SpellScriptLoader
class spell_sha_earth_shield_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_sha_earth_shield_AuraScript)
+ PrepareAuraScript(spell_sha_earth_shield_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -360,7 +360,7 @@ class spell_sha_earthbind_totem : public SpellScriptLoader
class spell_sha_earthbind_totem_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_sha_earthbind_totem_AuraScript)
+ PrepareAuraScript(spell_sha_earthbind_totem_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -432,7 +432,7 @@ class spell_sha_earthen_power : public SpellScriptLoader
class spell_sha_earthen_power_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_sha_earthen_power_SpellScript)
+ PrepareSpellScript(spell_sha_earthen_power_SpellScript);
void FilterTargets(std::list<WorldObject*>& unitList)
{
@@ -459,7 +459,7 @@ class spell_sha_fire_nova : public SpellScriptLoader
class spell_sha_fire_nova_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_sha_fire_nova_SpellScript)
+ PrepareSpellScript(spell_sha_fire_nova_SpellScript);
bool Validate(SpellInfo const* spellInfo) override
{
@@ -517,7 +517,7 @@ class spell_sha_flame_shock : public SpellScriptLoader
class spell_sha_flame_shock_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_sha_flame_shock_AuraScript)
+ PrepareAuraScript(spell_sha_flame_shock_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -563,7 +563,7 @@ class spell_sha_healing_stream_totem : public SpellScriptLoader
class spell_sha_healing_stream_totem_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_sha_healing_stream_totem_SpellScript)
+ PrepareSpellScript(spell_sha_healing_stream_totem_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -618,7 +618,7 @@ class spell_sha_heroism : public SpellScriptLoader
class spell_sha_heroism_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_sha_heroism_SpellScript)
+ PrepareSpellScript(spell_sha_heroism_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -661,7 +661,7 @@ class spell_sha_item_lightning_shield : public SpellScriptLoader
class spell_sha_item_lightning_shield_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_sha_item_lightning_shield_AuraScript)
+ PrepareAuraScript(spell_sha_item_lightning_shield_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -696,7 +696,7 @@ class spell_sha_item_lightning_shield_trigger : public SpellScriptLoader
class spell_sha_item_lightning_shield_trigger_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_sha_item_lightning_shield_trigger_AuraScript)
+ PrepareAuraScript(spell_sha_item_lightning_shield_trigger_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -731,7 +731,7 @@ class spell_sha_item_mana_surge : public SpellScriptLoader
class spell_sha_item_mana_surge_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_sha_item_mana_surge_AuraScript)
+ PrepareAuraScript(spell_sha_item_mana_surge_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -775,7 +775,7 @@ class spell_sha_lava_lash : public SpellScriptLoader
class spell_sha_lava_lash_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_sha_lava_lash_SpellScript)
+ PrepareSpellScript(spell_sha_lava_lash_SpellScript);
bool Load() override
{
@@ -819,7 +819,7 @@ class spell_sha_mana_spring_totem : public SpellScriptLoader
class spell_sha_mana_spring_totem_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_sha_mana_spring_totem_SpellScript)
+ PrepareSpellScript(spell_sha_mana_spring_totem_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -858,7 +858,7 @@ class spell_sha_mana_tide_totem : public SpellScriptLoader
class spell_sha_mana_tide_totem_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_sha_mana_tide_totem_SpellScript)
+ PrepareSpellScript(spell_sha_mana_tide_totem_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -906,7 +906,7 @@ class spell_sha_sentry_totem : public SpellScriptLoader
class spell_sha_sentry_totem_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_sha_sentry_totem_AuraScript)
+ PrepareAuraScript(spell_sha_sentry_totem_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -951,7 +951,7 @@ class spell_sha_thunderstorm : public SpellScriptLoader
class spell_sha_thunderstorm_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_sha_thunderstorm_SpellScript)
+ PrepareSpellScript(spell_sha_thunderstorm_SpellScript);
void HandleKnockBack(SpellEffIndex effIndex)
{
diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp
index 20f9cd83cad..18979d24ecb 100644
--- a/src/server/scripts/Spells/spell_warlock.cpp
+++ b/src/server/scripts/Spells/spell_warlock.cpp
@@ -69,7 +69,7 @@ class spell_warl_banish : public SpellScriptLoader
class spell_warl_banish_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_warl_banish_SpellScript)
+ PrepareSpellScript(spell_warl_banish_SpellScript);
bool Load() override
{
@@ -121,7 +121,7 @@ class spell_warl_create_healthstone : public SpellScriptLoader
class spell_warl_create_healthstone_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_warl_create_healthstone_SpellScript)
+ PrepareSpellScript(spell_warl_create_healthstone_SpellScript);
static uint32 const iTypes[8][3];
@@ -204,7 +204,7 @@ class spell_warl_curse_of_doom : public SpellScriptLoader
class spell_warl_curse_of_doom_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_warl_curse_of_doom_AuraScript)
+ PrepareAuraScript(spell_warl_curse_of_doom_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -251,7 +251,7 @@ class spell_warl_demonic_circle_summon : public SpellScriptLoader
class spell_warl_demonic_circle_summon_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_warl_demonic_circle_summon_AuraScript)
+ PrepareAuraScript(spell_warl_demonic_circle_summon_AuraScript);
void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes mode)
{
@@ -303,7 +303,7 @@ class spell_warl_demonic_circle_teleport : public SpellScriptLoader
class spell_warl_demonic_circle_teleport_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_warl_demonic_circle_teleport_AuraScript)
+ PrepareAuraScript(spell_warl_demonic_circle_teleport_AuraScript);
void HandleTeleport(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -337,7 +337,7 @@ class spell_warl_demonic_empowerment : public SpellScriptLoader
class spell_warl_demonic_empowerment_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_warl_demonic_empowerment_SpellScript)
+ PrepareSpellScript(spell_warl_demonic_empowerment_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -401,7 +401,7 @@ class spell_warl_everlasting_affliction : public SpellScriptLoader
class spell_warl_everlasting_affliction_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_warl_everlasting_affliction_SpellScript)
+ PrepareSpellScript(spell_warl_everlasting_affliction_SpellScript);
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
{
@@ -431,7 +431,7 @@ class spell_warl_fel_synergy : public SpellScriptLoader
class spell_warl_fel_synergy_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_warl_fel_synergy_AuraScript)
+ PrepareAuraScript(spell_warl_fel_synergy_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -474,7 +474,7 @@ class spell_warl_glyph_of_shadowflame : public SpellScriptLoader
class spell_warl_glyph_of_shadowflame_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_warl_glyph_of_shadowflame_AuraScript)
+ PrepareAuraScript(spell_warl_glyph_of_shadowflame_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -509,7 +509,7 @@ class spell_warl_haunt : public SpellScriptLoader
class spell_warl_haunt_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_warl_haunt_SpellScript)
+ PrepareSpellScript(spell_warl_haunt_SpellScript);
void HandleOnHit()
{
@@ -526,7 +526,7 @@ class spell_warl_haunt : public SpellScriptLoader
class spell_warl_haunt_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_warl_haunt_AuraScript)
+ PrepareAuraScript(spell_warl_haunt_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -569,7 +569,7 @@ class spell_warl_health_funnel : public SpellScriptLoader
class spell_warl_health_funnel_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_warl_health_funnel_AuraScript)
+ PrepareAuraScript(spell_warl_health_funnel_AuraScript);
void ApplyEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -612,7 +612,7 @@ class spell_warl_life_tap : public SpellScriptLoader
class spell_warl_life_tap_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_warl_life_tap_SpellScript)
+ PrepareSpellScript(spell_warl_life_tap_SpellScript);
bool Load() override
{
@@ -684,7 +684,7 @@ class spell_warl_ritual_of_doom_effect : public SpellScriptLoader
class spell_warl_ritual_of_doom_effect_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_warl_ritual_of_doom_effect_SpellScript)
+ PrepareSpellScript(spell_warl_ritual_of_doom_effect_SpellScript);
void HandleDummy(SpellEffIndex /*effIndex*/)
{
@@ -712,7 +712,7 @@ class spell_warl_seed_of_corruption : public SpellScriptLoader
class spell_warl_seed_of_corruption_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_warl_seed_of_corruption_SpellScript)
+ PrepareSpellScript(spell_warl_seed_of_corruption_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets)
{
@@ -740,7 +740,7 @@ class spell_warl_shadow_ward : public SpellScriptLoader
class spell_warl_shadow_ward_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_warl_shadow_ward_AuraScript)
+ PrepareAuraScript(spell_warl_shadow_ward_AuraScript);
void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& canBeRecalculated)
{
@@ -777,7 +777,7 @@ class spell_warl_siphon_life : public SpellScriptLoader
class spell_warl_siphon_life_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_warl_siphon_life_AuraScript)
+ PrepareAuraScript(spell_warl_siphon_life_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -826,7 +826,7 @@ class spell_warl_soulshatter : public SpellScriptLoader
class spell_warl_soulshatter_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_warl_soulshatter_SpellScript)
+ PrepareSpellScript(spell_warl_soulshatter_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -865,7 +865,7 @@ class spell_warl_unstable_affliction : public SpellScriptLoader
class spell_warl_unstable_affliction_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_warl_unstable_affliction_AuraScript)
+ PrepareAuraScript(spell_warl_unstable_affliction_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp
index 8b49c1c9a6d..fd1c785cf50 100644
--- a/src/server/scripts/Spells/spell_warrior.cpp
+++ b/src/server/scripts/Spells/spell_warrior.cpp
@@ -78,7 +78,7 @@ class spell_warr_bloodthirst : public SpellScriptLoader
class spell_warr_bloodthirst_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_warr_bloodthirst_SpellScript)
+ PrepareSpellScript(spell_warr_bloodthirst_SpellScript);
void HandleDamage(SpellEffIndex /*effIndex*/)
{
@@ -120,7 +120,7 @@ class spell_warr_bloodthirst_heal : public SpellScriptLoader
class spell_warr_bloodthirst_heal_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_warr_bloodthirst_heal_SpellScript)
+ PrepareSpellScript(spell_warr_bloodthirst_heal_SpellScript);
void HandleHeal(SpellEffIndex /*effIndex*/)
{
@@ -148,7 +148,7 @@ class spell_warr_charge : public SpellScriptLoader
class spell_warr_charge_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_warr_charge_SpellScript)
+ PrepareSpellScript(spell_warr_charge_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -188,7 +188,7 @@ class spell_warr_concussion_blow : public SpellScriptLoader
class spell_warr_concussion_blow_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_warr_concussion_blow_SpellScript)
+ PrepareSpellScript(spell_warr_concussion_blow_SpellScript);
void HandleDummy(SpellEffIndex /*effIndex*/)
{
@@ -215,7 +215,7 @@ class spell_warr_damage_shield : public SpellScriptLoader
class spell_warr_damage_shield_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_warr_damage_shield_AuraScript)
+ PrepareAuraScript(spell_warr_damage_shield_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -253,7 +253,7 @@ class spell_warr_deep_wounds : public SpellScriptLoader
class spell_warr_deep_wounds_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_warr_deep_wounds_SpellScript)
+ PrepareSpellScript(spell_warr_deep_wounds_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -308,7 +308,7 @@ class spell_warr_execute : public SpellScriptLoader
class spell_warr_execute_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_warr_execute_SpellScript)
+ PrepareSpellScript(spell_warr_execute_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -364,7 +364,7 @@ class spell_warr_glyph_of_sunder_armor : public SpellScriptLoader
class spell_warr_glyph_of_sunder_armor_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_warr_glyph_of_sunder_armor_AuraScript)
+ PrepareAuraScript(spell_warr_glyph_of_sunder_armor_AuraScript);
void HandleEffectCalcSpellMod(AuraEffect const* aurEff, SpellModifier*& spellMod)
{
@@ -400,7 +400,7 @@ class spell_warr_improved_spell_reflection : public SpellScriptLoader
class spell_warr_improved_spell_reflection_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_warr_improved_spell_reflection_SpellScript)
+ PrepareSpellScript(spell_warr_improved_spell_reflection_SpellScript);
void FilterTargets(std::list<WorldObject*>& unitList)
{
@@ -428,7 +428,7 @@ class spell_warr_intimidating_shout : public SpellScriptLoader
class spell_warr_intimidating_shout_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_warr_intimidating_shout_SpellScript)
+ PrepareSpellScript(spell_warr_intimidating_shout_SpellScript);
void FilterTargets(std::list<WorldObject*>& unitList)
{
@@ -456,7 +456,7 @@ class spell_warr_last_stand : public SpellScriptLoader
class spell_warr_last_stand_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_warr_last_stand_SpellScript)
+ PrepareSpellScript(spell_warr_last_stand_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -492,7 +492,7 @@ class spell_warr_overpower : public SpellScriptLoader
class spell_warr_overpower_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_warr_overpower_SpellScript)
+ PrepareSpellScript(spell_warr_overpower_SpellScript);
void HandleEffect(SpellEffIndex /*effIndex*/)
{
@@ -530,7 +530,7 @@ class spell_warr_rend : public SpellScriptLoader
class spell_warr_rend_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_warr_rend_AuraScript)
+ PrepareAuraScript(spell_warr_rend_AuraScript);
void CalculateAmount(AuraEffect const* aurEff, int32& amount, bool& canBeRecalculated)
{
@@ -576,7 +576,7 @@ class spell_warr_retaliation : public SpellScriptLoader
class spell_warr_retaliation_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_warr_retaliation_AuraScript)
+ PrepareAuraScript(spell_warr_retaliation_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -618,7 +618,7 @@ class spell_warr_shattering_throw : public SpellScriptLoader
class spell_warr_shattering_throw_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_warr_shattering_throw_SpellScript)
+ PrepareSpellScript(spell_warr_shattering_throw_SpellScript);
void HandleScript(SpellEffIndex effIndex)
{
@@ -649,7 +649,7 @@ class spell_warr_slam : public SpellScriptLoader
class spell_warr_slam_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_warr_slam_SpellScript)
+ PrepareSpellScript(spell_warr_slam_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -684,7 +684,7 @@ class spell_warr_sweeping_strikes : public SpellScriptLoader
class spell_warr_sweeping_strikes_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_warr_sweeping_strikes_AuraScript)
+ PrepareAuraScript(spell_warr_sweeping_strikes_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -748,7 +748,7 @@ class spell_warr_vigilance : public SpellScriptLoader
class spell_warr_vigilance_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_warr_vigilance_AuraScript)
+ PrepareAuraScript(spell_warr_vigilance_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -842,7 +842,7 @@ class spell_warr_vigilance_trigger : public SpellScriptLoader
class spell_warr_vigilance_trigger_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_warr_vigilance_trigger_SpellScript)
+ PrepareSpellScript(spell_warr_vigilance_trigger_SpellScript);
void HandleScript(SpellEffIndex effIndex)
{
diff --git a/src/server/scripts/World/areatrigger_scripts.cpp b/src/server/scripts/World/areatrigger_scripts.cpp
index 73093037689..fb438c38efb 100644
--- a/src/server/scripts/World/areatrigger_scripts.cpp
+++ b/src/server/scripts/World/areatrigger_scripts.cpp
@@ -461,11 +461,11 @@ public:
if (player->GetQuestStatus(QUEST_THE_LONESOME_WATCHER) != QUEST_STATUS_INCOMPLETE)
return false;
- Creature* stormforgedMonitor = Creature::GetCreature(*player, stormforgedMonitorGUID);
+ Creature* stormforgedMonitor = ObjectAccessor::GetCreature(*player, stormforgedMonitorGUID);
if (stormforgedMonitor)
return false;
- Creature* stormforgedEradictor = Creature::GetCreature(*player, stormforgedEradictorGUID);
+ Creature* stormforgedEradictor = ObjectAccessor::GetCreature(*player, stormforgedEradictorGUID);
if (stormforgedEradictor)
return false;
diff --git a/src/server/scripts/World/boss_emerald_dragons.cpp b/src/server/scripts/World/boss_emerald_dragons.cpp
index 900c43d329f..950b4cd10e9 100644
--- a/src/server/scripts/World/boss_emerald_dragons.cpp
+++ b/src/server/scripts/World/boss_emerald_dragons.cpp
@@ -687,7 +687,7 @@ class spell_dream_fog_sleep : public SpellScriptLoader
class spell_dream_fog_sleep_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_dream_fog_sleep_SpellScript)
+ PrepareSpellScript(spell_dream_fog_sleep_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets)
{
@@ -731,7 +731,7 @@ class spell_mark_of_nature : public SpellScriptLoader
class spell_mark_of_nature_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_mark_of_nature_SpellScript)
+ PrepareSpellScript(spell_mark_of_nature_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
diff --git a/src/server/scripts/World/guards.cpp b/src/server/scripts/World/guards.cpp
index 416cab8efcd..21a81d37868 100644
--- a/src/server/scripts/World/guards.cpp
+++ b/src/server/scripts/World/guards.cpp
@@ -282,7 +282,7 @@ public:
{
if (exileTimer <= diff)
{
- if (Unit* temp = Unit::GetUnit(*me, playerGUID))
+ if (Unit* temp = ObjectAccessor::GetUnit(*me, playerGUID))
{
temp->CastSpell(temp, SPELL_EXILE, true);
temp->CastSpell(temp, SPELL_BANISH_TELEPORT, true);
@@ -347,7 +347,7 @@ public:
{
if (exileTimer <= diff)
{
- if (Unit* temp = Unit::GetUnit(*me, playerGUID))
+ if (Unit* temp = ObjectAccessor::GetUnit(*me, playerGUID))
{
temp->CastSpell(temp, SPELL_EXILE, true);
temp->CastSpell(temp, SPELL_BANISH_TELEPORT, true);
diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
index 891ffd83628..bb7da1b7042 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -175,7 +175,7 @@ public:
Creature* GetSummonedGuard()
{
- Creature* creature = Unit::GetCreature(*me, SpawnedGUID);
+ Creature* creature = ObjectAccessor::GetCreature(*me, SpawnedGUID);
if (creature && creature->IsAlive())
return creature;
@@ -671,7 +671,7 @@ public:
std::list<uint64>::const_iterator itr;
for (itr = Patients.begin(); itr != Patients.end(); ++itr)
{
- if (Creature* patient = Unit::GetCreature((*me), *itr))
+ if (Creature* patient = ObjectAccessor::GetCreature((*me), *itr))
patient->setDeathState(JUST_DIED);
}
}
@@ -768,7 +768,7 @@ public:
if (player->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE)
if (DoctorGUID)
- if (Creature* doctor = Unit::GetCreature(*me, DoctorGUID))
+ if (Creature* doctor = ObjectAccessor::GetCreature(*me, DoctorGUID))
CAST_AI(npc_doctor::npc_doctorAI, doctor->AI())->PatientSaved(me, player, Coord);
//make not selectable
@@ -814,7 +814,7 @@ public:
me->SetFlag(UNIT_DYNAMIC_FLAGS, 32);
if (DoctorGUID)
- if (Creature* doctor = Unit::GetCreature((*me), DoctorGUID))
+ if (Creature* doctor = ObjectAccessor::GetCreature((*me), DoctorGUID))
CAST_AI(npc_doctor::npc_doctorAI, doctor->AI())->PatientDied(Coord);
}
}
@@ -1064,7 +1064,7 @@ public:
{
if (RunAwayTimer <= diff)
{
- if (Unit* unit = Unit::GetUnit(*me, CasterGUID))
+ if (Unit* unit = ObjectAccessor::GetUnit(*me, CasterGUID))
{
switch (me->GetEntry())
{
@@ -2319,7 +2319,7 @@ public:
{
if (jumpTimer <= diff)
{
- if (Unit* rabbit = Unit::GetUnit(*me, rabbitGUID))
+ if (Unit* rabbit = ObjectAccessor::GetUnit(*me, rabbitGUID))
DoCast(rabbit, SPELL_SPRING_RABBIT_JUMP);
jumpTimer = urand(5000, 10000);
} else jumpTimer -= diff;
diff --git a/src/server/shared/Logging/Log.cpp b/src/server/shared/Logging/Log.cpp
index bc002668b3b..dc9bda62bfb 100644
--- a/src/server/shared/Logging/Log.cpp
+++ b/src/server/shared/Logging/Log.cpp
@@ -250,13 +250,13 @@ void Log::ReadLoggersFromConfig()
AppenderConsole* appender = new AppenderConsole(NextAppenderId(), "Console", LOG_LEVEL_DEBUG, APPENDER_FLAGS_NONE);
appenders[appender->getId()] = appender;
- Logger& rootLogger = loggers[LOGGER_ROOT];
- rootLogger.Create(LOGGER_ROOT, LOG_LEVEL_ERROR);
- rootLogger.addAppender(appender->getId(), appender);
+ Logger& logger = loggers[LOGGER_ROOT];
+ logger.Create(LOGGER_ROOT, LOG_LEVEL_ERROR);
+ logger.addAppender(appender->getId(), appender);
- Logger& serverLogger = loggers["server"];
- serverLogger.Create("server", LOG_LEVEL_INFO);
- serverLogger.addAppender(appender->getId(), appender);
+ logger = loggers["server"];
+ logger.Create("server", LOG_LEVEL_ERROR);
+ logger.addAppender(appender->getId(), appender);
}
}
@@ -267,7 +267,7 @@ void Log::vlog(std::string const& filter, LogLevel level, char const* str, va_li
write(new LogMessage(level, filter, text));
}
-void Log::write(LogMessage* msg)
+void Log::write(LogMessage* msg) const
{
Logger const* logger = GetLoggerByType(msg->type);
msg->text.append("\n");
@@ -376,7 +376,6 @@ void Log::Close()
delete worker;
worker = NULL;
loggers.clear();
- cachedLoggers.clear();
for (AppenderMap::iterator it = appenders.begin(); it != appenders.end(); ++it)
{
delete it->second;
diff --git a/src/server/shared/Logging/Log.h b/src/server/shared/Logging/Log.h
index 5fa638e2f40..a118e6e8773 100644
--- a/src/server/shared/Logging/Log.h
+++ b/src/server/shared/Logging/Log.h
@@ -35,7 +35,6 @@ class Log
friend class ACE_Singleton<Log, ACE_Thread_Mutex>;
typedef std::unordered_map<std::string, Logger> LoggerMap;
- typedef std::unordered_map<std::string, Logger const*> CachedLoggerContainer;
private:
Log();
@@ -44,7 +43,7 @@ class Log
public:
void LoadFromConfig();
void Close();
- bool ShouldLog(std::string const& type, LogLevel level);
+ bool ShouldLog(std::string const& type, LogLevel level) const;
bool SetLogLevel(std::string const& name, char const* level, bool isLogger = true);
void outMessage(std::string const& f, LogLevel level, char const* str, ...) ATTR_PRINTF(4, 5);
@@ -57,9 +56,9 @@ class Log
private:
static std::string GetTimestampStr();
void vlog(std::string const& f, LogLevel level, char const* str, va_list argptr);
- void write(LogMessage* msg);
+ void write(LogMessage* msg) const;
- Logger const* GetLoggerByType(std::string const& type);
+ Logger const* GetLoggerByType(std::string const& type) const;
Appender* GetAppenderByName(std::string const& name);
uint8 NextAppenderId();
void CreateAppenderFromConfig(std::string const& name);
@@ -69,7 +68,6 @@ class Log
AppenderMap appenders;
LoggerMap loggers;
- CachedLoggerContainer cachedLoggers;
uint8 AppenderId;
std::string m_logsDir;
@@ -78,37 +76,29 @@ class Log
LogWorker* worker;
};
-inline Logger const* Log::GetLoggerByType(std::string const& originalType)
+inline Logger const* Log::GetLoggerByType(std::string const& type) const
{
- // Check if already cached
- CachedLoggerContainer::const_iterator itCached = cachedLoggers.find(originalType);
- if (itCached != cachedLoggers.end())
- return itCached->second;
-
- Logger const* logger = NULL;
- std::string type(originalType);
-
- do
- {
- // Search for the logger "type.subtype"
- LoggerMap::const_iterator it = loggers.find(type);
- if (it == loggers.end())
- {
- // Search for the logger "type", if our logger contains '.', otherwise search for LOGGER_ROOT
- size_t found = type.find_last_of(".");
- type = found != std::string::npos ? type.substr(0, found) : LOGGER_ROOT;
- }
- else
- logger = &(it->second);
- }
- while (!logger);
-
- cachedLoggers[originalType] = logger;
- return logger;
+ LoggerMap::const_iterator it = loggers.find(type);
+ if (it != loggers.end())
+ return &(it->second);
+
+ if (type == LOGGER_ROOT)
+ return NULL;
+
+ std::string parentLogger = LOGGER_ROOT;
+ size_t found = type.find_last_of(".");
+ if (found != std::string::npos)
+ parentLogger = type.substr(0,found);
+
+ return GetLoggerByType(parentLogger);
}
-inline bool Log::ShouldLog(std::string const& type, LogLevel level)
+inline bool Log::ShouldLog(std::string const& type, LogLevel level) const
{
+ // TODO: Use cache to store "Type.sub1.sub2": "Type" equivalence, should
+ // Speed up in cases where requesting "Type.sub1.sub2" but only configured
+ // Logger "Type"
+
Logger const* logger = GetLoggerByType(type);
if (!logger)
return false;