aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/Commands/cs_account.cpp6
-rw-r--r--src/server/scripts/Commands/cs_achievement.cpp3
-rw-r--r--src/server/scripts/Commands/cs_disable.cpp5
-rw-r--r--src/server/scripts/Commands/cs_misc.cpp22
-rw-r--r--src/server/scripts/Commands/cs_reload.cpp22
-rw-r--r--src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp9
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp7
-rw-r--r--src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp29
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp61
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp44
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp12
-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/ZulGurub/boss_arlokk.cpp14
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp33
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp38
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp27
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp45
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp31
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp14
-rw-r--r--src/server/scripts/EasternKingdoms/eversong_woods.cpp11
-rw-r--r--src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp14
-rw-r--r--src/server/scripts/EasternKingdoms/redridge_mountains.cpp20
-rw-r--r--src/server/scripts/EasternKingdoms/silverpine_forest.cpp53
-rw-r--r--src/server/scripts/EasternKingdoms/stormwind_city.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/tirisfal_glades.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/western_plaguelands.cpp36
-rw-r--r--src/server/scripts/Events/CMakeLists.txt1
-rw-r--r--src/server/scripts/Events/event.cpp23
-rw-r--r--src/server/scripts/Examples/example_creature.cpp37
-rw-r--r--src/server/scripts/Examples/example_escort.cpp49
-rw-r--r--src/server/scripts/Examples/example_gossip_codebox.cpp16
-rw-r--r--src/server/scripts/Examples/example_misc.cpp7
-rw-r--r--src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp8
-rw-r--r--src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp20
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp36
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.h34
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp22
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp10
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp42
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp18
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp32
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp647
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp23
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp21
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp19
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp59
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp40
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp40
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp36
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp207
-rw-r--r--src/server/scripts/Kalimdor/RazorfenDowns/boss_amnennar_the_coldbringer.cpp33
-rw-r--r--src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp53
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp2
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp4
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp32
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp24
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp25
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp25
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp33
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp296
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp141
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h52
-rw-r--r--src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp93
-rw-r--r--src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp16
-rw-r--r--src/server/scripts/Kalimdor/ashenvale.cpp40
-rw-r--r--src/server/scripts/Kalimdor/azshara.cpp18
-rw-r--r--src/server/scripts/Kalimdor/azuremyst_isle.cpp124
-rw-r--r--src/server/scripts/Kalimdor/bloodmyst_isle.cpp4
-rw-r--r--src/server/scripts/Kalimdor/boss_azuregos.cpp4
-rw-r--r--src/server/scripts/Kalimdor/darkshore.cpp93
-rw-r--r--src/server/scripts/Kalimdor/desolace.cpp7
-rw-r--r--src/server/scripts/Kalimdor/durotar.cpp4
-rw-r--r--src/server/scripts/Kalimdor/dustwallow_marsh.cpp93
-rw-r--r--src/server/scripts/Kalimdor/feralas.cpp22
-rw-r--r--src/server/scripts/Kalimdor/moonglade.cpp81
-rw-r--r--src/server/scripts/Kalimdor/mulgore.cpp13
-rw-r--r--src/server/scripts/Kalimdor/silithus.cpp174
-rw-r--r--src/server/scripts/Kalimdor/stonetalon_mountains.cpp12
-rw-r--r--src/server/scripts/Kalimdor/tanaris.cpp63
-rw-r--r--src/server/scripts/Kalimdor/teldrassil.cpp8
-rw-r--r--src/server/scripts/Kalimdor/the_barrens.cpp85
-rw-r--r--src/server/scripts/Kalimdor/thousand_needles.cpp34
-rw-r--r--src/server/scripts/Kalimdor/ungoro_crater.cpp87
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp23
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp25
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp119
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp30
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp6
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp12
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.h8
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp117
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp0
-rw-r--r--src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp19
-rw-r--r--src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp23
-rw-r--r--src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp20
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp21
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp78
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp58
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp19
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp18
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp262
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp39
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp106
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp72
-rw-r--r--src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp28
-rw-r--r--src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp26
-rw-r--r--src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp24
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp3
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp0
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp3
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp0
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp17
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp20
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp40
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp16
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp31
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp59
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_noth.cpp38
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp21
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp588
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp51
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp16
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp20
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp23
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp26
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp25
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp15
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp49
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp39
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp14
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp19
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp14
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp196
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp453
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp51
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp85
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp202
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp45
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp47
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp38
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp113
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp3
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp51
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp121
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp45
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp12
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp38
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h34
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp27
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp40
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp13
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp31
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp25
-rw-r--r--src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp7
-rw-r--r--src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp14
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp23
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_erekem.cpp20
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp28
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp51
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp20
-rw-r--r--src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp5
-rw-r--r--src/server/scripts/Northrend/VioletHold/violet_hold.cpp4
-rw-r--r--src/server/scripts/Northrend/borean_tundra.cpp713
-rw-r--r--src/server/scripts/Northrend/grizzly_hills.cpp77
-rw-r--r--src/server/scripts/Northrend/icecrown.cpp373
-rw-r--r--src/server/scripts/Northrend/sholazar_basin.cpp128
-rw-r--r--src/server/scripts/Northrend/storm_peaks.cpp14
-rw-r--r--src/server/scripts/Northrend/zuldrak.cpp50
-rw-r--r--[-rwxr-xr-x]src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/OutdoorPvP/OutdoorPvPEP.h0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/OutdoorPvP/OutdoorPvPHP.h0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/OutdoorPvP/OutdoorPvPNA.h0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/OutdoorPvP/OutdoorPvPSI.h0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/OutdoorPvP/OutdoorPvPTF.h0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/OutdoorPvP/OutdoorPvPZM.h0
-rw-r--r--src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp57
-rw-r--r--src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp23
-rw-r--r--src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp34
-rw-r--r--src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp49
-rw-r--r--src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp55
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp21
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp53
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp58
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp17
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp63
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp62
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp147
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp25
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_supremus.cpp59
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp61
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp28
-rw-r--r--src/server/scripts/Outland/BlackTemple/illidari_council.cpp158
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp129
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp92
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp89
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp104
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp68
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp30
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp37
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp38
-rw-r--r--src/server/scripts/Outland/GruulsLair/boss_gruul.cpp26
-rw-r--r--src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp88
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp4
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp23
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp21
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp26
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp35
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp27
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp50
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp51
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp100
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp15
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp30
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp97
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp19
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp24
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp22
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp26
-rw-r--r--src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp31
-rw-r--r--src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp18
-rw-r--r--src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp4
-rw-r--r--src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp18
-rw-r--r--src/server/scripts/Outland/blades_edge_mountains.cpp25
-rw-r--r--src/server/scripts/Outland/hellfire_peninsula.cpp51
-rw-r--r--src/server/scripts/Outland/nagrand.cpp40
-rw-r--r--src/server/scripts/Outland/netherstorm.cpp99
-rw-r--r--src/server/scripts/Outland/shadowmoon_valley.cpp159
-rw-r--r--src/server/scripts/Outland/shattrath_city.cpp127
-rw-r--r--src/server/scripts/Outland/terokkar_forest.cpp36
-rw-r--r--src/server/scripts/Outland/zangarmarsh.cpp89
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp235
-rw-r--r--src/server/scripts/Spells/spell_holiday.cpp234
-rw-r--r--src/server/scripts/Spells/spell_hunter.cpp31
-rw-r--r--src/server/scripts/Spells/spell_priest.cpp14
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp2
-rw-r--r--[-rwxr-xr-x]src/server/scripts/World/achievement_scripts.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/World/chat_log.cpp0
-rw-r--r--src/server/scripts/World/guards.cpp6
-rw-r--r--src/server/scripts/World/npc_professions.cpp4
-rw-r--r--src/server/scripts/World/npcs_special.cpp165
266 files changed, 6676 insertions, 6299 deletions
diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp
index 9269bbb07ee..a57b06a8ab0 100644
--- a/src/server/scripts/Commands/cs_account.cpp
+++ b/src/server/scripts/Commands/cs_account.cpp
@@ -306,6 +306,9 @@ public:
{
handler->SendSysMessage(LANG_COMMAND_WRONGOLDPASSWORD);
handler->SetSentErrorMessage(true);
+ sLog->outInfo(LOG_FILTER_CHARACTER, "Account: %u (IP: %s) Character:[%s] (GUID: %u) Tried to change password.",
+ handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
+ handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow());
return false;
}
@@ -321,6 +324,9 @@ public:
{
case AOR_OK:
handler->SendSysMessage(LANG_COMMAND_PASSWORD);
+ sLog->outInfo(LOG_FILTER_CHARACTER, "Account: %u (IP: %s) Character:[%s] (GUID: %u) Changed Password.",
+ handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
+ handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow());
break;
case AOR_PASS_TOO_LONG:
handler->SendSysMessage(LANG_PASSWORD_TOO_LONG);
diff --git a/src/server/scripts/Commands/cs_achievement.cpp b/src/server/scripts/Commands/cs_achievement.cpp
index 9f5c861c52f..9a84a4c4cbc 100644
--- a/src/server/scripts/Commands/cs_achievement.cpp
+++ b/src/server/scripts/Commands/cs_achievement.cpp
@@ -22,6 +22,7 @@ Comment: All achievement related commands
Category: commandscripts
EndScriptData */
+#include "AchievementMgr.h"
#include "Chat.h"
#include "Language.h"
#include "Player.h"
@@ -69,7 +70,7 @@ public:
return false;
}
- if (AchievementEntry const* achievementEntry = sAchievementStore.LookupEntry(achievementId))
+ if (AchievementEntry const* achievementEntry = sAchievementMgr->GetAchievement(achievementId))
target->CompletedAchievement(achievementEntry);
return true;
diff --git a/src/server/scripts/Commands/cs_disable.cpp b/src/server/scripts/Commands/cs_disable.cpp
index 73ed341a21c..cf0b1f08e53 100644
--- a/src/server/scripts/Commands/cs_disable.cpp
+++ b/src/server/scripts/Commands/cs_disable.cpp
@@ -22,8 +22,9 @@ Comment: All disable related commands
Category: commandscripts
EndScriptData */
-#include "Chat.h"
#include "DisableMgr.h"
+#include "AchievementMgr.h"
+#include "Chat.h"
#include "Language.h"
#include "ObjectMgr.h"
#include "OutdoorPvP.h"
@@ -140,7 +141,7 @@ public:
}
case DISABLE_TYPE_ACHIEVEMENT_CRITERIA:
{
- if (!sAchievementCriteriaStore.LookupEntry(entry))
+ if (!sAchievementMgr->GetAchievementCriteria(entry))
{
handler->PSendSysMessage(LANG_COMMAND_NO_ACHIEVEMENT_CRITERIA_FOUND);
handler->SetSentErrorMessage(true);
diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp
index 5e54778b14a..c701c4f350c 100644
--- a/src/server/scripts/Commands/cs_misc.cpp
+++ b/src/server/scripts/Commands/cs_misc.cpp
@@ -937,16 +937,9 @@ public:
//No args required for players
if (handler->GetSession() && AccountMgr::IsPlayerAccount(handler->GetSession()->GetSecurity()))
{
- Player* player = handler->GetSession()->GetPlayer();
- if (player->isInFlight() || player->isInCombat())
- {
- handler->SendSysMessage(LANG_CANT_DO_NOW);
- handler->SetSentErrorMessage(true);
- return false;
- }
-
- //7355: "Stuck"
- player->CastSpell(player, 7355, false);
+ // 7355: "Stuck"
+ if (Player* player = handler->GetSession()->GetPlayer())
+ player->CastSpell(player, 7355, false);
return true;
}
@@ -967,8 +960,13 @@ public:
if (player->isInFlight() || player->isInCombat())
{
- handler->SendSysMessage(LANG_CANT_DO_NOW);
- handler->SetSentErrorMessage(true);
+ SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(7355);
+ if (!spellInfo)
+ return false;
+
+ if (Player* caster = handler->GetSession()->GetPlayer())
+ Spell::SendCastResult(caster, spellInfo, 0, SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW);
+
return false;
}
diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp
index c2791c815ad..5b5608f9a26 100644
--- a/src/server/scripts/Commands/cs_reload.cpp
+++ b/src/server/scripts/Commands/cs_reload.cpp
@@ -128,7 +128,6 @@ public:
{ "prospecting_loot_template", SEC_ADMINISTRATOR, true, &HandleReloadLootTemplatesProspectingCommand, "", NULL },
{ "quest_end_scripts", SEC_ADMINISTRATOR, true, &HandleReloadQuestEndScriptsCommand, "", NULL },
{ "quest_poi", SEC_ADMINISTRATOR, true, &HandleReloadQuestPOICommand, "", NULL },
- { "quest_start_scripts", SEC_ADMINISTRATOR, true, &HandleReloadQuestStartScriptsCommand, "", NULL },
{ "quest_template", SEC_ADMINISTRATOR, true, &HandleReloadQuestTemplateCommand, "", NULL },
{ "reference_loot_template", SEC_ADMINISTRATOR, true, &HandleReloadLootTemplatesReferenceCommand, "", NULL },
{ "reserved_name", SEC_ADMINISTRATOR, true, &HandleReloadReservedNameCommand, "", NULL },
@@ -265,7 +264,6 @@ public:
HandleReloadGameObjectScriptsCommand(handler, "a");
HandleReloadEventScriptsCommand(handler, "a");
HandleReloadQuestEndScriptsCommand(handler, "a");
- HandleReloadQuestStartScriptsCommand(handler, "a");
HandleReloadSpellScriptsCommand(handler, "a");
handler->SendGlobalGMSysMessage("DB tables `*_scripts` reloaded.");
HandleReloadDbScriptStringCommand(handler, "a");
@@ -1065,26 +1063,6 @@ public:
return true;
}
- static bool HandleReloadQuestStartScriptsCommand(ChatHandler* handler, const char* args)
- {
- if (sScriptMgr->IsScriptScheduled())
- {
- handler->SendSysMessage("DB scripts used currently, please attempt reload later.");
- handler->SetSentErrorMessage(true);
- return false;
- }
-
- if (*args != 'a')
- sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Scripts from `quest_start_scripts`...");
-
- sObjectMgr->LoadQuestStartScripts();
-
- if (*args != 'a')
- handler->SendGlobalGMSysMessage("DB table `quest_start_scripts` reloaded.");
-
- return true;
- }
-
static bool HandleReloadSpellScriptsCommand(ChatHandler* handler, const char* args)
{
if (sScriptMgr->IsScriptScheduled())
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp
index 577516383b2..f4a9fcb5060 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp
@@ -78,7 +78,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void UpdateAI(const uint32 diff)
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
index 73fefe210df..4a08801c972 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
@@ -32,10 +32,11 @@ enum Midnight
SAY_MIDNIGHT_KILL = 0,
SAY_APPEAR = 1,
SAY_MOUNT = 2,
- SAY_KILL = 3,
- SAY_DISARMED = 4,
- SAY_DEATH = 5,
- SAY_RANDOM = 6,
+
+ SAY_KILL = 0,
+ SAY_DISARMED = 1,
+ SAY_DEATH = 2,
+ SAY_RANDOM = 3,
SPELL_SHADOWCLEAVE = 29832,
SPELL_INTANGIBLE_PRESENCE = 29833,
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
index 660b8f6c460..1fa5cc9c5af 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
@@ -226,7 +226,6 @@ public:
if (text)
CreatureAI::Talk(text);
-
}
void PrepareEncounter()
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
index 22a26fd4389..84d0cd6b4c4 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
@@ -178,7 +178,7 @@ public:
{
if (!instance)
return;
-
+
instance->SetData(DATA_KAELTHAS_EVENT, IN_PROGRESS);
}
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
index 4d9bd1f2192..dcf70b36df6 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
@@ -113,7 +113,7 @@ public:
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))
+ if (Creature* creature = Unit::GetCreature(*me, *itr))
{
if (!creature->isAlive())
creature->Respawn(); // Let the core handle setting death state, etc.
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp
index c8bf50c0bcc..c142a0c30d7 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp
@@ -150,7 +150,7 @@ public:
HandleGameObject(SelinEncounterDoorGUID, false);
else if (data == NOT_STARTED)
HandleGameObject(SelinEncounterDoorGUID, true);
-
+
Encounter[0] = data;
break;
case DATA_VEXALLUS_EVENT:
@@ -184,7 +184,7 @@ public:
StatuesState = data;
break;
}
-
+
SaveToDB();
}
@@ -245,7 +245,7 @@ public:
OUT_SAVE_INST_DATA_COMPLETE;
return saveStream.str();
}
-
+
void Load(const char* str)
{
if (!str)
@@ -257,7 +257,7 @@ public:
OUT_LOAD_INST_DATA(str);
std::istringstream loadStream(str);
-
+
for (uint32 i = 0; i < MAX_ENCOUNTER; ++i)
{
uint32 tmpState;
@@ -272,7 +272,7 @@ public:
OUT_LOAD_INST_DATA_COMPLETE;
}
-
+
uint64 GetData64(uint32 identifier) const
{
switch (identifier)
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp
index f792b861c99..85a54398511 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp
+++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp
@@ -28,7 +28,10 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "molten_core.h"
-#define EMOTE_SERVICE -1409000
+enum Emotes
+{
+ EMOTE_SERVICE = 0
+};
enum Spells
{
@@ -76,7 +79,7 @@ class boss_baron_geddon : public CreatureScript
{
me->InterruptNonMeleeSpells(true);
DoCast(me, SPELL_ARMAGEDDON);
- DoScriptText(EMOTE_SERVICE, me);
+ Talk(EMOTE_SERVICE);
return;
}
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp
index 65a630a58f7..42952580d54 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp
+++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp
@@ -30,7 +30,7 @@ EndScriptData */
enum Texts
{
- EMOTE_FRENZY = -1409001,
+ EMOTE_FRENZY = 0
};
enum Spells
@@ -88,7 +88,7 @@ class boss_magmadar : public CreatureScript
switch (eventId)
{
case EVENT_FRENZY:
- DoScriptText(EMOTE_FRENZY, me);
+ Talk(EMOTE_FRENZY);
DoCast(me, SPELL_FRENZY);
events.ScheduleEvent(EVENT_FRENZY, 15000);
break;
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp
index c7d6b31d2ea..043e5b16330 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp
+++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp
@@ -32,17 +32,14 @@ EndScriptData */
enum Texts
{
- SAY_AGGRO = -1409003,
- SAY_SPAWN = -1409004,
- SAY_SLAY = -1409005,
- SAY_SPECIAL = -1409006,
- SAY_DEFEAT = -1409007,
-
- SAY_SUMMON_MAJ = -1409008,
- SAY_ARRIVAL1_RAG = -1409009,
- SAY_ARRIVAL2_MAJ = -1409010,
- SAY_ARRIVAL3_RAG = -1409011,
- SAY_ARRIVAL5_RAG = -1409012,
+ SAY_AGGRO = 0,
+ SAY_SPAWN = 1,
+ SAY_SLAY = 2,
+ SAY_SPECIAL = 3,
+ SAY_DEFEAT = 4,
+
+ SAY_SUMMON_MAJ = 5,
+ SAY_ARRIVAL2_MAJ = 6
};
enum Spells
@@ -84,13 +81,13 @@ class boss_majordomo : public CreatureScript
void KilledUnit(Unit* /*victim*/)
{
if (urand(0, 99) < 25)
- DoScriptText(SAY_SLAY, me);
+ Talk(SAY_SLAY);
}
void EnterCombat(Unit* who)
{
BossAI::EnterCombat(who);
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
events.ScheduleEvent(EVENT_MAGIC_REFLECTION, 30000);
events.ScheduleEvent(EVENT_DAMAGE_REFLECTION, 15000);
events.ScheduleEvent(EVENT_BLAST_WAVE, 10000);
@@ -111,7 +108,7 @@ class boss_majordomo : public CreatureScript
instance->UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, me->GetEntry(), me);
me->setFaction(35);
me->AI()->EnterEvadeMode();
- DoScriptText(SAY_DEFEAT, me);
+ Talk(SAY_DEFEAT);
_JustDied();
events.ScheduleEvent(EVENT_OUTRO_1, 32000);
return;
@@ -168,7 +165,7 @@ class boss_majordomo : public CreatureScript
instance->instance->SummonCreature(NPC_RAGNAROS, RagnarosSummonPos);
break;
case EVENT_OUTRO_3:
- DoScriptText(SAY_ARRIVAL2_MAJ, me);
+ Talk(SAY_ARRIVAL2_MAJ);
break;
default:
break;
@@ -182,7 +179,7 @@ class boss_majordomo : public CreatureScript
if (action == ACTION_START_RAGNAROS)
{
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
- DoScriptText(SAY_SUMMON_MAJ, me);
+ Talk(SAY_SUMMON_MAJ);
events.ScheduleEvent(EVENT_OUTRO_2, 8000);
events.ScheduleEvent(EVENT_OUTRO_3, 24000);
}
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
index 0cb2bd7f7bc..4a29a7d929b 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
@@ -25,6 +25,7 @@
#include "PassiveAI.h"
#include "Player.h"
#include "SpellInfo.h"
+#include "CreatureTextMgr.h"
/*######
##Quest 12848
@@ -32,7 +33,7 @@
#define GCD_CAST 1
-enum eDeathKnightSpells
+enum UnworthyInitiate
{
SPELL_SOUL_PRISON_CHAIN_SELF = 54612,
SPELL_SOUL_PRISON_CHAIN = 54613,
@@ -41,25 +42,24 @@ enum eDeathKnightSpells
SPELL_ICY_TOUCH = 52372,
SPELL_PLAGUE_STRIKE = 52373,
SPELL_BLOOD_STRIKE = 52374,
- SPELL_DEATH_COIL = 52375
-};
+ SPELL_DEATH_COIL = 52375,
-#define EVENT_ICY_TOUCH 1
-#define EVENT_PLAGUE_STRIKE 2
-#define EVENT_BLOOD_STRIKE 3
-#define EVENT_DEATH_COIL 4
+ SAY_EVENT_START = 0,
+ SAY_EVENT_ATTACK = 1,
-//used by 29519, 29520, 29565, 29566, 29567 but signed for 29519
-int32 say_event_start[8] =
-{
- -1609000, -1609001, -1609002, -1609003,
- -1609004, -1609005, -1609006, -1609007
+ EVENT_ICY_TOUCH = 1,
+ EVENT_PLAGUE_STRIKE = 2,
+ EVENT_BLOOD_STRIKE = 3,
+ EVENT_DEATH_COIL = 4
};
-int32 say_event_attack[9] =
+enum UnworthyInitiatePhase
{
- -1609008, -1609009, -1609010, -1609011, -1609012,
- -1609013, -1609014, -1609015, -1609016
+ PHASE_CHAINED,
+ PHASE_TO_EQUIP,
+ PHASE_EQUIPING,
+ PHASE_TO_ATTACK,
+ PHASE_ATTACKING,
};
uint32 acherus_soul_prison[12] =
@@ -87,15 +87,6 @@ uint32 acherus_unworthy_initiate[5] =
29567
};
-enum UnworthyInitiatePhase
-{
- PHASE_CHAINED,
- PHASE_TO_EQUIP,
- PHASE_EQUIPING,
- PHASE_TO_ATTACK,
- PHASE_ATTACKING,
-};
-
class npc_unworthy_initiate : public CreatureScript
{
public:
@@ -155,7 +146,7 @@ public:
me->CastSpell(me, SPELL_DK_INITIATE_VISUAL, true);
if (Player* starter = Unit::GetPlayer(*me, playerGUID))
- DoScriptText(say_event_attack[rand()%9], me, starter);
+ sCreatureTextMgr->SendChat(me, SAY_EVENT_ATTACK, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, starter);
phase = PHASE_TO_ATTACK;
}
@@ -174,7 +165,7 @@ public:
anchor->GetContactPoint(me, anchorX, anchorY, z, 1.0f);
playerGUID = target->GetGUID();
- DoScriptText(say_event_start[rand()%8], me, target);
+ sCreatureTextMgr->SendChat(me, SAY_EVENT_START, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, target);
}
void UpdateAI(const uint32 diff)
@@ -341,15 +332,7 @@ public:
enum eDuelEnums
{
- SAY_DUEL_A = -1609080,
- SAY_DUEL_B = -1609081,
- SAY_DUEL_C = -1609082,
- SAY_DUEL_D = -1609083,
- SAY_DUEL_E = -1609084,
- SAY_DUEL_F = -1609085,
- SAY_DUEL_G = -1609086,
- SAY_DUEL_H = -1609087,
- SAY_DUEL_I = -1609088,
+ SAY_DUEL = 0,
SPELL_DUEL = 52996,
//SPELL_DUEL_TRIGGERED = 52990,
@@ -360,11 +343,6 @@ enum eDuelEnums
FACTION_HOSTILE = 2068
};
-int32 m_auiRandomSay[] =
-{
- SAY_DUEL_A, SAY_DUEL_B, SAY_DUEL_C, SAY_DUEL_D, SAY_DUEL_E, SAY_DUEL_F, SAY_DUEL_G, SAY_DUEL_H, SAY_DUEL_I
-};
-
class npc_death_knight_initiate : public CreatureScript
{
public:
@@ -389,8 +367,7 @@ public:
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15);
- int32 uiSayId = rand()% (sizeof(m_auiRandomSay)/sizeof(int32));
- DoScriptText(m_auiRandomSay[uiSayId], creature, player);
+ sCreatureTextMgr->SendChat(creature, SAY_EVENT_ATTACK, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, player);
player->CastSpell(creature, SPELL_DUEL, false);
player->CastSpell(player, SPELL_DUEL_FLAG, true);
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
index 78fc8d127b2..7ceb86dd980 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
@@ -20,6 +20,7 @@
#include "ScriptedEscortAI.h"
#include "Player.h"
#include "SpellInfo.h"
+#include "CreatureTextMgr.h"
//How to win friends and influence enemies
// texts signed for creature 28939 but used for 28939, 28940, 28610
@@ -30,22 +31,14 @@ enum win_friends
SAY_PERSUADED2 = 3,
SAY_PERSUADED3 = 4,
SAY_PERSUADED4 = 5,
- SAY_PERSUADED6 = 6,
+ SAY_PERSUADED5 = 6,
+ SAY_PERSUADED6 = 7,
+ SAY_PERSUADE_RAND = 8,
SPELL_PERSUASIVE_STRIKE = 52781,
SPELL_THREAT_PULSE = 58111,
QUEST_HOW_TO_WIN_FRIENDS = 12720,
};
-#define SAY_PERSUADED5 "LIES! The pain you are about to endure will be talked about for years to come!"
-
-#define SAY_PERSUADE1 "I'll tear the secrets from your soul! Tell me about the \"Crimson Dawn\" and your life may be spared!"
-#define SAY_PERSUADE2 "Tell me what you know about \"Crimson Dawn\" or the beatings will continue!"
-#define SAY_PERSUADE3 "I'm through being courteous with your kind, human! What is the \"Crimson Dawn\"?"
-#define SAY_PERSUADE4 "Is your life worth so little? Just tell me what I need to know about \"Crimson Dawn\" and I'll end your suffering quickly."
-#define SAY_PERSUADE5 "I can keep this up for a very long time, Scarlet dog! Tell me about the \"Crimson Dawn\"!"
-#define SAY_PERSUADE6 "What is the \"Crimson Dawn\"?"
-#define SAY_PERSUADE7 "\"Crimson Dawn\"! What is it! Speak!"
-
class npc_crusade_persuaded : public CreatureScript
{
public:
@@ -90,30 +83,7 @@ public:
me->SetReactState(REACT_PASSIVE);
DoCastAOE(SPELL_THREAT_PULSE, true);
- switch (urand(1, 7))
- {
- case 1:
- player->Say(SAY_PERSUADE1, LANG_UNIVERSAL);
- break;
- case 2:
- player->Say(SAY_PERSUADE2, LANG_UNIVERSAL);
- break;
- case 3:
- player->Say(SAY_PERSUADE3, LANG_UNIVERSAL);
- break;
- case 4:
- player->Say(SAY_PERSUADE4, LANG_UNIVERSAL);
- break;
- case 5:
- player->Say(SAY_PERSUADE5, LANG_UNIVERSAL);
- break;
- case 6:
- player->Say(SAY_PERSUADE6, LANG_UNIVERSAL);
- break;
- case 7:
- player->Say(SAY_PERSUADE7, LANG_UNIVERSAL);
- break;
- }
+ sCreatureTextMgr->SendChat(me, SAY_PERSUADE_RAND, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, player);
Talk(SAY_CRUSADER);
}
}
@@ -156,7 +126,7 @@ public:
break;
case 5:
- player->Say(SAY_PERSUADED5, LANG_UNIVERSAL);
+ sCreatureTextMgr->SendChat(me, SAY_PERSUADED5, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, player);
speechTimer = 8000;
break;
@@ -171,7 +141,7 @@ public:
++speechCounter;
DoCastAOE(SPELL_THREAT_PULSE, true);
- } else
+ } else
speechTimer -= diff;
return;
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
index 77c1e3bc066..8f410cf62bc 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
@@ -1135,7 +1135,7 @@ public:
case 49:
if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
- Talk(SAY_LIGHT_OF_DAWN54);
+ temp->AI()->Talk(SAY_LIGHT_OF_DAWN54);
JumpToNextStep(4000);
break;
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
index 78a5f3797d8..2ff3dcd5e32 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
@@ -34,7 +34,7 @@ EndScriptData */
//this texts are already used by 3975 and 3976
enum Says
{
- SAY_LOST_HEAD = 0,
+ SAY_LOST_HEAD = 0,
SAY_PLAYER_DEATH = 1,
SAY_ENTRANCE = 0,
diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp
index 5d9df239870..27a3aaa3fae 100644
--- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp
+++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp
@@ -33,8 +33,8 @@ EndScriptData */
enum eEnums
{
- SAY_BOSS_DIE_AD = 0,
- SAY_BOSS_DIE_AS = 0,
+ SAY_BOSS_DIE_AD = 4,
+ SAY_BOSS_DIE_AS = 3,
SAY_ARCHMAGE = 0,
NPC_ASH = 3850,
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp
index 467b532163b..5da38e21d2f 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp
@@ -83,12 +83,10 @@ public:
/*######
## mob_freed_soul
######*/
-
-//Possibly more of these quotes around.
-#define SAY_ZAPPED0 -1329000
-#define SAY_ZAPPED1 -1329001
-#define SAY_ZAPPED2 -1329002
-#define SAY_ZAPPED3 -1329003
+enum FreedSoul
+{
+ SAY_ZAPPED = 0
+};
class mob_freed_soul : public CreatureScript
{
@@ -106,7 +104,7 @@ public:
void Reset()
{
- DoScriptText(RAND(SAY_ZAPPED0, SAY_ZAPPED1, SAY_ZAPPED2, SAY_ZAPPED3), me);
+ Talk(SAY_ZAPPED);
}
void EnterCombat(Unit* /*who*/) {}
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
index c7db80c7f22..c2dc7123f6d 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
@@ -54,7 +54,7 @@ enum Spells
AURA_SPECTRAL_REALM = 46021,
AURA_SPECTRAL_INVISIBILITY = 44801,
AURA_DEMONIC_VISUAL = 44800,
-
+
SPELL_SPECTRAL_BLAST = 44869,
SPELL_TELEPORT_SPECTRAL = 46019,
SPELL_ARCANE_BUFFET = 45018,
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
index c2552963b0e..b32f9244034 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
@@ -34,7 +34,7 @@ EndScriptData */
enum Yells
{
SAY_KJ_OFFCOMBAT = 0,
-
+
SAY_KALECGOS_ENCOURAGE = 0,
SAY_KALECGOS_READY1 = 1,
SAY_KALECGOS_READY2 = 2,
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
index 17c3f5e8ff4..c5639a68860 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
@@ -29,9 +29,9 @@ EndScriptData */
enum eYells
{
- SAY_AGGRO = -1309011,
- SAY_FEAST_PANTHER = -1309012,
- SAY_DEATH = -1309013,
+ SAY_AGGRO = 0,
+ SAY_FEAST_PANTHER = 1,
+ SAY_DEATH = 2,
};
enum eSpells
@@ -106,7 +106,7 @@ class boss_arlokk : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void JustReachedHome()
@@ -120,7 +120,7 @@ class boss_arlokk : public CreatureScript
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
me->SetDisplayId(MODEL_ID_NORMAL);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
@@ -131,8 +131,8 @@ class boss_arlokk : public CreatureScript
void DoSummonPhanters()
{
- if (Unit* pMarkedTarget = Unit::GetUnit(*me, MarkedTargetGUID))
- DoScriptText(SAY_FEAST_PANTHER, me, pMarkedTarget);
+ if (MarkedTargetGUID)
+ Talk(SAY_FEAST_PANTHER, MarkedTargetGUID);
me->SummonCreature(NPC_ZULIAN_PROWLER, -11532.7998f, -1649.6734f, 41.4800f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
me->SummonCreature(NPC_ZULIAN_PROWLER, -11532.9970f, -1606.4840f, 41.2979f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp
index 6cb657f4cff..7d80de88beb 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp
@@ -27,23 +27,26 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "zulgurub.h"
-#define SAY_AGGRO -1309020
-#define SAY_FLEEING -1309021
-#define SAY_MINION_DESTROY -1309022 //where does it belong?
-#define SAY_PROTECT_ALTAR -1309023 //where does it belong?
+enum Hakkar
+{
+ SAY_AGGRO = 0,
+ SAY_FLEEING = 1,
+ SAY_MINION_DESTROY = 2, //where does it belong?
+ SAY_PROTECT_ALTAR = 3, //where does it belong?
-#define SPELL_BLOODSIPHON 24322
-#define SPELL_CORRUPTEDBLOOD 24328
-#define SPELL_CAUSEINSANITY 24327 //Not working disabled.
-#define SPELL_WILLOFHAKKAR 24178
-#define SPELL_ENRAGE 24318
+ SPELL_BLOODSIPHON = 24322,
+ SPELL_CORRUPTEDBLOOD = 24328,
+ SPELL_CAUSEINSANITY = 24327, //Not working disabled.
+ SPELL_WILLOFHAKKAR = 24178,
+ SPELL_ENRAGE = 24318,
// The Aspects of all High Priests
-#define SPELL_ASPECT_OF_JEKLIK 24687
-#define SPELL_ASPECT_OF_VENOXIS 24688
-#define SPELL_ASPECT_OF_MARLI 24686
-#define SPELL_ASPECT_OF_THEKAL 24689
-#define SPELL_ASPECT_OF_ARLOKK 24690
+ SPELL_ASPECT_OF_JEKLIK = 24687,
+ SPELL_ASPECT_OF_VENOXIS = 24688,
+ SPELL_ASPECT_OF_MARLI = 24686,
+ SPELL_ASPECT_OF_THEKAL = 24689,
+ SPELL_ASPECT_OF_ARLOKK = 24690
+};
class boss_hakkar : public CreatureScript
{
@@ -108,7 +111,7 @@ class boss_hakkar : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void UpdateAI(const uint32 diff)
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp
index 156ccab5eae..3a2da6fdba9 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp
@@ -27,22 +27,24 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "zulgurub.h"
-#define SAY_AGGRO -1309002
-#define SAY_RAIN_FIRE -1309003
-#define SAY_DEATH -1309004
-
-#define SPELL_CHARGE 22911
-#define SPELL_SONICBURST 23918
-#define SPELL_SCREECH 6605
-#define SPELL_SHADOW_WORD_PAIN 23952
-#define SPELL_MIND_FLAY 23953
-#define SPELL_CHAIN_MIND_FLAY 26044 //Right ID unknown. So disabled
-#define SPELL_GREATERHEAL 23954
-#define SPELL_BAT_FORM 23966
-
-// Batriders Spell
-
-#define SPELL_BOMB 40332 //Wrong ID but Magmadars bomb is not working...
+enum Jeklik
+{
+ SAY_AGGRO = 0,
+ SAY_RAIN_FIRE = 1,
+ SAY_DEATH = 2,
+
+ SPELL_CHARGE = 22911,
+ SPELL_SONICBURST = 23918,
+ SPELL_SCREECH = 6605,
+ SPELL_SHADOW_WORD_PAIN = 23952,
+ SPELL_MIND_FLAY = 23953,
+ SPELL_CHAIN_MIND_FLAY = 26044, //Right ID unknown. So disabled
+ SPELL_GREATERHEAL = 23954,
+ SPELL_BAT_FORM = 23966,
+
+ // Batriders Spell
+ SPELL_BOMB = 40332 //Wrong ID but Magmadars bomb is not working...
+};
class boss_jeklik : public CreatureScript
{
@@ -91,13 +93,13 @@ class boss_jeklik : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
DoCast(me, SPELL_BAT_FORM);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_JEKLIK, DONE);
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp
index f8d23947e9c..844a2b16800 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp
@@ -27,20 +27,23 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "zulgurub.h"
-#define SAY_AGGRO -1309014
+enum Jindo
+{
+ SAY_AGGRO = 1,
-#define SPELL_BRAINWASHTOTEM 24262
-#define SPELL_POWERFULLHEALINGWARD 24309 //We will not use this spell. We will summon a totem by script cause the spell totems will not cast.
-#define SPELL_HEX 24053
-#define SPELL_DELUSIONSOFJINDO 24306
-#define SPELL_SHADEOFJINDO 24308 //We will not use this spell. We will summon a shade by script.
+ SPELL_BRAINWASHTOTEM = 24262,
+ SPELL_POWERFULLHEALINGWARD = 24309, //We will not use this spell. We will summon a totem by script cause the spell totems will not cast.
+ SPELL_HEX = 24053,
+ SPELL_DELUSIONSOFJINDO = 24306,
+ SPELL_SHADEOFJINDO = 24308, //We will not use this spell. We will summon a shade by script.
-//Healing Ward Spell
-#define SPELL_HEAL 38588 //Totems are not working right. Right heal spell ID is 24311 but this spell is not casting...
+ //Healing Ward Spell
+ SPELL_HEAL = 38588, //Totems are not working right. Right heal spell ID is 24311 but this spell is not casting...
-//Shade of Jindo Spell
-#define SPELL_SHADOWSHOCK 19460
-#define SPELL_INVISIBLE 24699
+ //Shade of Jindo Spell
+ SPELL_SHADOWSHOCK = 19460,
+ SPELL_INVISIBLE = 24699
+};
class boss_jindo : public CreatureScript
{
@@ -72,7 +75,7 @@ class boss_jindo : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void UpdateAI(const uint32 diff)
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
index 32831eb047b..9f3aa315efa 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
@@ -27,25 +27,28 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "zulgurub.h"
-#define SAY_AGGRO -1309015
-#define SAY_DING_KILL -1309016
-#define SAY_GRATS_JINDO -1309017
-#define SAY_WATCH -1309018
-#define SAY_WATCH_WHISPER -1309019 //is this text for real? easter egg?
-
-#define SPELL_CHARGE 24408
-#define SPELL_CLEAVE 7160
-#define SPELL_FEAR 29321
-#define SPELL_WHIRLWIND 15589
-#define SPELL_MORTAL_STRIKE 16856
-#define SPELL_ENRAGE 24318
-#define SPELL_WATCH 24314
-#define SPELL_LEVEL_UP 24312
+enum Mandokir
+{
+ SAY_AGGRO = 0,
+ SAY_DING_KILL = 1,
+ SAY_WATCH = 2,
+ SAY_WATCH_WHISPER = 3, //is this text for real? easter egg?
+ SAY_GRATS_JINDO = 0,
+
+ SPELL_CHARGE = 24408,
+ SPELL_CLEAVE = 7160,
+ SPELL_FEAR = 29321,
+ SPELL_WHIRLWIND = 15589,
+ SPELL_MORTAL_STRIKE = 16856,
+ SPELL_ENRAGE = 24318,
+ SPELL_WATCH = 24314,
+ SPELL_LEVEL_UP = 24312,
//Ohgans Spells
-#define SPELL_SUNDERARMOR 24317
+ SPELL_SUNDERARMOR = 24317,
-#define NPC_SPEAKER 11391
+ NPC_SPEAKER = 11391
+};
class boss_mandokir : public CreatureScript
{
@@ -119,17 +122,17 @@ class boss_mandokir : public CreatureScript
if (KillCount == 3)
{
- DoScriptText(SAY_DING_KILL, me);
+ Talk(SAY_DING_KILL);
if (instance)
{
uint64 JindoGUID = instance->GetData64(DATA_JINDO);
if (JindoGUID)
{
- if (Unit* jTemp = Unit::GetUnit(*me, JindoGUID))
+ if (Creature* jTemp = Creature::GetCreature(*me, JindoGUID))
{
if (jTemp->isAlive())
- DoScriptText(SAY_GRATS_JINDO, jTemp);
+ jTemp->AI()->Talk(SAY_GRATS_JINDO);
}
}
}
@@ -141,7 +144,7 @@ class boss_mandokir : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void UpdateAI(const uint32 diff)
@@ -205,7 +208,7 @@ class boss_mandokir : public CreatureScript
{
if (Unit* p = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
- DoScriptText(SAY_WATCH, me, p);
+ Talk(SAY_WATCH, p->GetGUID());
DoCast(p, SPELL_WATCH);
WatchTarget = p->GetGUID();
someWatched = true;
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp
index 8e0deda1d0b..17b268b92ef 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp
@@ -27,19 +27,22 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "zulgurub.h"
-#define SAY_AGGRO -1309005
-#define SAY_TRANSFORM -1309006
-#define SAY_SPIDER_SPAWN -1309007
-#define SAY_DEATH -1309008
+enum Marli
+{
+ SAY_AGGRO = 0,
+ SAY_TRANSFORM = 1,
+ SAY_SPIDER_SPAWN = 2,
+ SAY_DEATH = 3,
-#define SPELL_CHARGE 22911
-#define SPELL_ASPECT_OF_MARLI 24686 // A stun spell
-#define SPELL_ENVOLWINGWEB 24110
-#define SPELL_POISONVOLLEY 24099
-#define SPELL_SPIDER_FORM 24084
+ SPELL_CHARGE = 22911,
+ SPELL_ASPECT_OF_MARLI = 24686, // A stun spell
+ SPELL_ENVOLWINGWEB = 24110,
+ SPELL_POISONVOLLEY = 24099,
+ SPELL_SPIDER_FORM = 24084,
//The Spider Spells
-#define SPELL_LEVELUP 24312 //Not right Spell.
+ SPELL_LEVELUP = 24312 //Not right Spell.
+};
class boss_marli : public CreatureScript
{
@@ -86,12 +89,12 @@ class boss_marli : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_MARLI, DONE);
}
@@ -117,7 +120,7 @@ class boss_marli : public CreatureScript
if (!Spawned && SpawnStartSpiders_Timer <= diff)
{
- DoScriptText(SAY_SPIDER_SPAWN, me);
+ Talk(SAY_SPIDER_SPAWN);
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (!target)
@@ -155,7 +158,7 @@ class boss_marli : public CreatureScript
if (!PhaseTwo && Transform_Timer <= diff)
{
- DoScriptText(SAY_TRANSFORM, me);
+ Talk(SAY_TRANSFORM);
DoCast(me, SPELL_SPIDER_FORM);
const CreatureTemplate* cinfo = me->GetCreatureTemplate();
me->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 35)));
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp
index 29495f77f2a..3ea5d932ab0 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp
@@ -27,11 +27,11 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "zulgurub.h"
-#define SAY_AGGRO -1309009
-#define SAY_DEATH -1309010
-
-enum eSpells
+enum Thekal
{
+ SAY_AGGRO = 0,
+ SAY_DEATH = 1,
+
SPELL_MORTALCLEAVE = 22859,
SPELL_SILENCE = 22666,
SPELL_FRENZY = 8269,
@@ -53,7 +53,7 @@ enum eSpells
SPELL_SINISTERSTRIKE = 15581,
SPELL_GOUGE = 12540,
SPELL_KICK = 15614,
- SPELL_BLIND = 21060,
+ SPELL_BLIND = 21060
};
class boss_thekal : public CreatureScript
@@ -106,12 +106,12 @@ class boss_thekal : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_THEKAL, DONE);
}
diff --git a/src/server/scripts/EasternKingdoms/eversong_woods.cpp b/src/server/scripts/EasternKingdoms/eversong_woods.cpp
index f62273e583d..c5f9522b23d 100644
--- a/src/server/scripts/EasternKingdoms/eversong_woods.cpp
+++ b/src/server/scripts/EasternKingdoms/eversong_woods.cpp
@@ -517,9 +517,12 @@ public:
## npc_infused_crystal
######*/
-#define MOB_ENRAGED_WRAITH 17086
-#define EMOTE -1000283
-#define QUEST_POWERING_OUR_DEFENSES 8490
+enum InfusedCrystal
+{
+ MOB_ENRAGED_WRAITH = 17086,
+ EMOTE = 0,
+ QUEST_POWERING_OUR_DEFENSES = 8490
+};
struct Location
{
@@ -597,7 +600,7 @@ public:
{
if (EndTimer < diff && Progress)
{
- DoScriptText(EMOTE, me);
+ Talk(EMOTE);
Completed = true;
if (PlayerGUID)
if (Player* player = Unit::GetPlayer(*me, PlayerGUID))
diff --git a/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp b/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp
index c3a725f2f45..5625b6994d7 100644
--- a/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp
+++ b/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp
@@ -37,11 +37,13 @@ EndContentData */
/*######
## npc_converted_sentry
######*/
+enum ConvertedSentry
+{
+ SAY_CONVERTED = 0,
-#define SAY_CONVERTED_1 -1000188
-#define SAY_CONVERTED_2 -1000189
+ SPELL_CONVERT_CREDIT = 45009
+};
-#define SPELL_CONVERT_CREDIT 45009
class npc_converted_sentry : public CreatureScript
{
@@ -75,11 +77,7 @@ public:
{
if (Timer <= diff)
{
- uint32 i = urand(1, 2);
- if (i == 1)
- DoScriptText(SAY_CONVERTED_1, me);
- else
- DoScriptText(SAY_CONVERTED_2, me);
+ Talk(SAY_CONVERTED);
DoCast(me, SPELL_CONVERT_CREDIT);
if (me->isPet())
diff --git a/src/server/scripts/EasternKingdoms/redridge_mountains.cpp b/src/server/scripts/EasternKingdoms/redridge_mountains.cpp
index f04b0111da7..9fa8ac70eed 100644
--- a/src/server/scripts/EasternKingdoms/redridge_mountains.cpp
+++ b/src/server/scripts/EasternKingdoms/redridge_mountains.cpp
@@ -30,11 +30,11 @@ enum eCorporalKeeshan
{
QUEST_MISSING_IN_ACTION = 219,
- SAY_CORPORAL_1 = -1000464,
- SAY_CORPORAL_2 = -1000465,
- SAY_CORPORAL_3 = -1000466,
- SAY_CORPORAL_4 = -1000467,
- SAY_CORPORAL_5 = -1000468,
+ SAY_CORPORAL_1 = 0,
+ SAY_CORPORAL_2 = 1,
+ SAY_CORPORAL_3 = 2,
+ SAY_CORPORAL_4 = 3,
+ SAY_CORPORAL_5 = 4,
SPELL_MOCKING_BLOW = 21008,
SPELL_SHIELD_BASH = 11972,
@@ -50,7 +50,7 @@ public:
if (quest->GetQuestId() == QUEST_MISSING_IN_ACTION)
{
CAST_AI(npc_corporal_keeshan::npc_corporal_keeshanAI, creature->AI())->Start(true, false, player->GetGUID(), quest);
- DoScriptText(SAY_CORPORAL_1, creature);
+ creature->AI()->Talk(SAY_CORPORAL_1);
}
return false;
@@ -124,23 +124,23 @@ public:
uiPhase = 2;
break;
case 2:
- DoScriptText(SAY_CORPORAL_2, me);
+ Talk(SAY_CORPORAL_2);
uiTimer = 15000;
uiPhase = 3;
break;
case 3:
- DoScriptText(SAY_CORPORAL_3, me);
+ Talk(SAY_CORPORAL_3);
me->SetStandState(UNIT_STAND_STATE_STAND);
SetEscortPaused(false);
uiTimer = 0;
uiPhase = 0;
break;
case 4:
- DoScriptText(SAY_CORPORAL_4, me);
+ Talk(SAY_CORPORAL_4);
uiTimer = 2500;
uiPhase = 5;
case 5:
- DoScriptText(SAY_CORPORAL_5, me);
+ Talk(SAY_CORPORAL_5);
uiTimer = 0;
uiPhase = 0;
}
diff --git a/src/server/scripts/EasternKingdoms/silverpine_forest.cpp b/src/server/scripts/EasternKingdoms/silverpine_forest.cpp
index 905d34221ed..1960d90f28f 100644
--- a/src/server/scripts/EasternKingdoms/silverpine_forest.cpp
+++ b/src/server/scripts/EasternKingdoms/silverpine_forest.cpp
@@ -39,20 +39,19 @@ EndContentData */
enum eErland
{
- SAY_QUESTACCEPT = -1000306,
- SAY_START = -1000307,
- SAY_AGGRO_1 = -1000308,
- SAY_AGGRO_2 = -1000309,
- SAY_LAST = -1000310,
+ SAY_QUESTACCEPT = 0,
+ SAY_START = 1,
+ SAY_AGGRO = 2,
+ SAY_PROGRESS = 3,
+ SAY_LAST = 4,
- SAY_THANKS = -1000311,
- SAY_RANE = -1000312,
- SAY_ANSWER = -1000313,
- SAY_MOVE_QUINN = -1000314,
+ SAY_RANE = 0,
+ SAY_RANE_ANSWER = 5,
+ SAY_MOVE_QUINN = 6,
- SAY_GREETINGS = -1000315,
- SAY_QUINN = -1000316,
- SAY_ON_BYE = -1000317,
+ SAY_QUINN = 7,
+ SAY_QUINN_ANSWER = 0,
+ SAY_BYE = 8,
QUEST_ESCORTING = 435,
NPC_RANE = 1950,
@@ -77,34 +76,34 @@ public:
switch (waypointId)
{
case 1:
- DoScriptText(SAY_START, me, player);
+ Talk(SAY_START, player->GetGUID());
+ break;
+ case 10:
+ Talk(SAY_PROGRESS);
break;
case 13:
- DoScriptText(SAY_LAST, me, player);
+ Talk(SAY_LAST, player->GetGUID());
player->GroupEventHappens(QUEST_ESCORTING, me);
break;
- case 14:
- DoScriptText(SAY_THANKS, me, player);
- break;
case 15:
- if (Unit* Rane = me->FindNearestCreature(NPC_RANE, 20))
- DoScriptText(SAY_RANE, Rane);
+ if (Creature* rane = me->FindNearestCreature(NPC_RANE, 20.0f))
+ rane->AI()->Talk(SAY_RANE);
break;
case 16:
- DoScriptText(SAY_ANSWER, me);
+ Talk(SAY_RANE_ANSWER);
break;
case 17:
- DoScriptText(SAY_MOVE_QUINN, me);
+ Talk(SAY_MOVE_QUINN);
break;
case 24:
- DoScriptText(SAY_GREETINGS, me);
+ Talk(SAY_QUINN);
break;
case 25:
- if (Unit* Quinn = me->FindNearestCreature(NPC_QUINN, 20))
- DoScriptText(SAY_QUINN, Quinn);
+ if (Creature* quinn = me->FindNearestCreature(NPC_QUINN, 20.0f))
+ quinn->AI()->Talk(SAY_QUINN_ANSWER);
break;
case 26:
- DoScriptText(SAY_ON_BYE, me, NULL);
+ Talk(SAY_BYE);
break;
}
}
@@ -113,7 +112,7 @@ public:
void EnterCombat(Unit* who)
{
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2), me, who);
+ Talk(SAY_AGGRO, who->GetGUID());
}
};
@@ -121,7 +120,7 @@ public:
{
if (quest->GetQuestId() == QUEST_ESCORTING)
{
- DoScriptText(SAY_QUESTACCEPT, creature, player);
+ creature->AI()->Talk(SAY_QUESTACCEPT, player->GetGUID());
if (npc_escortAI* pEscortAI = CAST_AI(npc_deathstalker_erland::npc_deathstalker_erlandAI, creature->AI()))
pEscortAI->Start(true, false, player->GetGUID());
diff --git a/src/server/scripts/EasternKingdoms/stormwind_city.cpp b/src/server/scripts/EasternKingdoms/stormwind_city.cpp
index 188b3dcd2b1..47717526aaa 100644
--- a/src/server/scripts/EasternKingdoms/stormwind_city.cpp
+++ b/src/server/scripts/EasternKingdoms/stormwind_city.cpp
@@ -212,7 +212,7 @@ enum eLordGregorLescovar
SAY_LESCOVAR_4 = 2,
SAY_MARZON_1 = 0,
SAY_MARZON_2 = 1,
- SAY_TYRION_2 = 0,
+ SAY_TYRION_2 = 1,
NPC_STORMWIND_ROYAL = 1756,
NPC_MARZON_BLADE = 1755,
@@ -470,8 +470,8 @@ enum eTyrionSpybot
SAY_SPYBOT_3 = 3,
SAY_SPYBOT_4 = 4,
SAY_TYRION_1 = 0,
- SAY_GUARD_1 = 0,
- SAY_LESCOVAR_1 = 0,
+ SAY_GUARD_1 = 1,
+ SAY_LESCOVAR_1 = 3,
NPC_PRIESTESS_TYRIONA = 7779,
NPC_LORD_GREGOR_LESCOVAR = 1754,
diff --git a/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp b/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp
index 041f5976a6e..22cd971a081 100644
--- a/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp
+++ b/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp
@@ -37,9 +37,9 @@ EndContentData */
## npc_calvin_montague
######*/
-enum eCalvin
+enum Calvin
{
- SAY_COMPLETE = -1000431,
+ SAY_COMPLETE = 0,
SPELL_DRINK = 2639, // possibly not correct spell (but iconId is correct)
QUEST_590 = 590,
FACTION_HOSTILE = 168
@@ -113,22 +113,22 @@ public:
}
}
- void UpdateAI(const uint32 uiDiff)
+ void UpdateAI(uint32 const diff)
{
if (m_uiPhase)
{
- if (m_uiPhaseTimer <= uiDiff)
+ if (m_uiPhaseTimer <= diff)
m_uiPhaseTimer = 7500;
else
{
- m_uiPhaseTimer -= uiDiff;
+ m_uiPhaseTimer -= diff;
return;
}
switch (m_uiPhase)
{
case 1:
- DoScriptText(SAY_COMPLETE, me);
+ Talk(SAY_COMPLETE);
++m_uiPhase;
break;
case 2:
diff --git a/src/server/scripts/EasternKingdoms/western_plaguelands.cpp b/src/server/scripts/EasternKingdoms/western_plaguelands.cpp
index 1c2f2624b34..79b49b6a438 100644
--- a/src/server/scripts/EasternKingdoms/western_plaguelands.cpp
+++ b/src/server/scripts/EasternKingdoms/western_plaguelands.cpp
@@ -281,13 +281,13 @@ enum eTruuen
QUEST_TOMB_LIGHTBRINGER = 9446,
- SAY_WP_0 = -1800064, //Beware! We are attacked!
- SAY_WP_1 = -1800065, //It must be the purity of the Mark of the Lightbringer that is drawing forth the Scourge to attack us. We must proceed with caution lest we be overwhelmed!
- SAY_WP_2 = -1800066, //This land truly needs to be cleansed by the Light! Let us continue on to the tomb. It isn't far now...
- SAY_WP_3 = -1800067, //Be welcome, friends!
- SAY_WP_4 = -1800068, //Thank you for coming here in remembrance of me. Your efforts in recovering that symbol, while unnecessary, are certainly touching to an old man's heart.
- SAY_WP_5 = -1800069, //Please, rise my friend. Keep the Blessing as a symbol of the strength of the Light and how heroes long gone might once again rise in each of us to inspire.
- SAY_WP_6 = -1800070 //Thank you my friend for making this possible. This is a day that I shall never forget! I think I will stay a while. Please return to High Priestess MacDonnell at the camp. I know that she'll be keenly interested to know of what has transpired here.
+ SAY_WP_0 = 0, //Beware! We are attacked!
+ SAY_WP_1 = 1, //It must be the purity of the Mark of the Lightbringer that is drawing forth the Scourge to attack us. We must proceed with caution lest we be overwhelmed!
+ SAY_WP_2 = 2, //This land truly needs to be cleansed by the Light! Let us continue on to the tomb. It isn't far now...
+ SAY_WP_3 = 0, //Be welcome, friends!
+ SAY_WP_4 = 0, //Thank you for coming here in remembrance of me. Your efforts in recovering that symbol, while unnecessary, are certainly touching to an old man's heart.
+ SAY_WP_5 = 1, //Please, rise my friend. Keep the Blessing as a symbol of the strength of the Light and how heroes long gone might once again rise in each of us to inspire.
+ SAY_WP_6 = 2 //Thank you my friend for making this possible. This is a day that I shall never forget! I think I will stay a while. Please return to High Priestess MacDonnell at the camp. I know that she'll be keenly interested to know of what has transpired here.
};
class npc_anchorite_truuen : public CreatureScript
@@ -339,12 +339,12 @@ public:
switch (waypointId)
{
case 8:
- DoScriptText(SAY_WP_0, me);
+ Talk(SAY_WP_0);
me->SummonCreature(NPC_GHOUL, me->GetPositionX()+7.0f, me->GetPositionY()+7.0f, me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000);
me->SummonCreature(NPC_GHOUL, me->GetPositionX()+5.0f, me->GetPositionY()+5.0f, me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000);
break;
case 9:
- DoScriptText(SAY_WP_1, me);
+ Talk(SAY_WP_1);
break;
case 14:
me->SummonCreature(NPC_GHOUL, me->GetPositionX()+7.0f, me->GetPositionY()+7.0f, me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000);
@@ -353,25 +353,31 @@ public:
me->SummonCreature(NPC_GHOUL, me->GetPositionX()+8.0f, me->GetPositionY()+8.0f, me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000);
break;
case 15:
- DoScriptText(SAY_WP_2, me);
+ Talk(SAY_WP_2);
case 21:
Theldanis = GetClosestCreatureWithEntry(me, NPC_THEL_DANIS, 150);
- DoScriptText(SAY_WP_3, Theldanis);
+ if (Theldanis)
+ Theldanis->AI()->Talk(SAY_WP_3);
break;
case 22:
break;
case 23:
Ughost = me->SummonCreature(NPC_GHOST_UTHER, 971.86f, -1825.42f, 81.99f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
- Ughost->SetDisableGravity(true);
- DoScriptText(SAY_WP_4, Ughost, me);
+ if (Ughost)
+ {
+ Ughost->SetDisableGravity(true);
+ Ughost->AI()->Talk(SAY_WP_4, me->GetGUID());
+ }
m_uiChatTimer = 4000;
break;
case 24:
- DoScriptText(SAY_WP_5, Ughost, me);
+ if (Ughost)
+ Ughost->AI()->Talk(SAY_WP_5, me->GetGUID());
m_uiChatTimer = 4000;
break;
case 25:
- DoScriptText(SAY_WP_6, Ughost, me);
+ if (Ughost)
+ Ughost->AI()->Talk(SAY_WP_6, me->GetGUID());
m_uiChatTimer = 4000;
break;
case 26:
diff --git a/src/server/scripts/Events/CMakeLists.txt b/src/server/scripts/Events/CMakeLists.txt
index d8be052d645..00bdaa9cb0c 100644
--- a/src/server/scripts/Events/CMakeLists.txt
+++ b/src/server/scripts/Events/CMakeLists.txt
@@ -11,7 +11,6 @@
set(scripts_STAT_SRCS
${scripts_STAT_SRCS}
Events/childrens_week.cpp
- Events/event.cpp
)
message(" -> Prepared: Events")
diff --git a/src/server/scripts/Events/event.cpp b/src/server/scripts/Events/event.cpp
deleted file mode 100644
index d77ef2b78c1..00000000000
--- a/src/server/scripts/Events/event.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-void AddSC_event_childrens_week();
-
-void AddSC_event_scripts()
-{
- AddSC_event_childrens_week();
-}
diff --git a/src/server/scripts/Examples/example_creature.cpp b/src/server/scripts/Examples/example_creature.cpp
index 1ef15c0ca61..0baa9814970 100644
--- a/src/server/scripts/Examples/example_creature.cpp
+++ b/src/server/scripts/Examples/example_creature.cpp
@@ -45,17 +45,18 @@ enum Yells
//List of text id's. The text is stored in database, also in a localized version
//(if translation not exist for the textId, default english text will be used)
//Not required to define in this way, but simplify if changes are needed.
- SAY_AGGRO = -1999900,
- SAY_RANDOM_0 = -1999901,
- SAY_RANDOM_1 = -1999902,
- SAY_RANDOM_2 = -1999903,
- SAY_RANDOM_3 = -1999904,
- SAY_RANDOM_4 = -1999905,
- SAY_BERSERK = -1999906,
- SAY_PHASE = -1999907,
- SAY_DANCE = -1999908,
- SAY_SALUTE = -1999909,
- SAY_EVADE = -1999910,
+ //These texts must be added to the creature texts of the npc for which the script is assigned.
+ SAY_AGGRO = 0, // "Let the games begin."
+ SAY_RANDOM = 1, // "I see endless suffering. I see torment. I see rage. I see everything.",
+ // "Muahahahaha",
+ // "These mortal infedels my lord, they have invaded your sanctum and seek to steal your secrets.",
+ // "You are already dead.",
+ // "Where to go? What to do? So many choices that all end in pain, end in death."
+ SAY_BERSERK = 2, // "$N, I sentance you to death!"
+ SAY_PHASE = 3, // "The suffering has just begun!"
+ SAY_DANCE = 4, // "I always thought I was a good dancer."
+ SAY_SALUTE = 5, // "Move out Soldier!"
+ SAY_EVADE = 6 // "Help $N! I'm under attack!"
};
enum Spells
@@ -127,7 +128,7 @@ class example_creature : public CreatureScript
void EnterCombat(Unit* who)
{
//Say some stuff
- DoScriptText(SAY_AGGRO, me, who);
+ Talk(SAY_AGGRO, who->GetGUID());
}
// *** HANDLED FUNCTION ***
@@ -142,7 +143,7 @@ class example_creature : public CreatureScript
// Called when going out of combat. Reset is called just after.
void EnterEvadeMode()
{
- DoScriptText(SAY_EVADE, me);
+ Talk(SAY_EVADE);
}
// *** HANDLED FUNCTION ***
@@ -154,10 +155,10 @@ class example_creature : public CreatureScript
switch (uiTextEmote)
{
case TEXT_EMOTE_DANCE:
- DoScriptText(SAY_DANCE, me);
+ Talk(SAY_DANCE);
break;
case TEXT_EMOTE_SALUTE:
- DoScriptText(SAY_SALUTE, me);
+ Talk(SAY_SALUTE);
break;
}
}
@@ -173,7 +174,7 @@ class example_creature : public CreatureScript
if (m_uiSayTimer <= uiDiff)
{
//Random switch between 5 outcomes
- DoScriptText(RAND(SAY_RANDOM_0, SAY_RANDOM_1, SAY_RANDOM_2, SAY_RANDOM_3, SAY_RANDOM_4), me);
+ Talk(SAY_RANDOM);
m_uiSayTimer = 45000; //Say something agian in 45 seconds
}
@@ -235,7 +236,7 @@ class example_creature : public CreatureScript
if (m_uiBeserkTimer <= uiDiff)
{
//Say our line then cast uber death spell
- DoScriptText(SAY_BERSERK, me, me->getVictim());
+ Talk(SAY_BERSERK, me->getVictim() ? me->getVictim()->GetGUID() : 0);
DoCast(me->getVictim(), SPELL_BERSERK);
//Cast our beserk spell agian in 12 seconds if we didn't kill everyone
@@ -250,7 +251,7 @@ class example_creature : public CreatureScript
{
//Go to next phase
++m_uiPhase;
- DoScriptText(SAY_PHASE, me);
+ Talk(SAY_PHASE);
DoCast(me, SPELL_FRENZY);
}
else
diff --git a/src/server/scripts/Examples/example_escort.cpp b/src/server/scripts/Examples/example_escort.cpp
index 8cf0dad25d2..cd680b31577 100644
--- a/src/server/scripts/Examples/example_escort.cpp
+++ b/src/server/scripts/Examples/example_escort.cpp
@@ -28,6 +28,7 @@ EndScriptData */
#include "ScriptedGossip.h"
#include "ScriptedEscortAI.h"
#include "Player.h"
+#include "CreatureTextMgr.h"
enum eEnums
{
@@ -37,18 +38,18 @@ enum eEnums
SPELL_ELIXIR_OF_FORTITUDE = 3593,
SPELL_BLUE_FIREWORK = 11540,
- SAY_AGGRO1 = -1999910,
- SAY_AGGRO2 = -1999911,
- SAY_WP_1 = -1999912,
- SAY_WP_2 = -1999913,
- SAY_WP_3 = -1999914,
- SAY_WP_4 = -1999915,
- SAY_DEATH_1 = -1999916,
- SAY_DEATH_2 = -1999917,
- SAY_DEATH_3 = -1999918,
- SAY_SPELL = -1999919,
- SAY_RAND_1 = -1999920,
- SAY_RAND_2 = -1999921
+ SAY_AGGRO1 = 0,
+ SAY_AGGRO2 = 1,
+ SAY_WP_1 = 2,
+ SAY_WP_2 = 3,
+ SAY_WP_3 = 4,
+ SAY_WP_4 = 5,
+ SAY_DEATH_1 = 6,
+ SAY_DEATH_2 = 7,
+ SAY_DEATH_3 = 8,
+ SAY_SPELL = 9,
+ SAY_RAND_1 = 10,
+ SAY_RAND_2 = 11
};
#define GOSSIP_ITEM_1 "Click to Test Escort(Attack, Run)"
@@ -83,19 +84,19 @@ class example_escort : public CreatureScript
switch (waypointId)
{
case 1:
- DoScriptText(SAY_WP_1, me);
+ Talk(SAY_WP_1);
break;
case 3:
- DoScriptText(SAY_WP_2, me);
+ Talk(SAY_WP_2);
me->SummonCreature(NPC_FELBOAR, me->GetPositionX()+5.0f, me->GetPositionY()+7.0f, me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000);
break;
case 4:
if (Player* player = GetPlayerForEscort())
{
//pTmpPlayer is the target of the text
- DoScriptText(SAY_WP_3, me, player);
+ Talk(SAY_WP_3, player->GetGUID());
//pTmpPlayer is the source of the text
- DoScriptText(SAY_WP_4, player);
+ sCreatureTextMgr->SendChat(me, SAY_WP_4, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, player);
}
break;
}
@@ -106,10 +107,10 @@ class example_escort : public CreatureScript
if (HasEscortState(STATE_ESCORT_ESCORTING))
{
if (Player* player = GetPlayerForEscort())
- DoScriptText(SAY_AGGRO1, me, player);
+ Talk(SAY_AGGRO1, player->GetGUID());
}
else
- DoScriptText(SAY_AGGRO2, me);
+ Talk(SAY_AGGRO2);
}
void Reset()
@@ -126,13 +127,13 @@ class example_escort : public CreatureScript
{
// not a likely case, code here for the sake of example
if (killer == me)
- DoScriptText(SAY_DEATH_1, me, player);
+ Talk(SAY_DEATH_1, player->GetGUID());
else
- DoScriptText(SAY_DEATH_2, me, player);
+ Talk(SAY_DEATH_2, player->GetGUID());
}
}
else
- DoScriptText(SAY_DEATH_3, me);
+ Talk(SAY_DEATH_3);
}
void UpdateAI(const uint32 uiDiff)
@@ -145,7 +146,7 @@ class example_escort : public CreatureScript
{
if (m_uiDeathCoilTimer <= uiDiff)
{
- DoScriptText(SAY_SPELL, me);
+ Talk(SAY_SPELL);
DoCast(me->getVictim(), SPELL_DEATH_COIL, false);
m_uiDeathCoilTimer = 4000;
}
@@ -161,12 +162,12 @@ class example_escort : public CreatureScript
{
if (me->HasAura(SPELL_ELIXIR_OF_FORTITUDE, 0))
{
- DoScriptText(SAY_RAND_1, me);
+ Talk(SAY_RAND_1);
DoCast(me, SPELL_BLUE_FIREWORK, false);
}
else
{
- DoScriptText(SAY_RAND_2, me);
+ Talk(SAY_RAND_2);
DoCast(me, SPELL_ELIXIR_OF_FORTITUDE, false);
}
diff --git a/src/server/scripts/Examples/example_gossip_codebox.cpp b/src/server/scripts/Examples/example_gossip_codebox.cpp
index 352c43fc1de..b6be4ce3ce1 100644
--- a/src/server/scripts/Examples/example_gossip_codebox.cpp
+++ b/src/server/scripts/Examples/example_gossip_codebox.cpp
@@ -34,9 +34,10 @@ enum eEnums
SPELL_POLYMORPH = 12826,
SPELL_MARK_OF_THE_WILD = 26990,
- SAY_NOT_INTERESTED = -1999922,
- SAY_WRONG = -1999923,
- SAY_CORRECT = -1999924
+ //These texts must be added to the creature texts of the npc for which the script is assigned.
+ SAY_NOT_INTERESTED = 0, // "Normal select, guess you're not interested."
+ SAY_WRONG = 1, // "Wrong!"
+ SAY_CORRECT = 2 // "You're right, you are allowed to see my inner secrets."
};
#define GOSSIP_ITEM_1 "A quiz: what's your name?"
@@ -66,7 +67,8 @@ class example_gossip_codebox : public CreatureScript
player->PlayerTalkClass->ClearMenus();
if (action == GOSSIP_ACTION_INFO_DEF+2)
{
- DoScriptText(SAY_NOT_INTERESTED, creature);
+ //Read comment in enum
+ creature->AI()->Talk(SAY_NOT_INTERESTED);
player->CLOSE_GOSSIP_MENU();
}
@@ -83,12 +85,14 @@ class example_gossip_codebox : public CreatureScript
case GOSSIP_ACTION_INFO_DEF+1:
if (player->GetName() != code)
{
- DoScriptText(SAY_WRONG, creature);
+ //Read comment in enum
+ creature->AI()->Talk(SAY_WRONG);
creature->CastSpell(player, SPELL_POLYMORPH, true);
}
else
{
- DoScriptText(SAY_CORRECT, creature);
+ //Read comment in enum
+ creature->AI()->Talk(SAY_CORRECT);
creature->CastSpell(player, SPELL_MARK_OF_THE_WILD, true);
}
player->CLOSE_GOSSIP_MENU();
diff --git a/src/server/scripts/Examples/example_misc.cpp b/src/server/scripts/Examples/example_misc.cpp
index 5ff66c4a7ed..68986b44496 100644
--- a/src/server/scripts/Examples/example_misc.cpp
+++ b/src/server/scripts/Examples/example_misc.cpp
@@ -26,11 +26,6 @@ EndScriptData */
#include "ScriptMgr.h"
#include "Player.h"
-enum eSay
-{
- SAY_HI = -1999925
-};
-
class AT_example_areatrigger : public AreaTriggerScript
{
public:
@@ -42,7 +37,7 @@ class AT_example_areatrigger : public AreaTriggerScript
bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/)
{
- DoScriptText(SAY_HI, player);
+ player->Kill(player);
return true;
}
};
diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp
index 9cc515c1b0d..5c46519ab1c 100644
--- a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp
+++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp
@@ -192,8 +192,8 @@ public:
enum Morridune
{
- SAY_MORRIDUNE_1 = -1048003,
- SAY_MORRIDUNE_2 = -1048004
+ SAY_MORRIDUNE_1 = 0,
+ SAY_MORRIDUNE_2 = 1
};
class npc_morridune : public CreatureScript
@@ -231,7 +231,7 @@ public:
{
npc_morriduneAI(Creature* creature) : npc_escortAI(creature)
{
- DoScriptText(SAY_MORRIDUNE_1, creature);
+ Talk(SAY_MORRIDUNE_1);
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
Start(false, false, 0);
}
@@ -245,7 +245,7 @@ public:
me->SetOrientation(1.775791f);
me->SendMovementFlagUpdate();
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
- DoScriptText(SAY_MORRIDUNE_2, me);
+ Talk(SAY_MORRIDUNE_2);
break;
}
}
diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp
index 1c754b78672..0a4779508e9 100644
--- a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp
+++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp
@@ -21,16 +21,12 @@
enum Spells
{
- SPELL_MIND_BLAST = 15587,
- SPELL_SLEEP = 8399,
-};
+ SPELL_MIND_BLAST = 15587,
+ SPELL_SLEEP = 8399,
-//Id's from ACID
-enum Yells
-{
- SAY_AGGRO = -1048002,
- SAY_SLEEP = -1048001,
- SAY_DEATH = -1048000
+ SAY_AGGRO = 0,
+ SAY_SLEEP = 1,
+ SAY_DEATH = 2
};
class boss_kelris : public CreatureScript
@@ -65,14 +61,14 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(TYPE_KELRIS, IN_PROGRESS);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(TYPE_KELRIS, DONE);
}
@@ -92,7 +88,7 @@ public:
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
{
- DoScriptText(SAY_SLEEP, me);
+ Talk(SAY_SLEEP);
DoCast(target, SPELL_SLEEP);
}
sleepTimer = urand(15000, 20000);
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
index aa41fa992dc..70c5bc8b986 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
@@ -619,42 +619,6 @@ uint32 hyjalAI::GetInstanceData(uint32 Event)
return 0;
}
-void hyjalAI::Talk(uint32 id)
-{
- std::list<uint8> index;
- for (uint8 i = 0; i < 9; ++i)
- {
- if (Faction == 0) // Alliance
- {
- if (JainaQuotes[i].id == id)
- index.push_back(i);
- }
- else if (Faction == 1) // Horde
- {
- if (ThrallQuotes[i].id == id)
- index.push_back(i);
- }
- }
-
- if (index.empty())
- return; // No quotes found, no use to continue
-
- uint8 ind = *(index.begin()) + rand()%index.size();
-
- int32 YellId = 0;
- if (Faction == 0) // Alliance
- {
- YellId = JainaQuotes[ind].textid;
- }
- else if (Faction == 1) // Horde
- {
- YellId = ThrallQuotes[ind].textid;
- }
-
- if (YellId)
- DoScriptText(YellId, me);
-}
-
void hyjalAI::Retreat()
{
if (instance)
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.h b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.h
index 68efa94d98b..5fe724c7845 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.h
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.h
@@ -132,12 +132,6 @@ enum TargetType // Used in the spell
TARGETTYPE_VICTIM = 2,
};
-struct Yells
-{
- uint32 id; // Used to determine the type of yell (attack, rally, etc)
- int32 textid; // The text id to be yelled
-};
-
enum YellId
{
ATTACKED = 0, // Used when attacked and set in combat
@@ -149,32 +143,6 @@ enum YellId
DEATH = 6, // Used on death
};
-const Yells JainaQuotes[]=
-{
- {ATTACKED, -1534000},
- {ATTACKED, -1534001},
- {INCOMING, -1534002},
- {BEGIN, -1534003},
- {RALLY, -1534004},
- {RALLY, -1534005},
- {FAILURE, -1534006},
- {SUCCESS, -1534007},
- {DEATH, -1534008},
-};
-
-const Yells ThrallQuotes[]=
-{
- {ATTACKED, -1534009},
- {ATTACKED, -1534010},
- {INCOMING, -1534011},
- {BEGIN, -1534012},
- {RALLY, -1534013},
- {RALLY, -1534014},
- {FAILURE, -1534015},
- {SUCCESS, -1534016},
- {DEATH, -1534017},
-};
-
struct hyjalAI : public npc_escortAI
{
hyjalAI(Creature* creature);
@@ -215,8 +183,6 @@ struct hyjalAI : public npc_escortAI
uint32 GetInstanceData(uint32 Event); // Gets instance data for this instance, used to check if raid has gotten past a certain point and can access the next phase
- void Talk(uint32 id); // Searches for the appropriate yell and sound and uses it to inform the raid of various things
-
public:
InstanceScript* instance;
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp
index 7b468cb7fe5..17cae714b58 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp
@@ -38,15 +38,11 @@ enum Spells
enum Yells
{
- SAY_INTRO = -1595000, //"Prince Arthas Menethil, on this day, a powerful darkness has taken hold of your soul. The death you are destined to visit upon others will this day be your own."
- SAY_AGGRO = -1595001, //"We'll see about that, young prince."
- SAY_TIME_WARP_1 = -1595002, //"Tick tock, tick tock..."
- SAY_TIME_WARP_2 = -1595003, //"Not quick enough!"
- SAY_TIME_WARP_3 = -1595004, //"Let's get this over with. "
- SAY_SLAY_1 = -1595005, //"There is no future for you."
- SAY_SLAY_2 = -1595006, //"This is the hour of our greatest triumph!"
- SAY_SLAY_3 = -1595007, //"You were destined to fail. "
- SAY_DEATH = -1595008 //"*gurgles*"
+ SAY_INTRO = 0,
+ SAY_AGGRO = 1,
+ SAY_TIME_WARP = 2,
+ SAY_SLAY = 3,
+ SAY_DEATH = 4
};
class boss_epoch : public CreatureScript
@@ -91,7 +87,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_EPOCH_EVENT, IN_PROGRESS);
@@ -124,7 +120,7 @@ public:
if (uiTimeWarpTimer < diff)
{
- DoScriptText(RAND(SAY_TIME_WARP_1, SAY_TIME_WARP_2, SAY_TIME_WARP_3), me);
+ Talk(SAY_TIME_WARP);
DoCastAOE(SPELL_TIME_WARP);
uiTimeWarpTimer = 25300;
} else uiTimeWarpTimer -= diff;
@@ -134,7 +130,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_EPOCH_EVENT, DONE);
@@ -145,7 +141,7 @@ public:
if (victim == me)
return;
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me);
+ Talk(SAY_SLAY);
}
};
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp
index 56d07a49dc4..2e70081fe87 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp
@@ -27,9 +27,9 @@ enum Spells
enum Yells
{
- SAY_AGGRO = -1595045,
- SAY_FAIL = -1595046,
- SAY_DEATH = -1595047
+ SAY_AGGRO = 0,
+ SAY_DEATH = 1,
+ SAY_FAIL = 2
};
class boss_infinite_corruptor : public CreatureScript
@@ -59,11 +59,12 @@ public:
void EnterCombat(Unit* /*who*/)
{
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_INFINITE_EVENT, IN_PROGRESS);
}
- void UpdateAI(const uint32 /*diff*/)
+ void UpdateAI(uint32 const /*diff*/)
{
//Return since we have no target
if (!UpdateVictim())
@@ -74,6 +75,7 @@ public:
void JustDied(Unit* /*killer*/)
{
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_INFINITE_EVENT, DONE);
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp
index 88b2a766671..b07f4120e97 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp
@@ -42,23 +42,15 @@ enum Spells
enum Yells
{
- SAY_INTRO_1 = -1595009,
- SAY_INTRO_2 = -1595010,
- SAY_AGGRO = -1595011,
- SAY_KILL_1 = -1595012,
- SAY_KILL_2 = -1595013,
- SAY_KILL_3 = -1595014,
- SAY_SLAY_1 = -1595015,
- SAY_SLAY_2 = -1595016,
- SAY_SLAY_3 = -1595017,
- SAY_SLAY_4 = -1595018,
- SAY_SLEEP_1 = -1595019,
- SAY_SLEEP_2 = -1595020,
- SAY_30HEALTH = -1595021,
- SAY_15HEALTH = -1595022,
- SAY_ESCAPE_SPEECH_1 = -1595023,
- SAY_ESCAPE_SPEECH_2 = -1595024,
- SAY_OUTRO = -1595025,
+ SAY_AGGRO = 2,
+ SAY_KILL = 3,
+ SAY_SLAY = 4,
+ SAY_SLEEP = 5,
+ SAY_30HEALTH = 6,
+ SAY_15HEALTH = 7,
+ SAY_ESCAPE_SPEECH_1 = 8,
+ SAY_ESCAPE_SPEECH_2 = 9,
+ SAY_OUTRO = 10
};
enum CombatPhases
@@ -116,7 +108,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_MAL_GANIS_EVENT, IN_PROGRESS);
}
@@ -138,13 +130,13 @@ public:
if (!bYelled && HealthBelowPct(30))
{
- DoScriptText(SAY_30HEALTH, me);
+ Talk(SAY_30HEALTH);
bYelled = true;
}
if (!bYelled2 && HealthBelowPct(15))
{
- DoScriptText(SAY_15HEALTH, me);
+ Talk(SAY_15HEALTH);
bYelled2 = true;
}
@@ -187,7 +179,7 @@ public:
if (uiSleepTimer < diff)
{
- DoScriptText(RAND(SAY_SLEEP_1, SAY_SLEEP_2), me);
+ Talk(SAY_SLEEP);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(target, SPELL_SLEEP);
uiSleepTimer = urand(15000, 20000);
@@ -201,7 +193,7 @@ public:
switch (uiOutroStep)
{
case 1:
- DoScriptText(SAY_ESCAPE_SPEECH_1, me);
+ Talk(SAY_ESCAPE_SPEECH_1);
me->GetMotionMaster()->MoveTargetedHome();
++uiOutroStep;
uiOutroTimer = 8000;
@@ -209,12 +201,12 @@ public:
case 2:
me->SetTarget(instance ? instance->GetData64(DATA_ARTHAS) : 0);
me->HandleEmoteCommand(29);
- DoScriptText(SAY_ESCAPE_SPEECH_2, me);
+ Talk(SAY_ESCAPE_SPEECH_2);
++uiOutroStep;
uiOutroTimer = 9000;
break;
case 3:
- DoScriptText(SAY_OUTRO, me);
+ Talk(SAY_OUTRO);
++uiOutroStep;
uiOutroTimer = 16000;
break;
@@ -250,7 +242,7 @@ public:
if (victim == me)
return;
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3, SAY_SLAY_4), me);
+ Talk(SAY_SLAY);
}
};
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp
index 8e80af66379..05d9fe8b5e4 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp
@@ -38,12 +38,10 @@ enum Spells
enum Yells
{
- SAY_AGGRO = -1595026,
- SAY_SLAY_1 = -1595027,
- SAY_SLAY_2 = -1595028,
- SAY_SLAY_3 = -1595029,
- SAY_SPAWN = -1595030,
- SAY_DEATH = -1595031
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_SPAWN = 2,
+ SAY_DEATH = 3
};
class boss_meathook : public CreatureScript
@@ -62,7 +60,7 @@ public:
{
instance = creature->GetInstanceScript();
if (instance)
- DoScriptText(SAY_SPAWN, me);
+ Talk(SAY_SPAWN);
}
uint32 uiChainTimer;
@@ -83,7 +81,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_MEATHOOK_EVENT, IN_PROGRESS);
@@ -119,7 +117,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_MEATHOOK_EVENT, DONE);
@@ -130,7 +128,7 @@ public:
if (victim == me)
return;
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me);
+ Talk(SAY_SLAY);
}
};
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp
index d23957ddf81..3a490301e47 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp
@@ -40,19 +40,13 @@ enum Spells
enum Yells
{
- SAY_AGGRO = -1595032,
- SAY_SPAWN = -1595033,
- SAY_SLAY_1 = -1595034,
- SAY_SLAY_2 = -1595035,
- SAY_SLAY_3 = -1595036,
- SAY_DEATH = -1595037,
- SAY_EXPLODE_GHOUL_1 = -1595038,
- SAY_EXPLODE_GHOUL_2 = -1595039,
- SAY_STEAL_FLESH_1 = -1595040,
- SAY_STEAL_FLESH_2 = -1595041,
- SAY_STEAL_FLESH_3 = -1595042,
- SAY_SUMMON_GHOULS_1 = -1595043,
- SAY_SUMMON_GHOULS_2 = -1595044
+ SAY_AGGRO = 0,
+ SAY_SPAWN = 1,
+ SAY_SLAY = 2,
+ SAY_DEATH = 3,
+ SAY_EXPLODE_GHOUL = 4,
+ SAY_STEAL_FLESH = 5,
+ SAY_SUMMON_GHOULS = 6
};
class boss_salramm : public CreatureScript
@@ -71,7 +65,7 @@ public:
{
instance = creature->GetInstanceScript();
if (instance)
- DoScriptText(SAY_SPAWN, me);
+ Talk(SAY_SPAWN);
}
uint32 uiCurseFleshTimer;
@@ -96,7 +90,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_SALRAMM_EVENT, IN_PROGRESS);
@@ -126,7 +120,7 @@ public:
//Steal Flesh timer
if (uiStealFleshTimer <= diff)
{
- DoScriptText(RAND(SAY_STEAL_FLESH_1, SAY_STEAL_FLESH_2, SAY_STEAL_FLESH_3), me);
+ Talk(SAY_STEAL_FLESH);
if (Unit* random_pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(random_pTarget, SPELL_STEAL_FLESH);
uiStealFleshTimer = 10000;
@@ -135,7 +129,7 @@ public:
//Summon ghouls timer
if (uiSummonGhoulsTimer <= diff)
{
- DoScriptText(RAND(SAY_SUMMON_GHOULS_1, SAY_SUMMON_GHOULS_2), me);
+ Talk(SAY_SUMMON_GHOULS);
if (Unit* random_pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(random_pTarget, SPELL_SUMMON_GHOULS);
uiSummonGhoulsTimer = 10000;
@@ -146,7 +140,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_SALRAMM_EVENT, DONE);
@@ -157,7 +151,7 @@ public:
if (victim == me)
return;
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me);
+ Talk(SAY_SLAY);
}
};
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 365c5dd7300..4887c8adf62 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
@@ -26,65 +26,84 @@
enum Says
{
- //First Act - Uther and Jaina Dialog
- SAY_PHASE101 = -1595070, //Arthas
- SAY_PHASE102 = -1595071, //Uther
- SAY_PHASE103 = -1595072, //Arthas
- SAY_PHASE104 = -1595073, //Arthas
- SAY_PHASE105 = -1595074, //Uther
- SAY_PHASE106 = -1595075, //Arthas
- SAY_PHASE107 = -1595076, //Uther
- SAY_PHASE108 = -1595077, //Arthas
- SAY_PHASE109 = -1595078, //Arthas
- SAY_PHASE110 = -1595079, //Uther
- SAY_PHASE111 = -1595080, //Arthas
- SAY_PHASE112 = -1595081, //Uther
- SAY_PHASE113 = -1595082, //Jaina
- SAY_PHASE114 = -1595083, //Arthas
- SAY_PHASE115 = -1595084, //Uther
- SAY_PHASE116 = -1595085, //Arthas
- SAY_PHASE117 = -1595086, //Jaina
- SAY_PHASE118 = -1595087, //Arthas
+ //Arthas
+ //First Act
+ SAY_PHASE101 = 0,
+ SAY_PHASE103 = 1,
+ SAY_PHASE104 = 2,
+ SAY_PHASE106 = 3,
+ SAY_PHASE108 = 4,
+ SAY_PHASE110 = 5,
+ SAY_PHASE112 = 6,
+ SAY_PHASE114 = 7,
+ SAY_PHASE116 = 8,
+ SAY_PHASE118 = 9,
+
//Second Act - City Streets
- SAY_PHASE201 = -1595088, //Arthas
- SAY_PHASE202 = -1595089, //Cityman
- SAY_PHASE203 = -1595090, //Arthas
- SAY_PHASE204 = -1595091, //Crazyman
- SAY_PHASE205 = -1595092, //Arthas
- SAY_PHASE206 = -1595009, //Malganis
- SAY_PHASE207 = -1595010, //Malganis
- SAY_PHASE208 = -1595093, //Arthas
- SAY_PHASE209 = -1595094, //Arthas
- SAY_PHASE210 = -1595095, //Arthas
+ SAY_PHASE201 = 10,
+ SAY_PHASE203 = 11,
+ SAY_PHASE205 = 12,
+ SAY_PHASE208 = 13,
+ SAY_PHASE209 = 14,
+ SAY_PHASE210 = 15,
+
//Third Act - Town Hall
- SAY_PHASE301 = -1595096, //Arthas
- SAY_PHASE302 = -1595097, //Drakonian
- SAY_PHASE303 = -1595098, //Arthas
- SAY_PHASE304 = -1595099, //Arthas
- SAY_PHASE305 = -1595100, //Drakonian
- SAY_PHASE306 = -1595101, //Arthas
- SAY_PHASE307 = -1595102, //Arthas
- SAY_PHASE308 = -1595103, //Arthas
- SAY_PHASE309 = -1595104, //Arthas
- SAY_PHASE310 = -1595105, //Arthas
- SAY_PHASE311 = -1595106, //Arthas
- SAY_PHASE312 = -1595107, //Arthas
- SAY_PHASE313 = -1595108, //Arthas
- SAY_PHASE314 = -1595000, //Epoch
- SAY_PHASE315 = -1595109, //Arthas
+ SAY_PHASE301 = 16,
+ SAY_PHASE303 = 17,
+ SAY_PHASE304 = 18,
+ SAY_PHASE306 = 19,
+ SAY_PHASE307 = 20,
+ SAY_PHASE308 = 21,
+ SAY_PHASE309 = 22,
+ SAY_PHASE310 = 23,
+ SAY_PHASE311 = 24,
+ SAY_PHASE312 = 25,
+ SAY_PHASE313 = 26,
+ SAY_PHASE315 = 27,
+
//Fourth Act - Fire Corridor
- SAY_PHASE401 = -1595110, //Arthas
- SAY_PHASE402 = -1595111, //Arthas
- SAY_PHASE403 = -1595112, //Arthas
- SAY_PHASE404 = -1595113, //Arthas
- SAY_PHASE405 = -1595114, //Arthas
- SAY_PHASE406 = -1595115, //Arthas
- SAY_PHASE407 = -1595116, //Arthas
+ SAY_PHASE401 = 28,
+ SAY_PHASE402 = 29,
+ SAY_PHASE403 = 30,
+ SAY_PHASE404 = 31,
+ SAY_PHASE405 = 32,
+ SAY_PHASE406 = 33,
+ SAY_PHASE407 = 34,
+
//Fifth Act - Mal'Ganis Fight
- SAY_PHASE501 = -1595117, //Arthas
- SAY_PHASE502 = -1595118, //Arthas
- SAY_PHASE503 = -1595119, //Arthas
- SAY_PHASE504 = -1595120, //Arthas
+ SAY_PHASE501 = 35,
+ SAY_PHASE502 = 36,
+ SAY_PHASE503 = 37,
+ SAY_PHASE504 = 38,
+
+ //Malganis
+ SAY_PHASE206 = 0,
+ SAY_PHASE207 = 1,
+
+ //Epoch
+ SAY_PHASE314 = 0,
+
+ //Uther
+ SAY_PHASE102 = 0,
+ SAY_PHASE105 = 1,
+ SAY_PHASE107 = 2,
+ SAY_PHASE109 = 3,
+ SAY_PHASE111 = 4,
+ SAY_PHASE115 = 5,
+
+ //Jaina
+ SAY_PHASE113 = 0,
+ SAY_PHASE117 = 1,
+
+ //Cityman
+ SAY_PHASE202 = 0,
+
+ //Crazyman
+ SAY_PHASE204 = 0,
+
+ //Drakonian
+ SAY_PHASE302 = 0,
+ SAY_PHASE305 = 1,
};
enum NPCs
@@ -250,27 +269,27 @@ public:
ai->Start(true, true, player->GetGUID(), 0, false, false);
ai->SetDespawnAtEnd(false);
ai->bStepping = false;
- ai->uiStep = 1;
+ ai->step = 1;
break;
case GOSSIP_ACTION_INFO_DEF+1:
ai->bStepping = true;
- ai->uiStep = 24;
+ ai->step = 24;
break;
case GOSSIP_ACTION_INFO_DEF+2:
ai->SetHoldState(false);
ai->bStepping = false;
- ai->uiStep = 61;
+ ai->step = 61;
break;
case GOSSIP_ACTION_INFO_DEF+3:
ai->SetHoldState(false);
break;
case GOSSIP_ACTION_INFO_DEF+4:
ai->bStepping = true;
- ai->uiStep = 84;
+ ai->step = 84;
break;
case GOSSIP_ACTION_INFO_DEF+5:
ai->bStepping = true;
- ai->uiStep = 85;
+ ai->step = 85;
break;
}
player->CLOSE_GOSSIP_MENU();
@@ -285,7 +304,7 @@ public:
if (ai && ai->bStepping == false)
{
- switch (ai->uiGossipStep)
+ switch (ai->gossipStep)
{
case 0: //This one is a workaround since the very beggining of the script is wrong.
{
@@ -339,46 +358,46 @@ public:
InstanceScript* instance;
bool bStepping;
- uint32 uiStep;
- uint32 uiPhaseTimer;
- uint32 uiGossipStep;
- uint32 uiPlayerFaction;
- uint32 uiBossEvent;
- uint32 uiWave;
-
- uint64 uiUtherGUID;
- uint64 uiJainaGUID;
- uint64 uiCitymenGUID[2];
- uint64 uiWaveGUID[ENCOUNTER_WAVES_MAX_SPAWNS];
- uint64 uiInfiniteDraconianGUID[ENCOUNTER_DRACONIAN_NUMBER];
- uint64 uiStalkerGUID;
-
- uint64 uiBossGUID; //uiMeathookGUID || uiSalrammGUID
- uint64 uiEpochGUID;
- uint64 uiMalganisGUID;
- uint64 uiInfiniteGUID;
-
- uint32 uiExorcismTimer;
+ uint32 step;
+ uint32 phaseTimer;
+ uint32 gossipStep;
+ uint32 playerFaction;
+ uint32 bossEvent;
+ uint32 wave;
+
+ uint64 utherGUID;
+ uint64 jainaGUID;
+ uint64 citymenGUID[2];
+ uint64 waveGUID[ENCOUNTER_WAVES_MAX_SPAWNS];
+ uint64 infiniteDraconianGUID[ENCOUNTER_DRACONIAN_NUMBER];
+ uint64 stalkerGUID;
+
+ uint64 bossGUID;
+ uint64 epochGUID;
+ uint64 malganisGUID;
+ uint64 infiniteGUID;
+
+ uint32 exorcismTimer;
void Reset()
{
- uiUtherGUID = 0;
- uiJainaGUID = 0;
+ utherGUID = 0;
+ jainaGUID = 0;
for (uint8 i = 0; i < 2; ++i)
- uiCitymenGUID[i] = 0;
+ citymenGUID[i] = 0;
for (uint8 i = 0; i < ENCOUNTER_WAVES_MAX_SPAWNS; ++i)
- uiWaveGUID[i] = 0;
+ waveGUID[i] = 0;
for (uint8 i = 0; i < ENCOUNTER_DRACONIAN_NUMBER; ++i)
- uiInfiniteDraconianGUID[i] = 0;
+ infiniteDraconianGUID[i] = 0;
- uiStalkerGUID = 0;
- uiBossGUID = 0;
- uiEpochGUID = 0;
- uiMalganisGUID = 0;
- uiInfiniteGUID = 0;
+ stalkerGUID = 0;
+ bossGUID = 0;
+ epochGUID = 0;
+ malganisGUID = 0;
+ infiniteGUID = 0;
if (instance) {
instance->SetData(DATA_ARTHAS_EVENT, NOT_STARTED);
@@ -386,15 +405,15 @@ public:
{
case NOT_STARTED:
bStepping = true;
- uiStep = 0;
+ step = 0;
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
- uiBossEvent = DATA_MEATHOOK_EVENT;
- uiGossipStep = 0;
+ bossEvent = DATA_MEATHOOK_EVENT;
+ gossipStep = 0;
break;
}
- uiPhaseTimer = 1000;
- uiExorcismTimer = 7300;
- uiWave = 0;
+ phaseTimer = 1000;
+ exorcismTimer = 7300;
+ wave = 0;
}
}
@@ -423,7 +442,7 @@ public:
temp->SetReactState(REACT_PASSIVE);
temp->GetMotionMaster()->MovePoint(0, RiftAndSpawnsLocations[i][1], RiftAndSpawnsLocations[i][2], RiftAndSpawnsLocations[i][3]);
if ((uint32)RiftAndSpawnsLocations[i][0] == NPC_EPOCH)
- uiEpochGUID = temp->GetGUID();
+ epochGUID = temp->GetGUID();
}
}
}
@@ -447,8 +466,8 @@ public:
void JumpToNextStep(uint32 uiTimer)
{
- uiPhaseTimer = uiTimer;
- ++uiStep;
+ phaseTimer = uiTimer;
+ ++step;
}
void WaypointReached(uint32 waypointId)
@@ -470,74 +489,74 @@ public:
bStepping = true;
break;
case 7:
- if (Unit* pCityman0 = me->SummonCreature(NPC_CITY_MAN, 2091.977f, 1275.021f, 140.757f, 0.558f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000))
- uiCitymenGUID[0] = pCityman0->GetGUID();
- if (Unit* pCityman1 = me->SummonCreature(NPC_CITY_MAN2, 2093.514f, 1275.842f, 140.408f, 3.801f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000))
- uiCitymenGUID[1] = pCityman1->GetGUID();
+ if (Unit* cityman0 = me->SummonCreature(NPC_CITY_MAN, 2091.977f, 1275.021f, 140.757f, 0.558f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000))
+ citymenGUID[0] = cityman0->GetGUID();
+ if (Unit* cityman1 = me->SummonCreature(NPC_CITY_MAN2, 2093.514f, 1275.842f, 140.408f, 3.801f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000))
+ citymenGUID[1] = cityman1->GetGUID();
break;
case 8:
- uiGossipStep = 1;
+ gossipStep = 1;
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
SetHoldState(true);
break;
case 12:
SetRun(true);
- DoScriptText(SAY_PHASE210, me);
- if (Unit* pDisguised0 = me->SummonCreature(NPC_CITY_MAN3, 2398.14f, 1207.81f, 134.04f, 5.155249f, TEMPSUMMON_DEAD_DESPAWN, 180000))
+ Talk(SAY_PHASE210);
+ if (Unit* disguised0 = me->SummonCreature(NPC_CITY_MAN3, 2398.14f, 1207.81f, 134.04f, 5.155249f, TEMPSUMMON_DEAD_DESPAWN, 180000))
{
- uiInfiniteDraconianGUID[0] = pDisguised0->GetGUID();
- if (Unit* pDisguised1 = me->SummonCreature(NPC_CITY_MAN4, 2403.22f, 1205.54f, 134.04f, 3.311264f, TEMPSUMMON_DEAD_DESPAWN, 180000))
+ infiniteDraconianGUID[0] = disguised0->GetGUID();
+ if (Unit* disguised1 = me->SummonCreature(NPC_CITY_MAN4, 2403.22f, 1205.54f, 134.04f, 3.311264f, TEMPSUMMON_DEAD_DESPAWN, 180000))
{
- uiInfiniteDraconianGUID[1] = pDisguised1->GetGUID();
+ infiniteDraconianGUID[1] = disguised1->GetGUID();
- if (Unit* pDisguised2 = me->SummonCreature(NPC_CITY_MAN, 2400.82f, 1201.69f, 134.01f, 1.534082f, TEMPSUMMON_DEAD_DESPAWN, 180000))
+ if (Unit* disguised2 = me->SummonCreature(NPC_CITY_MAN, 2400.82f, 1201.69f, 134.01f, 1.534082f, TEMPSUMMON_DEAD_DESPAWN, 180000))
{
- uiInfiniteDraconianGUID[2] = pDisguised2->GetGUID();
- pDisguised0->SetTarget(uiInfiniteDraconianGUID[1]);
- pDisguised1->SetTarget(uiInfiniteDraconianGUID[0]);
- pDisguised2->SetTarget(uiInfiniteDraconianGUID[1]);
+ infiniteDraconianGUID[2] = disguised2->GetGUID();
+ disguised0->SetTarget(infiniteDraconianGUID[1]);
+ disguised1->SetTarget(infiniteDraconianGUID[0]);
+ disguised2->SetTarget(infiniteDraconianGUID[1]);
}
}
}
break;
case 20:
- uiGossipStep = 2;
+ gossipStep = 2;
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
SetRun(false);
SetHoldState(true);
break;
case 21:
- DoScriptText(SAY_PHASE301, me);
+ Talk(SAY_PHASE301);
break;
case 25:
SetRun(false);
- SpawnTimeRift(0, &uiInfiniteDraconianGUID[0]);
- DoScriptText(SAY_PHASE307, me);
+ SpawnTimeRift(0, &infiniteDraconianGUID[0]);
+ Talk(SAY_PHASE307);
break;
case 29:
SetRun(false);
- SpawnTimeRift(5, &uiInfiniteDraconianGUID[0]);
- SpawnTimeRift(8, &uiInfiniteDraconianGUID[2]);
- DoScriptText(SAY_PHASE309, me);
+ SpawnTimeRift(5, &infiniteDraconianGUID[0]);
+ SpawnTimeRift(8, &infiniteDraconianGUID[2]);
+ Talk(SAY_PHASE309);
SetHoldState(true);
bStepping = true;
break;
case 31:
SetRun(false);
- SpawnTimeRift(11, &uiInfiniteDraconianGUID[0]);
- SpawnTimeRift(14, &uiInfiniteDraconianGUID[2]);
- DoScriptText(SAY_PHASE311, me);
+ SpawnTimeRift(11, &infiniteDraconianGUID[0]);
+ SpawnTimeRift(14, &infiniteDraconianGUID[2]);
+ Talk(SAY_PHASE311);
SetHoldState(true);
bStepping = true;
break;
case 32:
- DoScriptText(SAY_PHASE401, me);
+ Talk(SAY_PHASE401);
break;
case 34:
- DoScriptText(SAY_PHASE402, me);
+ Talk(SAY_PHASE402);
break;
case 35:
- DoScriptText(SAY_PHASE403, me);
+ Talk(SAY_PHASE403);
break;
case 36:
if (instance)
@@ -547,23 +566,23 @@ public:
case 45:
SetRun(true);
SetDespawnAtFar(false);
- uiGossipStep = 4;
+ gossipStep = 4;
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
SetHoldState(true);
break;
case 47:
SetRun(false);
- DoScriptText(SAY_PHASE405, me);
+ Talk(SAY_PHASE405);
break;
case 48:
SetRun(true);
- DoScriptText(SAY_PHASE406, me);
+ Talk(SAY_PHASE406);
break;
case 53:
- DoScriptText(SAY_PHASE407, me);
+ Talk(SAY_PHASE407);
break;
case 54:
- uiGossipStep = 5;
+ gossipStep = 5;
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
SetHoldState(true);
break;
@@ -578,18 +597,18 @@ public:
if (bStepping)
{
- if (uiPhaseTimer <= diff)
+ if (phaseTimer <= diff)
{
- switch (uiStep)
+ switch (step)
{
//After reset
case 0:
{
- Unit* pJaina = GetClosestCreatureWithEntry(me, NPC_JAINA, 50.0f);
- if (!pJaina)
- pJaina = me->SummonCreature(NPC_JAINA, 1895.48f, 1292.66f, 143.706f, 0.023475f, TEMPSUMMON_DEAD_DESPAWN, 180000);
- if (pJaina)
- uiJainaGUID = pJaina->GetGUID();
+ Unit* jaina = GetClosestCreatureWithEntry(me, NPC_JAINA, 50.0f);
+ if (!jaina)
+ jaina = me->SummonCreature(NPC_JAINA, 1895.48f, 1292.66f, 143.706f, 0.023475f, TEMPSUMMON_DEAD_DESPAWN, 180000);
+ if (jaina)
+ jainaGUID = jaina->GetGUID();
bStepping = false;
JumpToNextStep(0);
break;
@@ -597,24 +616,24 @@ public:
//After waypoint 0
case 1:
me->SetWalk(false);
- if (Unit* pUther = me->SummonCreature(NPC_UTHER, 1794.357f, 1272.183f, 140.558f, 1.37f, TEMPSUMMON_DEAD_DESPAWN, 180000))
+ if (Unit* uther = me->SummonCreature(NPC_UTHER, 1794.357f, 1272.183f, 140.558f, 1.37f, TEMPSUMMON_DEAD_DESPAWN, 180000))
{
- uiUtherGUID = pUther->GetGUID();
- pUther->SetWalk(false);
- pUther->GetMotionMaster()->MovePoint(0, 1897.018f, 1287.487f, 143.481f);
- pUther->SetTarget(me->GetGUID());
- me->SetTarget(uiUtherGUID);
+ utherGUID = uther->GetGUID();
+ uther->SetWalk(false);
+ uther->GetMotionMaster()->MovePoint(0, 1897.018f, 1287.487f, 143.481f);
+ uther->SetTarget(me->GetGUID());
+ me->SetTarget(utherGUID);
}
JumpToNextStep(17000);
break;
case 2:
- DoScriptText(SAY_PHASE101, me);
+ Talk(SAY_PHASE101);
JumpToNextStep(2000);
break;
case 3:
- if (Creature* pUther = Unit::GetCreature(*me, uiUtherGUID))
+ if (Creature* uther = Unit::GetCreature(*me, utherGUID))
{
- DoScriptText(SAY_PHASE102, pUther);
+ uther->AI()->Talk(SAY_PHASE102);
}
JumpToNextStep(8000);
break;
@@ -622,90 +641,90 @@ public:
SetEscortPaused(false);
bStepping = false;
SetRun(false);
- DoScriptText(SAY_PHASE103, me);
+ Talk(SAY_PHASE103);
JumpToNextStep(0);
break;
//After waypoint 1
case 5:
- if (Creature* pJaina = Unit::GetCreature(*me, uiJainaGUID))
- pJaina->SetTarget(me->GetGUID());
- DoScriptText(SAY_PHASE104, me);
+ if (Creature* jaina = Unit::GetCreature(*me, jainaGUID))
+ jaina->SetTarget(me->GetGUID());
+ Talk(SAY_PHASE104);
JumpToNextStep(10000);
break;
case 6:
- if (Creature* pUther = Unit::GetCreature(*me, uiUtherGUID))
- DoScriptText(SAY_PHASE105, pUther);
+ if (Creature* uther = Unit::GetCreature(*me, utherGUID))
+ uther->AI()->Talk(SAY_PHASE105);
JumpToNextStep(1000);
break;
case 7:
- DoScriptText(SAY_PHASE106, me);
+ Talk(SAY_PHASE106);
JumpToNextStep(4000);
break;
case 8:
- if (Creature* pUther = Unit::GetCreature(*me, uiUtherGUID))
- DoScriptText(SAY_PHASE107, pUther);
+ if (Creature* uther = Unit::GetCreature(*me, utherGUID))
+ uther->AI()->Talk(SAY_PHASE107);
JumpToNextStep(6000);
break;
case 9:
- DoScriptText(SAY_PHASE108, me);
+ Talk(SAY_PHASE108);
JumpToNextStep(4000);
break;
case 10:
- if (Creature* pUther = Unit::GetCreature(*me, uiUtherGUID))
- DoScriptText(SAY_PHASE109, pUther);
+ if (Creature* uther = Unit::GetCreature(*me, utherGUID))
+ uther->AI()->Talk(SAY_PHASE109);
JumpToNextStep(8000);
break;
case 11:
- DoScriptText(SAY_PHASE110, me);
+ Talk(SAY_PHASE110);
JumpToNextStep(4000);
break;
case 12:
- if (Creature* pUther = Unit::GetCreature(*me, uiUtherGUID))
- DoScriptText(SAY_PHASE111, pUther);
+ if (Creature* uther = Unit::GetCreature(*me, utherGUID))
+ uther->AI()->Talk(SAY_PHASE111);
JumpToNextStep(4000);
break;
case 13:
- DoScriptText(SAY_PHASE112, me);
+ Talk(SAY_PHASE112);
JumpToNextStep(11000);
break;
case 14:
- if (Creature* pJaina = Unit::GetCreature(*me, uiJainaGUID))
- DoScriptText(SAY_PHASE113, pJaina);
+ if (Creature* jaina = Unit::GetCreature(*me, jainaGUID))
+ jaina->AI()->Talk(SAY_PHASE113);
JumpToNextStep(3000);
break;
case 15:
- DoScriptText(SAY_PHASE114, me);
+ Talk(SAY_PHASE114);
JumpToNextStep(9000);
break;
case 16:
- if (Creature* pUther = Unit::GetCreature(*me, uiUtherGUID))
- DoScriptText(SAY_PHASE115, pUther);
+ if (Creature* uther = Unit::GetCreature(*me, utherGUID))
+ uther->AI()->Talk(SAY_PHASE115);
JumpToNextStep(4000);
break;
case 17:
- if (Creature* pUther = Unit::GetCreature(*me, uiUtherGUID))
+ if (Creature* uther = Unit::GetCreature(*me, utherGUID))
{
- pUther->SetWalk(true);
- pUther->GetMotionMaster()->MovePoint(0, 1794.357f, 1272.183f, 140.558f);
+ uther->SetWalk(true);
+ uther->GetMotionMaster()->MovePoint(0, 1794.357f, 1272.183f, 140.558f);
}
JumpToNextStep(1000);
break;
case 18:
- if (Creature* pJaina = Unit::GetCreature(*me, uiJainaGUID))
+ if (Creature* jaina = Unit::GetCreature(*me, jainaGUID))
{
- me->SetTarget(uiJainaGUID);
- pJaina->SetWalk(true);
- pJaina->GetMotionMaster()->MovePoint(0, 1794.357f, 1272.183f, 140.558f);
+ me->SetTarget(jainaGUID);
+ jaina->SetWalk(true);
+ jaina->GetMotionMaster()->MovePoint(0, 1794.357f, 1272.183f, 140.558f);
}
JumpToNextStep(1000);
break;
case 19:
- DoScriptText(SAY_PHASE116, me);
+ Talk(SAY_PHASE116);
JumpToNextStep(1000);
break;
case 20:
- if (Creature* pJaina = Unit::GetCreature(*me, uiJainaGUID))
- DoScriptText(SAY_PHASE117, pJaina);
+ if (Creature* jaina = Unit::GetCreature(*me, jainaGUID))
+ jaina->AI()->Talk(SAY_PHASE117);
JumpToNextStep(3000);
break;
case 21:
@@ -716,8 +735,8 @@ public:
break;
//After waypoint 3
case 22:
- DoScriptText(SAY_PHASE118, me);
- me->SetTarget(uiJainaGUID);
+ Talk(SAY_PHASE118);
+ me->SetTarget(jainaGUID);
JumpToNextStep(10000);
break;
case 23:
@@ -725,11 +744,11 @@ public:
bStepping = false;
SetRun(true);
- if (Creature* pJaina = Unit::GetCreature(*me, uiJainaGUID))
- pJaina->DisappearAndDie();
+ if (Creature* jaina = Unit::GetCreature(*me, jainaGUID))
+ jaina->DisappearAndDie();
- if (Creature* pUther = Unit::GetCreature(*me, uiUtherGUID))
- pUther->DisappearAndDie();
+ if (Creature* uther = Unit::GetCreature(*me, utherGUID))
+ uther->DisappearAndDie();
me->SetTarget(0);
JumpToNextStep(0);
@@ -738,13 +757,13 @@ public:
case 24:
if (Unit* pStalker = me->SummonCreature(NPC_INVIS_TARGET, 2026.469f, 1287.088f, 143.596f, 1.37f, TEMPSUMMON_TIMED_DESPAWN, 14000))
{
- uiStalkerGUID = pStalker->GetGUID();
- me->SetTarget(uiStalkerGUID);
+ stalkerGUID = pStalker->GetGUID();
+ me->SetTarget(stalkerGUID);
}
JumpToNextStep(1000);
break;
case 25:
- DoScriptText(SAY_PHASE201, me);
+ Talk(SAY_PHASE201);
JumpToNextStep(12000);
break;
case 26:
@@ -756,24 +775,24 @@ public:
break;
//After waypoint 9
case 27:
- me->SetTarget(uiCitymenGUID[0]);
- if (Creature* pCityman = Unit::GetCreature(*me, uiCitymenGUID[0]))
+ me->SetTarget(citymenGUID[0]);
+ if (Creature* cityman = Unit::GetCreature(*me, citymenGUID[0]))
{
- pCityman->SetTarget(me->GetGUID());
- pCityman->SetWalk(true);
- pCityman->GetMotionMaster()->MovePoint(0, 2088.625f, 1279.191f, 140.743f);
+ cityman->SetTarget(me->GetGUID());
+ cityman->SetWalk(true);
+ cityman->GetMotionMaster()->MovePoint(0, 2088.625f, 1279.191f, 140.743f);
}
JumpToNextStep(2000);
break;
case 28:
- if (Creature* pCityman = Unit::GetCreature(*me, uiCitymenGUID[0]))
- DoScriptText(SAY_PHASE202, pCityman);
+ if (Creature* cityman = Unit::GetCreature(*me, citymenGUID[0]))
+ cityman->AI()->Talk(SAY_PHASE202);
JumpToNextStep(4000);
break;
case 29:
SetEscortPaused(false);
bStepping = false;
- DoScriptText(SAY_PHASE203, me);
+ Talk(SAY_PHASE203);
JumpToNextStep(0);
break;
//After waypoint 10
@@ -784,13 +803,13 @@ public:
case 31:
SetEscortPaused(false);
bStepping = false;
- if (Creature* pCityman1 = Unit::GetCreature(*me, uiCitymenGUID[1]))
+ if (Creature* cityman1 = Unit::GetCreature(*me, citymenGUID[1]))
{
- DoScriptText(SAY_PHASE204, pCityman1);
- pCityman1->SetTarget(me->GetGUID());
- if (Creature* pCityman0 = Unit::GetCreature(*me, uiCitymenGUID[0]))
- pCityman0->Kill(pCityman0);
- me->SetTarget(uiCitymenGUID[1]);
+ cityman1->AI()->Talk(SAY_PHASE204);
+ cityman1->SetTarget(me->GetGUID());
+ if (Creature* cityman0 = Unit::GetCreature(*me, citymenGUID[0]))
+ cityman0->Kill(cityman0);
+ me->SetTarget(citymenGUID[1]);
}
JumpToNextStep(0);
break;
@@ -800,75 +819,75 @@ public:
JumpToNextStep(1000);
break;
case 33:
- if (Creature* pCityman1 = Unit::GetCreature(*me, uiCitymenGUID[1]))
- pCityman1->Kill(pCityman1);
+ if (Creature* cityman1 = Unit::GetCreature(*me, citymenGUID[1]))
+ cityman1->Kill(cityman1);
JumpToNextStep(1000);
break;
case 34:
if (Unit* pStalker = me->SummonCreature(NPC_INVIS_TARGET, 2081.447f, 1287.770f, 141.3241f, 1.37f, TEMPSUMMON_TIMED_DESPAWN, 10000))
{
- uiStalkerGUID = pStalker->GetGUID();
- me->SetTarget(uiStalkerGUID);
+ stalkerGUID = pStalker->GetGUID();
+ me->SetTarget(stalkerGUID);
}
- DoScriptText(SAY_PHASE205, me);
+ Talk(SAY_PHASE205);
JumpToNextStep(3000);
break;
case 35:
if (Unit* pStalkerM = me->SummonCreature(NPC_INVIS_TARGET, 2117.349f, 1288.624f, 136.271f, 1.37f, TEMPSUMMON_TIMED_DESPAWN, 60000))
{
- uiStalkerGUID = pStalkerM->GetGUID();
- me->SetTarget(uiStalkerGUID);
+ stalkerGUID = pStalkerM->GetGUID();
+ me->SetTarget(stalkerGUID);
}
JumpToNextStep(1000);
break;
case 36:
- if (Creature* pMalganis = me->SummonCreature(NPC_MAL_GANIS, 2117.349f, 1288.624f, 136.271f, 1.37f, TEMPSUMMON_TIMED_DESPAWN, 60000))
+ 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, uiStalkerGUID))
- pMalganis->CastSpell(pStalkerM, 63793, false);
+ if (Creature* pStalkerM = Unit::GetCreature(*me, stalkerGUID))
+ malganis->CastSpell(pStalkerM, 63793, false);
- uiMalganisGUID = pMalganis->GetGUID();
- DoScriptText(SAY_PHASE206, pMalganis);
- pMalganis->SetTarget(me->GetGUID());
- pMalganis->SetReactState(REACT_PASSIVE);
+ malganisGUID = malganis->GetGUID();
+ malganis->AI()->Talk(SAY_PHASE206);
+ malganis->SetTarget(me->GetGUID());
+ malganis->SetReactState(REACT_PASSIVE);
}
JumpToNextStep(11000);
break;
case 37:
- if (Creature* pMalganis = Unit::GetCreature(*me, uiMalganisGUID))
+ if (Creature* malganis = Unit::GetCreature(*me, malganisGUID))
{
- Creature* pZombie = GetClosestCreatureWithEntry(pMalganis, NPC_CITY_MAN, 100.0f);
+ Creature* pZombie = GetClosestCreatureWithEntry(malganis, NPC_CITY_MAN, 100.0f);
if (!pZombie)
- pZombie = GetClosestCreatureWithEntry(pMalganis, NPC_CITY_MAN2, 100.0f);
+ pZombie = GetClosestCreatureWithEntry(malganis, NPC_CITY_MAN2, 100.0f);
if (pZombie)
pZombie->UpdateEntry(NPC_ZOMBIE, 0);
else //There's no one else to transform
- uiStep++;
+ step++;
}
else
- uiStep++;
- uiPhaseTimer = 500;
+ step++;
+ phaseTimer = 500;
break;
case 38:
- if (Creature* pMalganis = Unit::GetCreature(*me, uiMalganisGUID))
- DoScriptText(SAY_PHASE207, pMalganis);
+ if (Creature* malganis = Unit::GetCreature(*me, malganisGUID))
+ malganis->AI()->Talk(SAY_PHASE207);
JumpToNextStep(17000);
break;
case 39:
- if (Creature* pMalganis = Unit::GetCreature(*me, uiMalganisGUID))
- pMalganis->SetVisible(false);
- DoScriptText(SAY_PHASE208, me);
+ if (Creature* malganis = Unit::GetCreature(*me, malganisGUID))
+ malganis->SetVisible(false);
+ Talk(SAY_PHASE208);
JumpToNextStep(7000);
break;
case 40:
if (Unit* pStalker = me->SummonCreature(NPC_INVIS_TARGET, 2081.447f, 1287.770f, 141.3241f, 1.37f, TEMPSUMMON_TIMED_DESPAWN, 10000))
{
- uiStalkerGUID = pStalker->GetGUID();
- me->SetTarget(uiStalkerGUID);
+ stalkerGUID = pStalker->GetGUID();
+ me->SetTarget(stalkerGUID);
}
- DoScriptText(SAY_PHASE209, me);
+ Talk(SAY_PHASE209);
- uiBossEvent = DATA_MEATHOOK_EVENT;
+ bossEvent = DATA_MEATHOOK_EVENT;
if (instance)
instance->SetData(DATA_ARTHAS_EVENT, IN_PROGRESS);
@@ -884,10 +903,10 @@ public:
case 53:
case 55:
case 57:
- if (instance->GetData(uiBossEvent) != DONE)
+ if (instance->GetData(bossEvent) != DONE)
{
- SpawnWaveGroup(uiWave, uiWaveGUID);
- uiWave++;
+ SpawnWaveGroup(wave, waveGUID);
+ wave++;
}
JumpToNextStep(500);
break;
@@ -899,16 +918,16 @@ public:
case 54:
case 56:
case 58:
- if (instance->GetData(uiBossEvent) != DONE)
+ if (instance->GetData(bossEvent) != DONE)
{
uint32 mobCounter = 0;
uint32 deadCounter = 0;
for (uint8 i = 0; i < ENCOUNTER_WAVES_MAX_SPAWNS; ++i)
{
- if (uiWaveGUID[i] == 0)
+ if (waveGUID[i] == 0)
break;
++mobCounter;
- Unit* temp = Unit::GetCreature(*me, uiWaveGUID[i]);
+ Unit* temp = Unit::GetCreature(*me, waveGUID[i]);
if (!temp || temp->isDead())
++deadCounter;
}
@@ -916,24 +935,24 @@ public:
if (mobCounter <= deadCounter) //If group is dead
JumpToNextStep(1000);
else
- uiPhaseTimer = 1000;
+ phaseTimer = 1000;
}
else
JumpToNextStep(500);
break;
case 49: //Summon Boss
case 59:
- if (instance->GetData(uiBossEvent) != DONE)
+ if (instance->GetData(bossEvent) != DONE)
{
uint32 uiBossID = 0;
- if (uiBossEvent == DATA_MEATHOOK_EVENT)
+ if (bossEvent == DATA_MEATHOOK_EVENT)
uiBossID = NPC_MEATHOOK;
- else if (uiBossEvent == DATA_SALRAMM_EVENT)
+ else if (bossEvent == DATA_SALRAMM_EVENT)
uiBossID = NPC_SALRAMM;
if (Unit* pBoss = me->SummonCreature(uiBossID, 2232.19f, 1331.933f, 126.662f, 3.15f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 900000))
{
- uiBossGUID = pBoss->GetGUID();
+ bossGUID = pBoss->GetGUID();
pBoss->SetWalk(true);
pBoss->GetMotionMaster()->MovePoint(0, 2194.110f, 1332.00f, 130.00f);
}
@@ -944,42 +963,42 @@ public:
case 60:
if (instance)
{
- if (instance->GetData(uiBossEvent) == DONE)
+ if (instance->GetData(bossEvent) == DONE)
{
JumpToNextStep(1000);
- if (uiBossEvent == DATA_MEATHOOK_EVENT)
- uiBossEvent = DATA_SALRAMM_EVENT;
- else if (uiBossEvent == DATA_SALRAMM_EVENT)
+ if (bossEvent == DATA_MEATHOOK_EVENT)
+ bossEvent = DATA_SALRAMM_EVENT;
+ else if (bossEvent == DATA_SALRAMM_EVENT)
{
SetHoldState(false);
bStepping = false;
- uiBossEvent = DATA_EPOCH_EVENT;
+ bossEvent = DATA_EPOCH_EVENT;
}
}
- else if (instance->GetData(uiBossEvent) == FAIL)
+ else if (instance->GetData(bossEvent) == FAIL)
npc_escortAI::EnterEvadeMode();
else
- uiPhaseTimer = 10000;
+ phaseTimer = 10000;
}
break;
//After Gossip 2 (waypoint 22)
case 61:
me->SetReactState(REACT_AGGRESSIVE);
- if (Creature* pDisguised0 = Unit::GetCreature(*me, uiInfiniteDraconianGUID[0]))
- pDisguised0->SetTarget(me->GetGUID());
- if (Creature* pDisguised1 = Unit::GetCreature(*me, uiInfiniteDraconianGUID[1]))
- pDisguised1->SetTarget(me->GetGUID());
- if (Creature* pDisguised2 = Unit::GetCreature(*me, uiInfiniteDraconianGUID[2]))
- pDisguised2->SetTarget(me->GetGUID());
+ if (Creature* disguised0 = Unit::GetCreature(*me, infiniteDraconianGUID[0]))
+ disguised0->SetTarget(me->GetGUID());
+ if (Creature* disguised1 = Unit::GetCreature(*me, infiniteDraconianGUID[1]))
+ disguised1->SetTarget(me->GetGUID());
+ if (Creature* disguised2 = Unit::GetCreature(*me, infiniteDraconianGUID[2]))
+ disguised2->SetTarget(me->GetGUID());
JumpToNextStep(1000);
break;
case 62:
- if (Creature* pDisguised0 = Unit::GetCreature(*me, uiInfiniteDraconianGUID[0]))
- DoScriptText(SAY_PHASE302, pDisguised0);
+ if (Creature* disguised0 = Unit::GetCreature(*me, infiniteDraconianGUID[0]))
+ disguised0->AI()->Talk(SAY_PHASE302);
JumpToNextStep(7000);
break;
case 63:
- DoScriptText(SAY_PHASE303, me);
+ Talk(SAY_PHASE303);
SetHoldState(false);
bStepping = false;
JumpToNextStep(0);
@@ -990,46 +1009,46 @@ public:
JumpToNextStep(1000);
break;
case 65:
- if (Creature* pDisguised0 = Unit::GetCreature(*me, uiInfiniteDraconianGUID[0]))
- pDisguised0->HandleEmoteCommand(11);
+ if (Creature* disguised0 = Unit::GetCreature(*me, infiniteDraconianGUID[0]))
+ disguised0->HandleEmoteCommand(11);
JumpToNextStep(1000);
break;
case 66:
- DoScriptText(SAY_PHASE304, me);
+ Talk(SAY_PHASE304);
JumpToNextStep(2000);
break;
case 67:
- if (Creature* pDisguised0 = Unit::GetCreature(*me, uiInfiniteDraconianGUID[0]))
- DoScriptText(SAY_PHASE305, pDisguised0);
+ if (Creature* disguised0 = Unit::GetCreature(*me, infiniteDraconianGUID[0]))
+ disguised0->AI()->Talk(SAY_PHASE305);
JumpToNextStep(1000);
break;
case 68:
- if (Creature* pDisguised2 = Unit::GetCreature(*me, uiInfiniteDraconianGUID[2]))
+ if (Creature* disguised2 = Unit::GetCreature(*me, infiniteDraconianGUID[2]))
{
- pDisguised2->UpdateEntry(NPC_INFINITE_HUNTER, 0);
+ disguised2->UpdateEntry(NPC_INFINITE_HUNTER, 0);
//Make them unattackable
- pDisguised2->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
- pDisguised2->SetReactState(REACT_PASSIVE);
+ disguised2->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
+ disguised2->SetReactState(REACT_PASSIVE);
}
JumpToNextStep(2000);
break;
case 69:
- if (Creature* pDisguised1 = Unit::GetCreature(*me, uiInfiniteDraconianGUID[1]))
+ if (Creature* disguised1 = Unit::GetCreature(*me, infiniteDraconianGUID[1]))
{
- pDisguised1->UpdateEntry(NPC_INFINITE_AGENT, 0);
+ disguised1->UpdateEntry(NPC_INFINITE_AGENT, 0);
//Make them unattackable
- pDisguised1->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
- pDisguised1->SetReactState(REACT_PASSIVE);
+ disguised1->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
+ disguised1->SetReactState(REACT_PASSIVE);
}
JumpToNextStep(2000);
break;
case 70:
- if (Creature* pDisguised0 = Unit::GetCreature(*me, uiInfiniteDraconianGUID[0]))
+ if (Creature* disguised0 = Unit::GetCreature(*me, infiniteDraconianGUID[0]))
{
- pDisguised0->UpdateEntry(NPC_INFINITE_ADVERSARY, 0);
+ disguised0->UpdateEntry(NPC_INFINITE_ADVERSARY, 0);
//Make them unattackable
- pDisguised0->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
- pDisguised0->SetReactState(REACT_PASSIVE);
+ disguised0->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
+ disguised0->SetReactState(REACT_PASSIVE);
}
JumpToNextStep(2000);
break;
@@ -1040,7 +1059,7 @@ public:
case 77:
//Make cratures attackable
for (uint32 i = 0; i< ENCOUNTER_DRACONIAN_NUMBER; ++i)
- if (Creature* temp = Unit::GetCreature(*me, uiInfiniteDraconianGUID[i]))
+ if (Creature* temp = Unit::GetCreature(*me, infiniteDraconianGUID[i]))
{
temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
temp->SetReactState(REACT_AGGRESSIVE);
@@ -1051,12 +1070,12 @@ public:
case 74:
case 76:
if (me->isInCombat())
- uiPhaseTimer = 1000;
+ phaseTimer = 1000;
else
{
- if (uiStep == 72) DoScriptText(SAY_PHASE308, me);
- if (uiStep == 74) DoScriptText(SAY_PHASE308, me);
- if (uiStep == 76) DoScriptText(SAY_PHASE310, me);
+ if (step == 72) Talk(SAY_PHASE308);
+ if (step == 74) Talk(SAY_PHASE308);
+ if (step == 76) Talk(SAY_PHASE310);
SetHoldState(false);
bStepping = false;
SetRun(true);
@@ -1065,44 +1084,44 @@ public:
break;
case 78:
if (me->isInCombat())
- uiPhaseTimer = 1000;
+ phaseTimer = 1000;
else
{
- DoScriptText(SAY_PHASE312, me);
+ Talk(SAY_PHASE312);
JumpToNextStep(5000);
}
break;
case 79:
- DoScriptText(SAY_PHASE313, me);
+ Talk(SAY_PHASE313);
JumpToNextStep(1000);
break;
case 80:
if (instance)
if (instance->GetData(DATA_EPOCH_EVENT) != DONE)
{
- SpawnTimeRift(17, &uiEpochGUID);
- if (Creature* pEpoch = Unit::GetCreature(*me, uiEpochGUID))
- DoScriptText(SAY_PHASE314, pEpoch);
- me->SetTarget(uiEpochGUID);
+ SpawnTimeRift(17, &epochGUID);
+ if (Creature* epoch = Unit::GetCreature(*me, epochGUID))
+ epoch->AI()->Talk(SAY_PHASE314);
+ me->SetTarget(epochGUID);
}
JumpToNextStep(18000);
break;
case 81:
if (instance)
if (instance->GetData(DATA_EPOCH_EVENT) != DONE)
- DoScriptText(SAY_PHASE315, me);
+ Talk(SAY_PHASE315);
JumpToNextStep(6000);
break;
case 82:
if (instance)
if (instance->GetData(DATA_EPOCH_EVENT) != DONE)
{
- if (Creature* pEpoch = Unit::GetCreature(*me, uiEpochGUID))
+ if (Creature* epoch = Unit::GetCreature(*me, epochGUID))
{
//Make Epoch attackable
- pEpoch->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
- pEpoch->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- pEpoch->SetReactState(REACT_AGGRESSIVE);
+ epoch->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
+ epoch->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ epoch->SetReactState(REACT_AGGRESSIVE);
}
}
@@ -1113,31 +1132,31 @@ public:
{
if (instance->GetData(DATA_EPOCH_EVENT) == DONE)
{
- uiGossipStep = 3;
+ gossipStep = 3;
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
bStepping = false;
- uiBossEvent = DATA_MAL_GANIS_EVENT;
+ bossEvent = DATA_MAL_GANIS_EVENT;
JumpToNextStep(15000);
}
else if (instance->GetData(DATA_EPOCH_EVENT) == FAIL)
npc_escortAI::EnterEvadeMode();
else
- uiPhaseTimer = 10000;
+ phaseTimer = 10000;
}
break;
//After Gossip 4
case 84:
- DoScriptText(SAY_PHASE404, me);
+ Talk(SAY_PHASE404);
SetHoldState(false);
bStepping = false;
break;
//After Gossip 5
case 85:
- DoScriptText(SAY_PHASE501, me);
- if (Creature* pMalganis = me->SummonCreature(NPC_MAL_GANIS, 2296.665f, 1502.362f, 128.362f, 4.961f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 900000))
+ Talk(SAY_PHASE501);
+ if (Creature* malganis = me->SummonCreature(NPC_MAL_GANIS, 2296.665f, 1502.362f, 128.362f, 4.961f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 900000))
{
- uiMalganisGUID = pMalganis->GetGUID();
- pMalganis->SetReactState(REACT_PASSIVE);
+ malganisGUID = malganis->GetGUID();
+ malganis->SetReactState(REACT_PASSIVE);
}
if (instance)
if (GameObject* pGate = instance->instance->GetGameObject(instance->GetData64(DATA_MAL_GANIS_GATE_1)))
@@ -1148,15 +1167,15 @@ public:
break;
//After waypoint 55
case 86:
- DoScriptText(SAY_PHASE502, me);
+ Talk(SAY_PHASE502);
JumpToNextStep(6000);
- me->SetTarget(uiMalganisGUID);
+ me->SetTarget(malganisGUID);
break;
case 87:
- if (Creature* pMalganis = Unit::GetCreature(*me, uiMalganisGUID))
+ if (Creature* malganis = Unit::GetCreature(*me, malganisGUID))
{
- pMalganis->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_UNK_6 | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_UNK_15);
- pMalganis->SetReactState(REACT_AGGRESSIVE);
+ 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);
}
JumpToNextStep(1000);
break;
@@ -1171,14 +1190,14 @@ public:
else if (instance->GetData(DATA_MAL_GANIS_EVENT) == FAIL)
npc_escortAI::EnterEvadeMode();
else
- uiPhaseTimer = 10000;
+ phaseTimer = 10000;
}
break;
//After waypoint 56
case 89:
SetRun(true);
- me->SetTarget(uiMalganisGUID);
- DoScriptText(SAY_PHASE503, me);
+ me->SetTarget(malganisGUID);
+ Talk(SAY_PHASE503);
JumpToNextStep(7000);
break;
case 90:
@@ -1187,23 +1206,23 @@ public:
instance->SetData(DATA_ARTHAS_EVENT, DONE); //Rewards: Achiev & Chest ;D
me->SetTarget(instance->GetData64(DATA_MAL_GANIS_GATE_2)); //Look behind
}
- DoScriptText(SAY_PHASE504, me);
+ Talk(SAY_PHASE504);
bStepping = false;
break;
}
- } else uiPhaseTimer -= diff;
+ } else phaseTimer -= diff;
}
//Battling skills
if (!me->getVictim())
return;
- if (uiExorcismTimer < diff)
+ if (exorcismTimer < diff)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(target, SPELL_EXORCISM_N);
- uiExorcismTimer = 7300;
- } else uiExorcismTimer -= diff;
+ exorcismTimer = 7300;
+ } else exorcismTimer -= diff;
if (HealthBelowPct(40))
DoCast(me, SPELL_HOLY_LIGHT);
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp
index 161ea4ba8b7..bcf48ccd7be 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp
@@ -29,13 +29,12 @@ EndScriptData */
enum eEnums
{
- SAY_ENTER = -1269012,
- SAY_AGGRO = -1269013,
- SAY_BANISH = -1269014,
- SAY_SLAY1 = -1269015,
- SAY_SLAY2 = -1269016,
- SAY_DEATH = -1269017,
- EMOTE_FRENZY = -1269018,
+ SAY_ENTER = 0,
+ SAY_AGGRO = 1,
+ SAY_BANISH = 2,
+ SAY_SLAY = 3,
+ SAY_DEATH = 4,
+ EMOTE_FRENZY = 5,
SPELL_CLEAVE = 40504,
SPELL_TIME_STOP = 31422,
@@ -76,7 +75,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void MoveInLineOfSight(Unit* who)
@@ -86,7 +85,7 @@ public:
{
if (me->IsWithinDistInMap(who, 20.0f))
{
- DoScriptText(SAY_BANISH, me);
+ Talk(SAY_BANISH);
me->DealDamage(who, who->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
}
}
@@ -96,7 +95,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
{
@@ -107,7 +106,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me);
+ Talk(SAY_SLAY);
}
void UpdateAI(const uint32 diff)
@@ -133,7 +132,7 @@ public:
//Frenzy
if (Frenzy_Timer <= diff)
{
- DoScriptText(EMOTE_FRENZY, me);
+ Talk(EMOTE_FRENZY);
DoCast(me, SPELL_ENRAGE);
Frenzy_Timer = 20000+rand()%15000;
} else Frenzy_Timer -= diff;
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp
index 8fc7f31e766..244e22149fc 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp
@@ -29,12 +29,11 @@ EndScriptData */
enum eEnums
{
- SAY_ENTER = -1269006,
- SAY_AGGRO = -1269007,
- SAY_BANISH = -1269008,
- SAY_SLAY1 = -1269009,
- SAY_SLAY2 = -1269010,
- SAY_DEATH = -1269011,
+ SAY_ENTER = 0,
+ SAY_AGGRO = 1,
+ SAY_BANISH = 2,
+ SAY_SLAY = 3,
+ SAY_DEATH = 4,
SPELL_ARCANE_BLAST = 31457,
H_SPELL_ARCANE_BLAST = 38538,
@@ -78,7 +77,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void MoveInLineOfSight(Unit* who)
@@ -88,7 +87,7 @@ public:
{
if (me->IsWithinDistInMap(who, 20.0f))
{
- DoScriptText(SAY_BANISH, me);
+ Talk(SAY_BANISH);
me->DealDamage(who, who->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
}
}
@@ -98,12 +97,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(TYPE_RIFT, SPECIAL);
@@ -133,7 +132,7 @@ public:
//Time Lapse
if (TimeLapse_Timer <= diff)
{
- DoScriptText(SAY_BANISH, me);
+ Talk(SAY_BANISH);
DoCast(me, SPELL_TIME_LAPSE);
TimeLapse_Timer = 15000+rand()%10000;
} else TimeLapse_Timer -= diff;
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp
index 0256a099580..02a9f4742b3 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp
@@ -29,12 +29,11 @@ EndScriptData */
enum eEnums
{
- SAY_ENTER = -1269000,
- SAY_AGGRO = -1269001,
- SAY_BANISH = -1269002,
- SAY_SLAY1 = -1269003,
- SAY_SLAY2 = -1269004,
- SAY_DEATH = -1269005,
+ SAY_ENTER = 0,
+ SAY_AGGRO = 1,
+ SAY_BANISH = 2,
+ SAY_SLAY = 3,
+ SAY_DEATH = 4,
SPELL_HASTE = 31458,
SPELL_MORTAL_WOUND = 31464,
@@ -77,17 +76,17 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(TYPE_RIFT, SPECIAL);
@@ -100,7 +99,7 @@ public:
{
if (me->IsWithinDistInMap(who, 20.0f))
{
- DoScriptText(SAY_BANISH, me);
+ Talk(SAY_BANISH);
me->DealDamage(who, who->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp
index 8ca14d72b94..5d9eaeac7b9 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp
@@ -36,29 +36,32 @@ EndContentData */
#include "Player.h"
#include "SpellInfo.h"
-#define SAY_ENTER -1269020 //where does this belong?
-#define SAY_INTRO -1269021
-#define SAY_WEAK75 -1269022
-#define SAY_WEAK50 -1269023
-#define SAY_WEAK25 -1269024
-#define SAY_DEATH -1269025
-#define SAY_WIN -1269026
-#define SAY_ORCS_ENTER -1269027
-#define SAY_ORCS_ANSWER -1269028
+enum MedivhBm
+{
+ SAY_ENTER = 0, //where does this belong?
+ SAY_INTRO = 1,
+ SAY_WEAK75 = 2,
+ SAY_WEAK50 = 3,
+ SAY_WEAK25 = 4,
+ SAY_DEATH = 5,
+ SAY_WIN = 6,
+ SAY_ORCS_ENTER = 7,
+ SAY_ORCS_ANSWER = 8,
-#define SPELL_CHANNEL 31556
-#define SPELL_PORTAL_RUNE 32570 //aura(portal on ground effect)
+ SPELL_CHANNEL = 31556,
+ SPELL_PORTAL_RUNE = 32570, //aura(portal on ground effect)
-#define SPELL_BLACK_CRYSTAL 32563 //aura
-#define SPELL_PORTAL_CRYSTAL 32564 //summon
+ SPELL_BLACK_CRYSTAL = 32563, //aura
+ SPELL_PORTAL_CRYSTAL = 32564, //summon
-#define SPELL_BANISH_PURPLE 32566 //aura
-#define SPELL_BANISH_GREEN 32567 //aura
+ SPELL_BANISH_PURPLE = 32566, //aura
+ SPELL_BANISH_GREEN = 32567, //aura
-#define SPELL_CORRUPT 31326
-#define SPELL_CORRUPT_AEONUS 37853
+ SPELL_CORRUPT = 31326,
+ SPELL_CORRUPT_AEONUS = 37853,
-#define C_COUNCIL_ENFORCER 17023
+ C_COUNCIL_ENFORCER = 17023
+};
class npc_medivh_bm : public CreatureScript
{
@@ -111,7 +114,7 @@ public:
if (instance->GetData(TYPE_MEDIVH) == IN_PROGRESS || instance->GetData(TYPE_MEDIVH) == DONE)
return;
- DoScriptText(SAY_INTRO, me);
+ Talk(SAY_INTRO);
instance->SetData(TYPE_MEDIVH, IN_PROGRESS);
DoCast(me, SPELL_CHANNEL, false);
Check_Timer = 5000;
@@ -162,7 +165,7 @@ public:
if (killer->GetEntry() == me->GetEntry())
return;
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void UpdateAI(const uint32 diff)
@@ -195,17 +198,17 @@ public:
if (Life25 && pct <= 25)
{
- DoScriptText(SAY_WEAK25, me);
+ Talk(SAY_WEAK25);
Life25 = false;
}
else if (Life50 && pct <= 50)
{
- DoScriptText(SAY_WEAK50, me);
+ Talk(SAY_WEAK50);
Life50 = false;
}
else if (Life75 && pct <= 75)
{
- DoScriptText(SAY_WEAK75, me);
+ Talk(SAY_WEAK75);
Life75 = false;
}
@@ -220,7 +223,7 @@ public:
if (instance->GetData(TYPE_RIFT) == DONE)
{
- DoScriptText(SAY_WIN, me);
+ Talk(SAY_WIN);
Check_Timer = 0;
if (me->HasAura(SPELL_CHANNEL))
@@ -363,11 +366,13 @@ public:
};
-#define SAY_SAAT_WELCOME -1269019
+enum Saat
+{
+ SPELL_CHRONO_BEACON = 34975,
+ ITEM_CHRONO_BEACON = 24289
+};
#define GOSSIP_ITEM_OBTAIN "[PH] Obtain Chrono-Beacon"
-#define SPELL_CHRONO_BEACON 34975
-#define ITEM_CHRONO_BEACON 24289
class npc_saat : public CreatureScript
{
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp
index 96cfba0007b..3398395aca6 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp
@@ -27,19 +27,25 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "old_hillsbrad.h"
-#define SAY_ENTER -1560000
-#define SAY_TAUNT1 -1560001
-#define SAY_TAUNT2 -1560002
-#define SAY_SLAY1 -1560003
-#define SAY_SLAY2 -1560004
-#define SAY_DEATH -1560005
-
-#define SPELL_HOLY_LIGHT 29427
-#define SPELL_CLEANSE 29380
-#define SPELL_HAMMER_OF_JUSTICE 13005
-#define SPELL_HOLY_SHIELD 31904
-#define SPELL_DEVOTION_AURA 8258
-#define SPELL_CONSECRATION 38385
+/*######################
+# boss_captain_skarloc #
+#######################*/
+
+enum CaptainSkarloc
+{
+ SAY_ENTER = 0,
+ SAY_TAUNT1 = 1,
+ SAY_TAUNT2 = 2,
+ SAY_SLAY = 3,
+ SAY_DEATH = 4,
+
+ SPELL_HOLY_LIGHT = 29427,
+ SPELL_CLEANSE = 29380,
+ SPELL_HAMMER_OF_JUSTICE = 13005,
+ SPELL_HOLY_SHIELD = 31904,
+ SPELL_DEVOTION_AURA = 8258,
+ SPELL_CONSECRATION = 38385
+};
class boss_captain_skarloc : public CreatureScript
{
@@ -80,18 +86,18 @@ public:
void EnterCombat(Unit* /*who*/)
{
//This is not correct. Should taunt Thrall before engage in combat
- DoScriptText(SAY_TAUNT1, me);
- DoScriptText(SAY_TAUNT2, me);
+ Talk(SAY_TAUNT1);
+ Talk(SAY_TAUNT2);
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance && instance->GetData(TYPE_THRALL_EVENT) == IN_PROGRESS)
instance->SetData(TYPE_THRALL_PART1, DONE);
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp
index ab0f10bdfe0..00204300a51 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp
@@ -27,21 +27,23 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "old_hillsbrad.h"
-#define SAY_ENTER1 -1560013
-#define SAY_ENTER2 -1560014
-#define SAY_ENTER3 -1560015
-#define SAY_AGGRO1 -1560016
-#define SAY_AGGRO2 -1560017
-#define SAY_SLAY1 -1560018
-#define SAY_SLAY2 -1560019
-#define SAY_BREATH1 -1560020
-#define SAY_BREATH2 -1560021
-#define SAY_DEATH -1560022
-
-#define SPELL_SAND_BREATH 31914
-#define SPELL_IMPENDING_DEATH 31916
-#define SPELL_MAGIC_DISRUPTION_AURA 33834
-#define SPELL_WING_BUFFET 31475
+/*###################
+# boss_epoch_hunter #
+####################*/
+
+enum EpochHunter
+{
+ SAY_ENTER = 0,
+ SAY_AGGRO = 1,
+ SAY_SLAY = 2,
+ SAY_BREATH = 3,
+ SAY_DEATH = 4,
+
+ SPELL_SAND_BREATH = 31914,
+ SPELL_IMPENDING_DEATH = 31916,
+ SPELL_MAGIC_DISRUPTION_AURA = 33834,
+ SPELL_WING_BUFFET = 31475
+};
class boss_epoch_hunter : public CreatureScript
{
@@ -77,17 +79,17 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO1, SAY_AGGRO2), me);
+ Talk(SAY_AGGRO);
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance && instance->GetData(TYPE_THRALL_EVENT) == IN_PROGRESS)
instance->SetData(TYPE_THRALL_PART4, DONE);
@@ -107,7 +109,7 @@ public:
DoCast(me->getVictim(), SPELL_SAND_BREATH);
- DoScriptText(RAND(SAY_BREATH1, SAY_BREATH2), me);
+ Talk(SAY_BREATH);
SandBreath_Timer = urand(10000, 20000);
} else SandBreath_Timer -= diff;
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp
index 534c831814e..22036899d64 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp
@@ -56,18 +56,20 @@ public:
## boss_lieutenant_drake
######*/
-#define SAY_ENTER -1560006
-#define SAY_AGGRO -1560007
-#define SAY_SLAY1 -1560008
-#define SAY_SLAY2 -1560009
-#define SAY_MORTAL -1560010
-#define SAY_SHOUT -1560011
-#define SAY_DEATH -1560012
-
-#define SPELL_WHIRLWIND 31909
-#define SPELL_HAMSTRING 9080
-#define SPELL_MORTAL_STRIKE 31911
-#define SPELL_FRIGHTENING_SHOUT 33789
+enum LieutenantDrake
+{
+ SAY_ENTER = 0,
+ SAY_AGGRO = 1,
+ SAY_SLAY = 2,
+ SAY_MORTAL = 3,
+ SAY_SHOUT = 4,
+ SAY_DEATH = 5,
+
+ SPELL_WHIRLWIND = 31909,
+ SPELL_HAMSTRING = 9080,
+ SPELL_MORTAL_STRIKE = 31911,
+ SPELL_FRIGHTENING_SHOUT = 33789
+};
struct Location
{
@@ -135,17 +137,17 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void UpdateAI(const uint32 diff)
@@ -171,7 +173,7 @@ public:
//Fear
if (Fear_Timer <= diff)
{
- DoScriptText(SAY_SHOUT, me);
+ Talk(SAY_SHOUT);
DoCast(me->getVictim(), SPELL_FRIGHTENING_SHOUT);
Fear_Timer = 25000+rand()%10000;
} else Fear_Timer -= diff;
@@ -179,7 +181,7 @@ public:
//Mortal Strike
if (MortalStrike_Timer <= diff)
{
- DoScriptText(SAY_MORTAL, me);
+ Talk(SAY_MORTAL);
DoCast(me->getVictim(), SPELL_MORTAL_STRIKE);
MortalStrike_Timer = 20000+rand()%10000;
} else MortalStrike_Timer -= diff;
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp
index 2000d8a52f8..fe41ff521d8 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp
@@ -36,12 +36,14 @@ EndContentData */
#include "old_hillsbrad.h"
#include "Player.h"
-#define QUEST_ENTRY_HILLSBRAD 10282
-#define QUEST_ENTRY_DIVERSION 10283
-#define QUEST_ENTRY_ESCAPE 10284
-#define QUEST_ENTRY_RETURN 10285
-#define ITEM_ENTRY_BOMBS 25853
-
+enum Erozion
+{
+ QUEST_ENTRY_HILLSBRAD = 10282,
+ QUEST_ENTRY_DIVERSION = 10283,
+ QUEST_ENTRY_ESCAPE = 10284,
+ QUEST_ENTRY_RETURN = 10285,
+ ITEM_ENTRY_BOMBS = 25853
+};
#define GOSSIP_HELLO_EROZION1 "I need a pack of Incendiary Bombs."
#define GOSSIP_HELLO_EROZION2 "[PH] Teleport please, i'm tired."
@@ -98,97 +100,85 @@ public:
######*/
//Thrall texts
-#define SAY_TH_START_EVENT_PART1 -1560023
-#define SAY_TH_ARMORY -1560024
-#define SAY_TH_SKARLOC_MEET -1560025
-#define SAY_TH_SKARLOC_TAUNT -1560026
-#define SAY_TH_START_EVENT_PART2 -1560027
-#define SAY_TH_MOUNTS_UP -1560028
-#define SAY_TH_CHURCH_END -1560029
-#define SAY_TH_MEET_TARETHA -1560030
-#define SAY_TH_EPOCH_WONDER -1560031
-#define SAY_TH_EPOCH_KILL_TARETHA -1560032
-#define SAY_TH_EVENT_COMPLETE -1560033
-
-#define SAY_TH_RANDOM_LOW_HP1 -1560034
-#define SAY_TH_RANDOM_LOW_HP2 -1560035
-
-#define SAY_TH_RANDOM_DIE1 -1560036
-#define SAY_TH_RANDOM_DIE2 -1560037
-
-#define SAY_TH_RANDOM_AGGRO1 -1560038
-#define SAY_TH_RANDOM_AGGRO2 -1560039
-#define SAY_TH_RANDOM_AGGRO3 -1560040
-#define SAY_TH_RANDOM_AGGRO4 -1560041
-
-#define SAY_TH_RANDOM_KILL1 -1560042
-#define SAY_TH_RANDOM_KILL2 -1560043
-#define SAY_TH_RANDOM_KILL3 -1560044
-
-#define SAY_TH_LEAVE_COMBAT1 -1560045
-#define SAY_TH_LEAVE_COMBAT2 -1560046
-#define SAY_TH_LEAVE_COMBAT3 -1560047
-
-//Taretha texts
-#define SAY_TA_FREE -1560048
-#define SAY_TA_ESCAPED -1560049
-
-//Misc for Thrall
-#define SPELL_STRIKE 14516
-#define SPELL_SHIELD_BLOCK 12169
-#define SPELL_SUMMON_EROZION_IMAGE 33954 //if thrall dies during escort?
+enum ThrallOldHillsbrad
+{
+ SAY_TH_START_EVENT_PART1 = 0,
+ SAY_TH_ARMORY = 1,
+ SAY_TH_SKARLOC_MEET = 2,
+ SAY_TH_SKARLOC_TAUNT = 3,
+ SAY_TH_START_EVENT_PART2 = 4,
+ SAY_TH_MOUNTS_UP = 5,
+ SAY_TH_CHURCH_END = 6,
+ SAY_TH_MEET_TARETHA = 7,
+ SAY_TH_EPOCH_WONDER = 8,
+ SAY_TH_EPOCH_KILL_TARETHA = 9,
+ SAY_TH_EVENT_COMPLETE = 10,
+
+ SAY_TH_RANDOM_LOW_HP = 11,
+ SAY_TH_RANDOM_DIE = 12,
+ SAY_TH_RANDOM_AGGRO = 13,
+ SAY_TH_RANDOM_KILL = 14,
+ SAY_TH_LEAVE_COMBAT = 15,
+
+ //Taretha texts
+ SAY_TA_FREE = 0,
+ SAY_TA_ESCAPED = 1,
+
+ //Misc for Thrall
+ SPELL_STRIKE = 14516,
+ SPELL_SHIELD_BLOCK = 12169,
+ SPELL_SUMMON_EROZION_IMAGE = 33954, //if thrall dies during escort?
+
+ THRALL_WEAPON_ITEM = 927,
+ THRALL_WEAPON_INFO = 218169346,
+ THRALL_SHIELD_ITEM = 2129,
+ THRALL_SHIELD_INFO = 234948100,
+ THRALL_MODEL_UNEQUIPPED = 17292,
+ THRALL_MODEL_EQUIPPED = 18165,
+
+ //Misc Creature entries
+ ENTRY_ARMORER = 18764,
+ ENTRY_SCARLOC = 17862,
+
+ MOB_ENTRY_RIFLE = 17820,
+ MOB_ENTRY_WARDEN = 17833,
+ MOB_ENTRY_VETERAN = 17860,
+ MOB_ENTRY_WATCHMAN = 17814,
+ MOB_ENTRY_SENTRY = 17815,
+
+ MOB_ENTRY_BARN_GUARDSMAN = 18092,
+ MOB_ENTRY_BARN_PROTECTOR = 18093,
+ MOB_ENTRY_BARN_LOOKOUT = 18094,
+
+ MOB_ENTRY_CHURCH_GUARDSMAN = 23175,
+ MOB_ENTRY_CHURCH_PROTECTOR = 23179,
+ MOB_ENTRY_CHURCH_LOOKOUT = 23177,
+
+ MOB_ENTRY_INN_GUARDSMAN = 23176,
+ MOB_ENTRY_INN_PROTECTOR = 23180,
+ MOB_ENTRY_INN_LOOKOUT = 23178,
+
+ SKARLOC_MOUNT = 18798,
+ SKARLOC_MOUNT_MODEL = 18223,
+ EROZION_ENTRY = 18723,
+ ENTRY_EPOCH = 18096,
+
+ GOSSIP_ID_START = 9568,
+ GOSSIP_ID_SKARLOC1 = 9614, //I'm glad Taretha is alive. We now must find a way to free her...
+ GOSSIP_ID_SKARLOC2 = 9579, //What do you mean by this? Is Taretha in danger?
+ GOSSIP_ID_SKARLOC3 = 9580,
+ GOSSIP_ID_TARREN = 9597, //tarren mill is beyond these trees
+ GOSSIP_ID_COMPLETE = 9578 //Thank you friends, I owe my freedom to you. Where is Taretha? I hoped to see her
+};
#define SPEED_WALK (0.5f)
#define SPEED_RUN (1.0f)
#define SPEED_MOUNT (1.6f)
-#define THRALL_WEAPON_ITEM 927
-#define THRALL_WEAPON_INFO 218169346
-#define THRALL_SHIELD_ITEM 2129
-#define THRALL_SHIELD_INFO 234948100
-#define THRALL_MODEL_UNEQUIPPED 17292
-#define THRALL_MODEL_EQUIPPED 18165
-
-//Misc Creature entries
-#define ENTRY_ARMORER 18764
-#define ENTRY_SCARLOC 17862
-
-#define MOB_ENTRY_RIFLE 17820
-#define MOB_ENTRY_WARDEN 17833
-#define MOB_ENTRY_VETERAN 17860
-#define MOB_ENTRY_WATCHMAN 17814
-#define MOB_ENTRY_SENTRY 17815
-
-#define MOB_ENTRY_BARN_GUARDSMAN 18092
-#define MOB_ENTRY_BARN_PROTECTOR 18093
-#define MOB_ENTRY_BARN_LOOKOUT 18094
-
-#define MOB_ENTRY_CHURCH_GUARDSMAN 23175
-#define MOB_ENTRY_CHURCH_PROTECTOR 23179
-#define MOB_ENTRY_CHURCH_LOOKOUT 23177
-
-#define MOB_ENTRY_INN_GUARDSMAN 23176
-#define MOB_ENTRY_INN_PROTECTOR 23180
-#define MOB_ENTRY_INN_LOOKOUT 23178
-
-#define SKARLOC_MOUNT 18798
-#define SKARLOC_MOUNT_MODEL 18223
-#define EROZION_ENTRY 18723
-#define ENTRY_EPOCH 18096
-
//gossip items
-#define GOSSIP_ID_START 9568
-#define GOSSIP_ID_SKARLOC1 9614 //I'm glad Taretha is alive. We now must find a way to free her...
#define GOSSIP_ITEM_SKARLOC1 "Taretha cannot see you, Thrall."
-#define GOSSIP_ID_SKARLOC2 9579 //What do you mean by this? Is Taretha in danger?
#define GOSSIP_ITEM_SKARLOC2 "The situation is rather complicated, Thrall. It would be best for you to head into the mountains now, before more of Blackmoore's men show up. We'll make sure Taretha is safe."
-#define GOSSIP_ID_SKARLOC3 9580
-
-#define GOSSIP_ID_TARREN 9597 //tarren mill is beyond these trees
#define GOSSIP_ITEM_TARREN "We're ready, Thrall."
-
-#define GOSSIP_ID_COMPLETE 9578 //Thank you friends, I owe my freedom to you. Where is Taretha? I hoped to see her
-
#define GOSSIP_ITEM_WALKING "[PH] Start walking."
class npc_thrall_old_hillsbrad : public CreatureScript
@@ -215,7 +205,7 @@ public:
instance->SetData(TYPE_THRALL_PART1, IN_PROGRESS);
}
- DoScriptText(SAY_TH_START_EVENT_PART1, creature);
+ creature->AI()->Talk(SAY_TH_START_EVENT_PART1);
if (npc_escortAI* pEscortAI = CAST_AI(npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI, creature->AI()))
pEscortAI->Start(true, true, player->GetGUID());
@@ -236,7 +226,7 @@ public:
if (instance)
instance->SetData(TYPE_THRALL_PART2, IN_PROGRESS);
- DoScriptText(SAY_TH_START_EVENT_PART2, creature);
+ creature->AI()->Talk(SAY_TH_START_EVENT_PART2);
CAST_AI(npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI, creature->AI())->StartWP();
break;
@@ -311,7 +301,7 @@ public:
me->SummonCreature(18764, 2181.87f, 112.46f, 89.45f, 0.26f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
break;
case 9:
- DoScriptText(SAY_TH_ARMORY, me);
+ Talk(SAY_TH_ARMORY);
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, THRALL_WEAPON_ITEM);
//me->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO, THRALL_WEAPON_INFO);
//me->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO+1, 781);
@@ -344,7 +334,7 @@ public:
me->SummonCreature(MOB_ENTRY_VETERAN, 2104.18f, 194.82f, 65.18f, 5.75f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
break;
case 29:
- DoScriptText(SAY_TH_SKARLOC_MEET, me);
+ Talk(SAY_TH_SKARLOC_MEET);
me->SummonCreature(ENTRY_SCARLOC, 2036.48f, 271.22f, 63.43f, 5.27f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
//temporary, skarloc should rather be triggered to walk up to thrall
break;
@@ -354,7 +344,7 @@ public:
SetRun(false);
break;
case 31:
- DoScriptText(SAY_TH_MOUNTS_UP, me);
+ Talk(SAY_TH_MOUNTS_UP);
DoMount();
SetRun();
break;
@@ -400,7 +390,7 @@ public:
me->SummonCreature(MOB_ENTRY_CHURCH_GUARDSMAN, 2627.22f, 649.00f, 56.03f, 4.34f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000);
break;
case 84:
- DoScriptText(SAY_TH_CHURCH_END, me);
+ Talk(SAY_TH_CHURCH_END);
SetRun();
break;
case 91:
@@ -416,20 +406,20 @@ public:
case 94:
if (uint64 TarethaGUID = instance->GetData64(DATA_TARETHA))
{
- if (Unit* Taretha = Unit::GetUnit(*me, TarethaGUID))
- DoScriptText(SAY_TA_ESCAPED, Taretha, me);
+ if (Creature* Taretha = Creature::GetCreature(*me, TarethaGUID))
+ Taretha->AI()->Talk(SAY_TA_ESCAPED, me->GetGUID());
}
break;
case 95:
- DoScriptText(SAY_TH_MEET_TARETHA, me);
+ Talk(SAY_TH_MEET_TARETHA);
instance->SetData(TYPE_THRALL_PART3, DONE);
SetEscortPaused(true);
break;
case 96:
- DoScriptText(SAY_TH_EPOCH_WONDER, me);
+ Talk(SAY_TH_EPOCH_WONDER);
break;
case 97:
- DoScriptText(SAY_TH_EPOCH_KILL_TARETHA, me);
+ Talk(SAY_TH_EPOCH_KILL_TARETHA);
SetRun();
break;
case 98:
@@ -485,7 +475,7 @@ public:
}
if (HasEscortState(STATE_ESCORT_ESCORTING))
{
- DoScriptText(RAND(SAY_TH_LEAVE_COMBAT1, SAY_TH_LEAVE_COMBAT2, SAY_TH_LEAVE_COMBAT3), me);
+ Talk(SAY_TH_LEAVE_COMBAT);
}
}
void StartWP()
@@ -505,7 +495,7 @@ public:
}
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_TH_RANDOM_AGGRO1, SAY_TH_RANDOM_AGGRO2, SAY_TH_RANDOM_AGGRO3, SAY_TH_RANDOM_AGGRO4), me);
+ Talk(SAY_TH_RANDOM_AGGRO);
if (me->IsMounted())
{
DoUnmount();
@@ -532,7 +522,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_TH_RANDOM_KILL1, SAY_TH_RANDOM_KILL2, SAY_TH_RANDOM_KILL3), me);
+ Talk(SAY_TH_RANDOM_KILL);
}
void JustDied(Unit* slayer)
{
@@ -543,7 +533,7 @@ public:
if (slayer == me)
return;
- DoScriptText(RAND(SAY_TH_RANDOM_DIE1, SAY_TH_RANDOM_DIE2), me);
+ Talk(SAY_TH_RANDOM_DIE);
}
void UpdateAI(const uint32 diff)
@@ -556,7 +546,7 @@ public:
//TODO: add his abilities'n-crap here
if (!LowHp && HealthBelowPct(20))
{
- DoScriptText(RAND(SAY_TH_RANDOM_LOW_HP1, SAY_TH_RANDOM_LOW_HP2), me);
+ Talk(SAY_TH_RANDOM_LOW_HP);
LowHp = true;
}
}
@@ -567,10 +557,13 @@ public:
/*######
## npc_taretha
######*/
+enum Taretha
+{
+ GOSSIP_ID_EPOCH1 = 9610, //Thank you for helping Thrall escape, friends. Now I only hope
+ GOSSIP_ID_EPOCH2 = 9613 //Yes, friends. This man was no wizard of
+};
-#define GOSSIP_ID_EPOCH1 9610 //Thank you for helping Thrall escape, friends. Now I only hope
#define GOSSIP_ITEM_EPOCH1 "Strange wizard?"
-#define GOSSIP_ID_EPOCH2 9613 //Yes, friends. This man was no wizard of
#define GOSSIP_ITEM_EPOCH2 "We'll get you out. Taretha. Don't worry. I doubt the wizard would wander too far away."
class npc_taretha : public CreatureScript
@@ -638,7 +631,7 @@ public:
switch (waypointId)
{
case 6:
- DoScriptText(SAY_TA_FREE, me);
+ Talk(SAY_TA_FREE);
break;
case 7:
me->HandleEmoteCommand(EMOTE_ONESHOT_CHEER);
diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/boss_amnennar_the_coldbringer.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/boss_amnennar_the_coldbringer.cpp
index 44f9aa1184a..b3690ab14c7 100644
--- a/src/server/scripts/Kalimdor/RazorfenDowns/boss_amnennar_the_coldbringer.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenDowns/boss_amnennar_the_coldbringer.cpp
@@ -26,16 +26,19 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
-#define SAY_AGGRO -1129000
-#define SAY_SUMMON60 -1129001
-#define SAY_SUMMON30 -1129002
-#define SAY_HP -1129003
-#define SAY_KILL -1129004
-
-#define SPELL_AMNENNARSWRATH 13009
-#define SPELL_FROSTBOLT 15530
-#define SPELL_FROST_NOVA 15531
-#define SPELL_FROST_SPECTRES 12642
+enum AmnennarTheColdbringer
+{
+ SAY_AGGRO = 0,
+ SAY_SUMMON60 = 1,
+ SAY_SUMMON30 = 2,
+ SAY_HP = 3,
+ SAY_KILL = 4,
+
+ SPELL_AMNENNARSWRATH = 13009,
+ SPELL_FROSTBOLT = 15530,
+ SPELL_FROST_NOVA = 15531,
+ SPELL_FROST_SPECTRES = 12642
+};
class boss_amnennar_the_coldbringer : public CreatureScript
{
@@ -70,12 +73,12 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(SAY_KILL, me);
+ Talk(SAY_KILL);
}
void UpdateAI(const uint32 diff)
@@ -105,20 +108,20 @@ public:
if (!Spectrals60 && HealthBelowPct(60))
{
- DoScriptText(SAY_SUMMON60, me);
+ Talk(SAY_SUMMON60);
DoCast(me->getVictim(), SPELL_FROST_SPECTRES);
Spectrals60 = true;
}
if (!Hp && HealthBelowPct(50))
{
- DoScriptText(SAY_HP, me);
+ Talk(SAY_HP);
Hp = true;
}
if (!Spectrals30 && HealthBelowPct(30))
{
- DoScriptText(SAY_SUMMON30, me);
+ Talk(SAY_SUMMON30);
DoCast(me->getVictim(), SPELL_FROST_SPECTRES);
Spectrals30 = true;
}
diff --git a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp
index 7b3cd9f9900..b0953c73e57 100644
--- a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp
@@ -33,20 +33,23 @@ EndContentData */
#include "razorfen_kraul.h"
#include "Player.h"
-#define SAY_READY -1047000
-#define SAY_POINT -1047001
-#define SAY_AGGRO1 -1047002
-#define SAY_BLUELEAF -1047003
-#define SAY_DANGER -1047004
-#define SAY_BAD -1047005
-#define SAY_THINK -1047006
-#define SAY_SOON -1047007
-#define SAY_FINALY -1047008
-#define SAY_WIN -1047009
-#define SAY_END -1047010
-
-#define QUEST_WILLIX_THE_IMPORTER 1144
-#define ENTRY_BOAR 4514
+enum Willix
+{
+ SAY_READY = 0,
+ SAY_POINT = 1,
+ SAY_AGGRO1 = 2,
+ SAY_BLUELEAF = 3,
+ SAY_DANGER = 4,
+ SAY_BAD = 5,
+ SAY_THINK = 6,
+ SAY_SOON = 7,
+ SAY_FINALY = 8,
+ SAY_WIN = 9,
+ SAY_END = 10,
+
+ QUEST_WILLIX_THE_IMPORTER = 1144,
+ ENTRY_BOAR = 4514
+};
class npc_willix : public CreatureScript
{
@@ -58,7 +61,7 @@ public:
if (quest->GetQuestId() == QUEST_WILLIX_THE_IMPORTER)
{
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, false, player->GetGUID());
- DoScriptText(SAY_READY, creature, player);
+ creature->AI()->Talk(SAY_READY, player->GetGUID());
creature->setFaction(113);
}
@@ -84,43 +87,43 @@ public:
{
case 3:
me->HandleEmoteCommand(EMOTE_STATE_POINT);
- DoScriptText(SAY_POINT, me, player);
+ Talk(SAY_POINT, player->GetGUID());
break;
case 4:
me->SummonCreature(ENTRY_BOAR, 2137.66f, 1843.98f, 48.08f, 1.54f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
break;
case 8:
- DoScriptText(SAY_BLUELEAF, me, player);
+ Talk(SAY_BLUELEAF, player->GetGUID());
break;
case 9:
- DoScriptText(SAY_DANGER, me, player);
+ Talk(SAY_DANGER, player->GetGUID());
break;
case 13:
- DoScriptText(SAY_BAD, me, player);
+ Talk(SAY_BAD, player->GetGUID());
break;
case 14:
me->SummonCreature(ENTRY_BOAR, 2078.91f, 1704.54f, 56.77f, 1.54f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
break;
case 25:
- DoScriptText(SAY_THINK, me, player);
+ Talk(SAY_THINK, player->GetGUID());
break;
case 31:
- DoScriptText(SAY_SOON, me, player);
+ Talk(SAY_SOON, player->GetGUID());
break;
case 42:
- DoScriptText(SAY_FINALY, me, player);
+ Talk(SAY_FINALY, player->GetGUID());
break;
case 43:
me->SummonCreature(ENTRY_BOAR, 1956.43f, 1596.97f, 81.75f, 1.54f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
break;
case 45:
- DoScriptText(SAY_WIN, me, player);
+ Talk(SAY_WIN, player->GetGUID());
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
if (player->GetTypeId() == TYPEID_PLAYER)
CAST_PLR(player)->GroupEventHappens(QUEST_WILLIX_THE_IMPORTER, me);
break;
case 46:
- DoScriptText(SAY_END, me, player);
+ Talk(SAY_END, player->GetGUID());
break;
}
}
@@ -129,7 +132,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO1, me, NULL);
+ Talk(SAY_AGGRO1);
}
void JustSummoned(Creature* summoned)
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp
index 40d4d5d54b4..7dd395770db 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp
@@ -29,7 +29,7 @@ EndScriptData */
enum Yells
{
- EMOTE_TARGET = -1509002
+ EMOTE_TARGET = 0
};
class boss_buru : public CreatureScript
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp
index 4abbf99d4ef..5f5b958fb9b 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp
@@ -21,8 +21,8 @@
enum Texts
{
- EMOTE_AGGRO = -1509000,
- EMOTE_MANA_FULL = -1509001
+ EMOTE_AGGRO = 0,
+ EMOTE_MANA_FULL = 1
};
enum Spells
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp
index da67f93f968..1ffd74eddf3 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp
@@ -23,22 +23,22 @@
enum Yells
{
// The time of our retribution is at hand! Let darkness reign in the hearts of our enemies! Sound: 8645 Emote: 35
- SAY_ANDOROV_INTRO = -1509003, // Before for the first wave
- SAY_ANDOROV_ATTACK = -1509004, // Beginning the event
- SAY_ANDOROV_WAVE_1 = -1509001, // When the first wave comes text: Kill first, ask questions later... Incoming! emote: 45 sound: 8653
- SAY_WAVE3 = -1509005,
- SAY_WAVE4 = -1509006,
- SAY_WAVE5 = -1509007,
- SAY_WAVE6 = -1509008,
- SAY_WAVE7 = -1509009,
- SAY_INTRO = -1509010,
- SAY_UNK1 = -1509011,
- SAY_UNK2 = -1509012,
- SAY_UNK3 = -1509013,
- SAY_DEATH = -1509014,
- SAY_CHANGEAGGRO = -1509015,
- SAY_KILLS_ANDOROV = -1509016,
- SAY_COMPLETE_QUEST = -1509017 // Yell when realm complete quest 8743 for world event
+ SAY_ANDOROV_INTRO = 0, // Before for the first wave
+ SAY_ANDOROV_ATTACK = 1, // Beginning the event
+
+ SAY_WAVE3 = 0,
+ SAY_WAVE4 = 1,
+ SAY_WAVE5 = 2,
+ SAY_WAVE6 = 3,
+ SAY_WAVE7 = 4,
+ SAY_INTRO = 5,
+ SAY_UNK1 = 6,
+ SAY_UNK2 = 7,
+ SAY_UNK3 = 8,
+ SAY_DEATH = 9,
+ SAY_CHANGEAGGRO = 10,
+ SAY_KILLS_ANDOROV = 11,
+ SAY_COMPLETE_QUEST = 12 // Yell when realm complete quest 8743 for world event
// Warriors, Captains, continue the fight! Sound: 8640
};
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
index 6b569bbd3e5..c97f8a0495f 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
@@ -58,8 +58,6 @@ EndScriptData */
* - the current phase is stored in the instance data to be easily shared between the eye and cthun.
*/
-#define PI 3.14
-
enum Phases
{
PHASE_NOT_STARTED = 0,
@@ -76,24 +74,6 @@ enum Phases
PHASE_CTHUN_DONE = 6,
};
-enum Creatures
-{
- MOB_CTHUN_PORTAL = 15896,
-
- // ***** Main Phase 1 ********
- BOSS_EYE_OF_CTHUN = 15589,
- MOB_CLAW_TENTACLE = 15725,
- MOB_EYE_TENTACLE = 15726,
- MOB_SMALL_PORTAL = 15904,
-
- // ***** Main Phase 2 ********
- MOB_BODY_OF_CTHUN = 15809,
- MOB_GIANT_CLAW_TENTACLE = 15728,
- MOB_GIANT_EYE_TENTACLE = 15334,
- MOB_FLESH_TENTACLE = 15802,
- MOB_GIANT_PORTAL = 15910,
-};
-
enum Spells
{
// ***** Main Phase 1 ********
@@ -142,7 +122,7 @@ enum Actions
enum Yells
{
//Text emote
- EMOTE_WEAKENED = -1531011,
+ EMOTE_WEAKENED = 0,
// ****** Out of Combat ******
// Random Wispers - No txt only sound
@@ -712,7 +692,7 @@ public:
{
instance->SetData(DATA_CTHUN_PHASE, PHASE_CTHUN_WEAK);
- DoScriptText(EMOTE_WEAKENED, me);
+ Talk(EMOTE_WEAKENED);
PhaseTimer = 45000;
DoCast(me, SPELL_PURPLE_COLORATION, true);
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp
index 83af40c57f2..ab4968e3bf7 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp
@@ -26,15 +26,18 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
-#define EMOTE_GENERIC_FRENZY_KILL -1000001
-#define EMOTE_GENERIC_BERSERK -1000004
-
-#define SPELL_FRENZY 26051
-#define SPELL_BERSERK 26068
-#define SPELL_POISONBOLT 26052
-#define SPELL_NOXIOUSPOISON 26053
-#define SPELL_WYVERNSTING 26180
-#define SPELL_ACIDSPIT 26050
+enum Huhuran
+{
+ EMOTE_FRENZY_KILL = 0,
+ EMOTE_BERSERK = 1,
+
+ SPELL_FRENZY = 26051,
+ SPELL_BERSERK = 26068,
+ SPELL_POISONBOLT = 26052,
+ SPELL_NOXIOUSPOISON = 26053,
+ SPELL_WYVERNSTING = 26180,
+ SPELL_ACIDSPIT = 26050
+};
class boss_huhuran : public CreatureScript
{
@@ -87,7 +90,7 @@ public:
if (!Frenzy && Frenzy_Timer <= diff)
{
DoCast(me, SPELL_FRENZY);
- DoScriptText(EMOTE_GENERIC_FRENZY_KILL, me);
+ Talk(EMOTE_FRENZY_KILL);
Frenzy = true;
PoisonBolt_Timer = 3000;
Frenzy_Timer = urand(25000, 35000);
@@ -136,7 +139,7 @@ public:
if (!Berserk && HealthBelowPct(31))
{
me->InterruptNonMeleeSpells(false);
- DoScriptText(EMOTE_GENERIC_BERSERK, me);
+ Talk(EMOTE_BERSERK);
DoCast(me, SPELL_BERSERK);
Berserk = true;
}
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp
index 02554bbe6b3..2ac9358b976 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp
@@ -26,17 +26,20 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
-#define SAY_AGGRO -1531008
-#define SAY_SLAY -1531009
-#define SAY_DEATH -1531010
+enum Sartura
+{
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
-#define SPELL_WHIRLWIND 26083
-#define SPELL_ENRAGE 28747 //Not sure if right ID.
-#define SPELL_ENRAGEHARD 28798
+ SPELL_WHIRLWIND = 26083,
+ SPELL_ENRAGE = 28747, //Not sure if right ID.
+ SPELL_ENRAGEHARD = 28798,
//Guard Spell
-#define SPELL_WHIRLWINDADD 26038
-#define SPELL_KNOCKBACK 26027
+ SPELL_WHIRLWINDADD = 26038,
+ SPELL_KNOCKBACK = 26027
+};
class boss_sartura : public CreatureScript
{
@@ -82,17 +85,17 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(SAY_SLAY, me);
+ Talk(SAY_SLAY);
}
void UpdateAI(const uint32 diff)
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp
index 917c790f42b..99a304e3726 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp
@@ -29,19 +29,18 @@ EndScriptData */
#include "Group.h"
#include "Player.h"
-#define SAY_AGGRO1 -1531000
-#define SAY_AGGRO2 -1531001
-#define SAY_AGGRO3 -1531002
-#define SAY_SLAY1 -1531003
-#define SAY_SLAY2 -1531004
-#define SAY_SLAY3 -1531005
-#define SAY_SPLIT -1531006
-#define SAY_DEATH -1531007
-
-#define SPELL_ARCANE_EXPLOSION 25679
-#define SPELL_EARTH_SHOCK 26194
-#define SPELL_TRUE_FULFILLMENT 785
-#define SPELL_BLINK 28391
+enum Skeram
+{
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_SPLIT = 2,
+ SAY_DEATH = 3,
+
+ SPELL_ARCANE_EXPLOSION = 25679,
+ SPELL_EARTH_SHOCK = 26194,
+ SPELL_TRUE_FULFILLMENT = 785,
+ SPELL_BLINK = 28391
+};
class ov_mycoordinates
{
@@ -104,20 +103,20 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
if (!IsImage)
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void EnterCombat(Unit* /*who*/)
{
if (IsImage || Images75)
return;
- DoScriptText(RAND(SAY_AGGRO1, SAY_AGGRO2, SAY_AGGRO3), me);
+ Talk(SAY_AGGRO);
}
void UpdateAI(const uint32 diff)
@@ -209,7 +208,7 @@ public:
void DoSplit(int atPercent /* 75 50 25 */)
{
- DoScriptText(SAY_SPLIT, me);
+ Talk(SAY_SPLIT);
ov_mycoordinates *place1 = new ov_mycoordinates(-8340.782227f, 2083.814453f, 125.648788f, 0);
ov_mycoordinates *place2 = new ov_mycoordinates(-8341.546875f, 2118.504639f, 133.058151f, 0);
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp
index d0e97bc36c8..c97fd40929a 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp
@@ -1,6 +1,5 @@
/*
* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
- * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -16,18 +15,293 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: Boss_Viscidus
-SD%Complete: 0
-SDComment: place holder
-SDCategory: Temple of Ahn'Qiraj
-EndScriptData */
-
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
+#include "SpellInfo.h"
+#include "temple_of_ahnqiraj.h"
+
+enum Spells
+{
+ SPELL_POISON_SHOCK = 25993,
+ SPELL_POISONBOLT_VOLLEY = 25991,
+ SPELL_TOXIN = 26575,
+ SPELL_VISCIDUS_SLOWED = 26034,
+ SPELL_VISCIDUS_SLOWED_MORE = 26036,
+ SPELL_VISCIDUS_FREEZE = 25937,
+ SPELL_REJOIN_VISCIDUS = 25896,
+ SPELL_VISCIDUS_EXPLODE = 25938,
+ SPELL_VISCIDUS_SUICIDE = 26003,
+ SPELL_VISCIDUS_SHRINKS = 25893, // Removed from client, in world.spell_dbc
+
+ SPELL_MEMBRANE_VISCIDUS = 25994, // damage reduction spell - removed from DBC
+ SPELL_VISCIDUS_WEAKNESS = 25926, // aura which procs at damage - should trigger the slow spells - removed from DBC
+ SPELL_VISCIDUS_GROWS = 25897, // removed from DBC
+ SPELL_SUMMON_GLOBS = 25885, // summons npc 15667 using spells from 25865 to 25884; All spells have target coords - removed from DBC
+ SPELL_VISCIDUS_TELEPORT = 25904, // removed from DBC
+};
+
+enum Events
+{
+ EVENT_POISONBOLT_VOLLEY = 1,
+ EVENT_POISON_SHOCK = 2,
+ EVENT_RESET_PHASE = 3
+};
+
+enum Phases
+{
+ PHASE_FROST = 1,
+ PHASE_MELEE = 2,
+ PHASE_GLOB = 3
+};
+
+enum Emotes
+{
+ EMOTE_SLOW = 0,
+ EMOTE_FREEZE = 1,
+ EMOTE_FROZEN = 2,
+
+ EMOTE_CRACK = 3,
+ EMOTE_SHATTER = 4,
+ EMOTE_EXPLODE = 5
+};
+
+enum HitCounter
+{
+ HITCOUNTER_SLOW = 100,
+ HITCOUNTER_SLOW_MORE = 150,
+ HITCOUNTER_FREEZE = 200,
+
+ HITCOUNTER_CRACK = 50,
+ HITCOUNTER_SHATTER = 100,
+ HITCOUNTER_EXPLODE = 150,
+};
+
+enum MovePoints
+{
+ ROOM_CENTER = 1
+};
+
+Position const ViscidusCoord = { -7992.36f, 908.19f, -52.62f, 1.68f }; // TODO: Visci isn't in room middle
+float const RoomRadius = 40.0f; // TODO: Not sure if its correct
+
+class boss_viscidus : public CreatureScript
+{
+ public:
+ boss_viscidus() : CreatureScript("boss_viscidus") { }
+
+ struct boss_viscidusAI : public BossAI
+ {
+ boss_viscidusAI(Creature* creature) : BossAI(creature, DATA_VISCIDUS) { }
+
+ void Reset()
+ {
+ _Reset();
+ _hitcounter = 0;
+ _phase = PHASE_FROST;
+ }
+
+ void DamageTaken(Unit* attacker, uint32& /*damage*/)
+ {
+ if (_phase != PHASE_MELEE)
+ return;
+
+ ++_hitcounter;
+
+ if (attacker->HasUnitState(UNIT_STATE_MELEE_ATTACKING) && _hitcounter >= HITCOUNTER_EXPLODE)
+ {
+ Talk(EMOTE_EXPLODE);
+ events.Reset();
+ _phase = PHASE_GLOB;
+ DoCast(me, SPELL_VISCIDUS_EXPLODE);
+ me->SetVisible(false);
+ me->RemoveAura(SPELL_TOXIN);
+ me->RemoveAura(SPELL_VISCIDUS_FREEZE);
+
+ uint8 NumGlobes = me->GetHealthPct() / 5.0f;
+ for (uint8 i = 0; i < NumGlobes; ++i)
+ {
+ float Angle = i * 2 * M_PI / NumGlobes;
+ float X = ViscidusCoord.GetPositionX() + std::cos(Angle) * RoomRadius;
+ float Y = ViscidusCoord.GetPositionY() + std::sin(Angle) * RoomRadius;
+ float Z = -35.0f;
+
+ if (TempSummon* Glob = me->SummonCreature(NPC_GLOB_OF_VISCIDUS, X, Y, Z))
+ {
+ Glob->UpdateAllowedPositionZ(X, Y, Z);
+ Glob->NearTeleportTo(X, Y, Z, 0.0f);
+ Glob->GetMotionMaster()->MovePoint(ROOM_CENTER, ViscidusCoord);
+ }
+ }
+ }
+ else if (_hitcounter == HITCOUNTER_SHATTER)
+ Talk(EMOTE_SHATTER);
+ else if (_hitcounter == HITCOUNTER_CRACK)
+ Talk(EMOTE_CRACK);
+ }
+
+ void SpellHit(Unit* /*caster*/, SpellInfo const* spell)
+ {
+ if ((spell->GetSchoolMask() & SPELL_SCHOOL_MASK_FROST) && _phase == PHASE_FROST && me->GetHealthPct() > 5.0f)
+ {
+ ++_hitcounter;
+
+ if (_hitcounter >= HITCOUNTER_FREEZE)
+ {
+ _hitcounter = 0;
+ Talk(EMOTE_FROZEN);
+ _phase = PHASE_MELEE;
+ DoCast(me, SPELL_VISCIDUS_FREEZE);
+ me->RemoveAura(SPELL_VISCIDUS_SLOWED_MORE);
+ events.ScheduleEvent(EVENT_RESET_PHASE, 15000);
+ }
+ else if (_hitcounter >= HITCOUNTER_SLOW_MORE)
+ {
+ Talk(EMOTE_FREEZE);
+ me->RemoveAura(SPELL_VISCIDUS_SLOWED);
+ DoCast(me, SPELL_VISCIDUS_SLOWED_MORE);
+ }
+ else if (_hitcounter >= HITCOUNTER_SLOW)
+ {
+ Talk(EMOTE_SLOW);
+ DoCast(me, SPELL_VISCIDUS_SLOWED);
+ }
+ }
+ }
+
+ void EnterCombat(Unit* /*who*/)
+ {
+ _EnterCombat();
+ events.Reset();
+ InitSpells();
+ }
+
+ void InitSpells()
+ {
+ DoCast(me, SPELL_TOXIN);
+ events.ScheduleEvent(EVENT_POISONBOLT_VOLLEY, urand(10000, 15000));
+ events.ScheduleEvent(EVENT_POISON_SHOCK, urand(7000, 12000));
+ }
+
+ void EnterEvadeMode()
+ {
+ summons.DespawnAll();
+ ScriptedAI::EnterEvadeMode();
+ }
+
+ void JustDied(Unit* /*killer*/)
+ {
+ DoCast(me, SPELL_VISCIDUS_SUICIDE);
+ summons.DespawnAll();
+ }
+
+ void UpdateAI(uint32 const diff)
+ {
+ if (!UpdateVictim())
+ return;
+
+ if (_phase == PHASE_GLOB && summons.empty())
+ {
+ DoResetThreat();
+ me->NearTeleportTo(ViscidusCoord.GetPositionX(),
+ ViscidusCoord.GetPositionY(),
+ ViscidusCoord.GetPositionZ(),
+ ViscidusCoord.GetOrientation());
+
+ _hitcounter = 0;
+ _phase = PHASE_FROST;
+ InitSpells();
+ me->SetVisible(true);
+ }
+
+ events.Update(diff);
+
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_POISONBOLT_VOLLEY:
+ DoCast(me, SPELL_POISONBOLT_VOLLEY);
+ events.ScheduleEvent(EVENT_POISONBOLT_VOLLEY, urand(10000, 15000));
+ break;
+ case EVENT_POISON_SHOCK:
+ DoCast(me, SPELL_POISON_SHOCK);
+ events.ScheduleEvent(EVENT_POISON_SHOCK, urand(7000, 12000));
+ break;
+ case EVENT_RESET_PHASE:
+ _hitcounter = 0;
+ _phase = PHASE_FROST;
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (_phase != PHASE_GLOB)
+ DoMeleeAttackIfReady();
+ }
+
+ private:
+ uint8 _hitcounter;
+ Phases _phase;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new boss_viscidusAI(creature);
+ }
+};
+
+class npc_glob_of_viscidus : public CreatureScript
+{
+ public:
+ npc_glob_of_viscidus() : CreatureScript("boss_glob_of_viscidus") { }
+
+ struct npc_glob_of_viscidusAI : public ScriptedAI
+ {
+ npc_glob_of_viscidusAI(Creature* creature) : ScriptedAI(creature) { }
+
+ void JustDied(Unit* /*killer*/)
+ {
+ InstanceScript* Instance = me->GetInstanceScript();
+ if (!Instance)
+ return;
+
+ if (Creature* Viscidus = me->GetMap()->GetCreature(Instance->GetData64(DATA_VISCIDUS)))
+ {
+ if (BossAI* ViscidusAI = dynamic_cast<BossAI*>(Viscidus->GetAI()))
+ ViscidusAI->SummonedCreatureDespawn(me);
+
+ if (Viscidus->isAlive() && Viscidus->GetHealthPct() < 5.0f)
+ {
+ Viscidus->SetVisible(true);
+ Viscidus->getVictim()->Kill(Viscidus);
+ }
+ else
+ {
+ Viscidus->SetHealth(Viscidus->GetHealth() - Viscidus->GetMaxHealth() / 20);
+ Viscidus->GetAI()->DoCast(Viscidus, SPELL_VISCIDUS_SHRINKS);
+ }
+ }
+ }
-#define SPELL_POISON_SHOCK 25993
-#define SPELL_POISONBOLT_VOLLEY 25991
+ void MovementInform(uint32 /*type*/, uint32 id)
+ {
+ if (id == ROOM_CENTER)
+ {
+ DoCast(me, SPELL_REJOIN_VISCIDUS);
+ ((TempSummon*)me)->UnSummon();
+ }
+ }
+ };
-#define SPELL_TOXIN_CLOUD 25989
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new npc_glob_of_viscidusAI(creature);
+ }
+};
+void AddSC_boss_viscidus()
+{
+ new boss_viscidus();
+ new npc_glob_of_viscidus();
+}
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp
index c8a1ff63925..3efdcd0dcf6 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp
@@ -29,71 +29,86 @@ EndScriptData */
class instance_temple_of_ahnqiraj : public InstanceMapScript
{
-public:
- instance_temple_of_ahnqiraj() : InstanceMapScript("instance_temple_of_ahnqiraj", 531) { }
+ public:
+ instance_temple_of_ahnqiraj() : InstanceMapScript("instance_temple_of_ahnqiraj", 531) { }
- InstanceScript* GetInstanceScript(InstanceMap* map) const
- {
- return new instance_temple_of_ahnqiraj_InstanceMapScript(map);
- }
+ InstanceScript* GetInstanceScript(InstanceMap* map) const
+ {
+ return new instance_temple_of_ahnqiraj_InstanceMapScript(map);
+ }
- struct instance_temple_of_ahnqiraj_InstanceMapScript : public InstanceScript
- {
- instance_temple_of_ahnqiraj_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ struct instance_temple_of_ahnqiraj_InstanceMapScript : public InstanceScript
+ {
+ instance_temple_of_ahnqiraj_InstanceMapScript(Map* map) : InstanceScript(map) {}
- //If Vem is dead...
- bool IsBossDied[3];
+ //If Vem is dead...
+ bool IsBossDied[3];
- //Storing Skeram, Vem and Kri.
- uint64 SkeramGUID;
- uint64 VemGUID;
- uint64 KriGUID;
- uint64 VeklorGUID;
- uint64 VeknilashGUID;
+ //Storing Skeram, Vem and Kri.
+ uint64 SkeramGUID;
+ uint64 VemGUID;
+ uint64 KriGUID;
+ uint64 VeklorGUID;
+ uint64 VeknilashGUID;
+ uint64 ViscidusGUID;
- uint32 BugTrioDeathCount;
+ uint32 BugTrioDeathCount;
- uint32 CthunPhase;
+ uint32 CthunPhase;
- void Initialize()
- {
- IsBossDied[0] = false;
- IsBossDied[1] = false;
- IsBossDied[2] = false;
+ void Initialize()
+ {
+ IsBossDied[0] = false;
+ IsBossDied[1] = false;
+ IsBossDied[2] = false;
- SkeramGUID = 0;
- VemGUID = 0;
- KriGUID = 0;
- VeklorGUID = 0;
- VeknilashGUID = 0;
+ SkeramGUID = 0;
+ VemGUID = 0;
+ KriGUID = 0;
+ VeklorGUID = 0;
+ VeknilashGUID = 0;
+ ViscidusGUID = 0;
- BugTrioDeathCount = 0;
+ BugTrioDeathCount = 0;
- CthunPhase = 0;
- }
+ CthunPhase = 0;
+ }
- void OnCreatureCreate(Creature* creature)
- {
- switch (creature->GetEntry())
+ void OnCreatureCreate(Creature* creature)
{
- case 15263: SkeramGUID = creature->GetGUID(); break;
- case 15544: VemGUID = creature->GetGUID(); break;
- case 15511: KriGUID = creature->GetGUID(); break;
- case 15276: VeklorGUID = creature->GetGUID(); break;
- case 15275: VeknilashGUID = creature->GetGUID(); break;
+ switch (creature->GetEntry())
+ {
+ case NPC_SKERAM:
+ SkeramGUID = creature->GetGUID();
+ break;
+ case NPC_VEM:
+ VemGUID = creature->GetGUID();
+ break;
+ case NPC_KRI:
+ KriGUID = creature->GetGUID();
+ break;
+ case NPC_VEKLOR:
+ VeklorGUID = creature->GetGUID();
+ break;
+ case NPC_VEKNILASH:
+ VeknilashGUID = creature->GetGUID();
+ break;
+ case NPC_VISCIDUS:
+ ViscidusGUID = creature->GetGUID();
+ break;
+ }
}
- }
- bool IsEncounterInProgress() const
- {
- //not active in AQ40
- return false;
- }
+ bool IsEncounterInProgress() const
+ {
+ //not active in AQ40
+ return false;
+ }
- uint32 GetData(uint32 type) const
- {
- switch (type)
+ uint32 GetData(uint32 type) const
{
+ switch (type)
+ {
case DATA_VEMISDEAD:
if (IsBossDied[0])
return 1;
@@ -114,14 +129,14 @@ public:
case DATA_CTHUN_PHASE:
return CthunPhase;
+ }
+ return 0;
}
- return 0;
- }
- uint64 GetData64(uint32 identifier) const
- {
- switch (identifier)
+ uint64 GetData64(uint32 identifier) const
{
+ switch (identifier)
+ {
case DATA_SKERAM:
return SkeramGUID;
case DATA_VEM:
@@ -132,14 +147,16 @@ public:
return VeklorGUID;
case DATA_VEKNILASH:
return VeknilashGUID;
- }
- return 0;
- } // end GetData64
+ case DATA_VISCIDUS:
+ return ViscidusGUID;
+ }
+ return 0;
+ } // end GetData64
- void SetData(uint32 type, uint32 data)
- {
- switch (type)
+ void SetData(uint32 type, uint32 data)
{
+ switch (type)
+ {
case DATA_VEM_DEATH:
IsBossDied[0] = true;
break;
@@ -159,9 +176,9 @@ public:
case DATA_CTHUN_PHASE:
CthunPhase = data;
break;
+ }
}
- }
- };
+ };
};
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h
index 13c3d56d14c..f154ccf2c5d 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h
@@ -19,19 +19,45 @@
#ifndef DEF_TEMPLE_OF_AHNQIRAJ_H
#define DEF_TEMPLE_OF_AHNQIRAJ_H
-#define DATA_SKERAM 1
-#define DATA_KRI 2
-#define DATA_VEM 3
-#define DATA_VEMISDEAD 4
-#define DATA_VEM_DEATH 5
-#define DATA_VEKLOR 6
-#define DATA_VEKLORISDEAD 7
-#define DATA_VEKLOR_DEATH 8
-#define DATA_VEKNILASH 9
-#define DATA_VEKNILASHISDEAD 10
-#define DATA_VEKNILASH_DEATH 11
-#define DATA_BUG_TRIO_DEATH 14
+enum DataTypes
+{
+ DATA_SKERAM = 1,
+ DATA_KRI = 2,
+ DATA_VEM = 3,
+ DATA_VEMISDEAD = 4,
+ DATA_VEM_DEATH = 5,
+ DATA_VEKLOR = 6,
+ DATA_VEKLORISDEAD = 7,
+ DATA_VEKLOR_DEATH = 8,
+ DATA_VEKNILASH = 9,
+ DATA_VEKNILASHISDEAD = 10,
+ DATA_VEKNILASH_DEATH = 11,
+ DATA_BUG_TRIO_DEATH = 14,
+ DATA_CTHUN_PHASE = 20,
+ DATA_VISCIDUS = 21
+};
-#define DATA_CTHUN_PHASE 20
+enum Creatures
+{
+ BOSS_EYE_OF_CTHUN = 15589,
+ MOB_CTHUN_PORTAL = 15896,
+ MOB_CLAW_TENTACLE = 15725,
+ MOB_EYE_TENTACLE = 15726,
+ MOB_SMALL_PORTAL = 15904,
+ MOB_BODY_OF_CTHUN = 15809,
+ MOB_GIANT_CLAW_TENTACLE = 15728,
+ MOB_GIANT_EYE_TENTACLE = 15334,
+ MOB_FLESH_TENTACLE = 15802,
+ MOB_GIANT_PORTAL = 15910,
+
+ NPC_VISCIDUS = 15299,
+ NPC_GLOB_OF_VISCIDUS = 15667,
+
+ NPC_SKERAM = 15263,
+ NPC_VEM = 15544,
+ NPC_KRI = 15511,
+ NPC_VEKLOR = 15276,
+ NPC_VEKNILASH = 15275
+};
#endif
diff --git a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp
index e1a3c3aeb45..6cc8d5931d3 100644
--- a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp
+++ b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp
@@ -37,35 +37,32 @@ EndContentData */
## npc_disciple_of_naralex
######*/
-enum eEnums
+enum Enums
{
- //say
- SAY_MAKE_PREPARATIONS = -1043001,
- SAY_TEMPLE_OF_PROMISE = -1043002,
- SAY_MUST_CONTINUE = -1043003,
- SAY_BANISH_THE_SPIRITS = -1043004,
- SAY_CAVERNS_PURIFIED = -1043005,
- SAY_BEYOND_THIS_CORRIDOR = -1043006,
- SAY_EMERALD_DREAM = -1043007,
- SAY_MUTANUS_THE_DEVOURER = -1043012,
- SAY_NARALEX_AWAKES = -1043014,
- SAY_THANK_YOU = -1043015,
- SAY_FAREWELL = -1043016,
- SAY_ATTACKED = -1043017,
- //yell
- SAY_AT_LAST = -1043000,
- SAY_I_AM_AWAKE = -1043013,
- //emote
- EMOTE_AWAKENING_RITUAL = -1043008,
- EMOTE_TROUBLED_SLEEP = -1043009,
- EMOTE_WRITHE_IN_AGONY = -1043010,
- EMOTE_HORRENDOUS_VISION = -1043011,
- //spell
+ SAY_AT_LAST = 0,
+ SAY_MAKE_PREPARATIONS = 1,
+ SAY_TEMPLE_OF_PROMISE = 2,
+ SAY_MUST_CONTINUE = 3,
+ SAY_BANISH_THE_SPIRITS = 4,
+ SAY_CAVERNS_PURIFIED = 5,
+ SAY_BEYOND_THIS_CORRIDOR = 6,
+ SAY_EMERALD_DREAM = 7,
+ EMOTE_AWAKENING_RITUAL = 8,
+ EMOTE_TROUBLED_SLEEP = 0,
+ EMOTE_WRITHE_IN_AGONY = 1,
+ EMOTE_HORRENDOUS_VISION = 2,
+ SAY_MUTANUS_THE_DEVOURER = 9,
+ SAY_I_AM_AWAKE = 3,
+ SAY_NARALEX_AWAKES = 10,
+ SAY_THANK_YOU = 4,
+ SAY_FAREWELL = 5,
+ SAY_ATTACKED = 11,
+
SPELL_MARK_OF_THE_WILD_RANK_2 = 5232,
SPELL_SERPENTINE_CLEANSING = 6270,
SPELL_NARALEXS_AWAKENING = 6271,
SPELL_FLIGHT_FORM = 33943,
- //npc entry
+
NPC_DEVIATE_RAVAGER = 3636,
NPC_DEVIATE_VIPER = 5755,
NPC_DEVIATE_MOCCASIN = 5762,
@@ -76,7 +73,6 @@ enum eEnums
#define GOSSIP_ID_START_1 698 //Naralex sleeps again!
#define GOSSIP_ID_START_2 699 //The fanglords are dead!
#define GOSSIP_ITEM_NARALEX "Let the event begin!"
-#define ACHIEVEMENT_WAILING_CAVERNS 630
class npc_disciple_of_naralex : public CreatureScript
{
@@ -98,7 +94,7 @@ public:
if (instance)
instance->SetData(TYPE_NARALEX_EVENT, IN_PROGRESS);
- DoScriptText(SAY_MAKE_PREPARATIONS, creature);
+ creature->AI()->Talk(SAY_MAKE_PREPARATIONS);
creature->setFaction(250);
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
@@ -125,7 +121,7 @@ public:
if (!instance->GetData(TYPE_NARALEX_YELLED))
{
- DoScriptText(SAY_AT_LAST, creature);
+ creature->AI()->Talk(SAY_AT_LAST);
instance->SetData(TYPE_NARALEX_YELLED, 1);
}
}
@@ -167,7 +163,7 @@ public:
instance->SetData(TYPE_NARALEX_PART1, IN_PROGRESS);
break;
case 5:
- DoScriptText(SAY_MUST_CONTINUE, me);
+ Talk(SAY_MUST_CONTINUE);
instance->SetData(TYPE_NARALEX_PART1, DONE);
break;
case 11:
@@ -176,7 +172,7 @@ public:
instance->SetData(TYPE_NARALEX_PART2, IN_PROGRESS);
break;
case 19:
- DoScriptText(SAY_BEYOND_THIS_CORRIDOR, me);
+ Talk(SAY_BEYOND_THIS_CORRIDOR);
break;
case 24:
eventProgress = 1;
@@ -193,7 +189,7 @@ public:
void EnterCombat(Unit* who)
{
- DoScriptText(SAY_ATTACKED, me, who);
+ Talk(SAY_ATTACKED, who->GetGUID());
}
void JustDied(Unit* /*slayer*/)
@@ -230,7 +226,7 @@ public:
if (eventProgress == 1)
{
++eventProgress;
- DoScriptText(SAY_TEMPLE_OF_PROMISE, me);
+ Talk(SAY_TEMPLE_OF_PROMISE);
me->SummonCreature(NPC_DEVIATE_RAVAGER, -82.1763f, 227.874f, -93.3233f, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000);
me->SummonCreature(NPC_DEVIATE_RAVAGER, -72.9506f, 216.645f, -93.6756f, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000);
}
@@ -239,7 +235,7 @@ public:
if (eventProgress == 1)
{
++eventProgress;
- DoScriptText(SAY_BANISH_THE_SPIRITS, me);
+ Talk(SAY_BANISH_THE_SPIRITS);
DoCast(me, SPELL_SERPENTINE_CLEANSING);
//CAST_AI(npc_escort::npc_escortAI, me->AI())->SetCanDefend(false);
eventTimer = 30000;
@@ -251,7 +247,7 @@ public:
if (eventProgress == 2)
{
//CAST_AI(npc_escort::npc_escortAI, me->AI())->SetCanDefend(true);
- DoScriptText(SAY_CAVERNS_PURIFIED, me);
+ Talk(SAY_CAVERNS_PURIFIED);
instance->SetData(TYPE_NARALEX_PART2, DONE);
if (me->HasAura(SPELL_SERPENTINE_CLEANSING))
me->RemoveAura(SPELL_SERPENTINE_CLEANSING);
@@ -263,7 +259,7 @@ public:
++eventProgress;
eventTimer = 4000;
me->SetStandState(UNIT_STAND_STATE_KNEEL);
- DoScriptText(SAY_EMERALD_DREAM, me);
+ Talk(SAY_EMERALD_DREAM);
}
else
if (eventProgress == 2)
@@ -273,7 +269,7 @@ public:
//CAST_AI(npc_escort::npc_escortAI, me->AI())->SetCanDefend(false);
if (Creature* naralex = instance->instance->GetCreature(instance->GetData64(DATA_NARALEX)))
DoCast(naralex, SPELL_NARALEXS_AWAKENING, true);
- DoScriptText(EMOTE_AWAKENING_RITUAL, me);
+ Talk(EMOTE_AWAKENING_RITUAL);
}
else
if (eventProgress == 3)
@@ -281,7 +277,7 @@ public:
++eventProgress;
eventTimer = 15000;
if (Creature* naralex = instance->instance->GetCreature(instance->GetData64(DATA_NARALEX)))
- DoScriptText(EMOTE_TROUBLED_SLEEP, naralex);
+ naralex->AI()->Talk(EMOTE_TROUBLED_SLEEP);
me->SummonCreature(NPC_DEVIATE_MOCCASIN, 135.943f, 199.701f, -103.529f, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 15000);
me->SummonCreature(NPC_DEVIATE_MOCCASIN, 151.08f, 221.13f, -103.609f, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 15000);
me->SummonCreature(NPC_DEVIATE_MOCCASIN, 128.007f, 227.428f, -97.421f, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 15000);
@@ -292,7 +288,7 @@ public:
++eventProgress;
eventTimer = 30000;
if (Creature* naralex = instance->instance->GetCreature(instance->GetData64(DATA_NARALEX)))
- DoScriptText(EMOTE_WRITHE_IN_AGONY, naralex);
+ naralex->AI()->Talk(EMOTE_WRITHE_IN_AGONY);
me->SummonCreature(NPC_NIGHTMARE_ECTOPLASM, 133.413f, 207.188f, -102.469f, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 15000);
me->SummonCreature(NPC_NIGHTMARE_ECTOPLASM, 142.857f, 218.645f, -102.905f, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 15000);
me->SummonCreature(NPC_NIGHTMARE_ECTOPLASM, 105.102f, 227.211f, -102.752f, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 15000);
@@ -306,9 +302,9 @@ public:
{
++eventProgress;
if (Creature* naralex = instance->instance->GetCreature(instance->GetData64(DATA_NARALEX)))
- DoScriptText(EMOTE_HORRENDOUS_VISION, naralex);
+ naralex->AI()->Talk(EMOTE_HORRENDOUS_VISION);
me->SummonCreature(NPC_MUTANUS_THE_DEVOURER, 150.872f, 262.905f, -103.503f, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
- DoScriptText(SAY_MUTANUS_THE_DEVOURER, me);
+ Talk(SAY_MUTANUS_THE_DEVOURER);
instance->SetData(TYPE_MUTANUS_THE_DEVOURER, IN_PROGRESS);
}
else
@@ -318,23 +314,12 @@ public:
eventTimer = 3000;
if (Creature* naralex = instance->instance->GetCreature(instance->GetData64(DATA_NARALEX)))
{
- AchievementEntry const* AchievWC = sAchievementStore.LookupEntry(ACHIEVEMENT_WAILING_CAVERNS);
- if (AchievWC)
- {
- Map* map = me->GetMap();
- if (map && map->IsDungeon())
- {
- Map::PlayerList const &players = map->GetPlayers();
- for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
- itr->getSource()->CompletedAchievement(AchievWC);
- }
- }
if (me->HasAura(SPELL_NARALEXS_AWAKENING))
me->RemoveAura(SPELL_NARALEXS_AWAKENING);
naralex->SetStandState(UNIT_STAND_STATE_STAND);
- DoScriptText(SAY_I_AM_AWAKE, naralex);
+ naralex->AI()->Talk(SAY_I_AM_AWAKE);
}
- DoScriptText(SAY_NARALEX_AWAKES, me);
+ Talk(SAY_NARALEX_AWAKES);
}
else
if (eventProgress == 7)
@@ -342,7 +327,7 @@ public:
++eventProgress;
eventTimer = 6000;
if (Creature* naralex = instance->instance->GetCreature(instance->GetData64(DATA_NARALEX)))
- DoScriptText(SAY_THANK_YOU, naralex);
+ naralex->AI()->Talk(SAY_THANK_YOU);
}
else
if (eventProgress == 8)
@@ -351,7 +336,7 @@ public:
eventTimer = 8000;
if (Creature* naralex = instance->instance->GetCreature(instance->GetData64(DATA_NARALEX)))
{
- DoScriptText(SAY_FAREWELL, naralex);
+ naralex->AI()->Talk(SAY_FAREWELL);
naralex->AddAura(SPELL_FLIGHT_FORM, naralex);
}
SetRun();
diff --git a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp
index f288db920f4..0a948e4a5f0 100644
--- a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp
+++ b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp
@@ -242,16 +242,16 @@ private:
enum weegliSpells
{
- SPELL_BOMB = 8858,
- SPELL_GOBLIN_LAND_MINE = 21688,
- SPELL_SHOOT = 6660,
- SPELL_WEEGLIS_BARREL = 10772
+ SPELL_BOMB = 8858,
+ SPELL_GOBLIN_LAND_MINE = 21688,
+ SPELL_SHOOT = 6660,
+ SPELL_WEEGLIS_BARREL = 10772
};
enum weegliSays
{
- SAY_WEEGLI_OHNO = -1209000,
- SAY_WEEGLI_OK_I_GO = -1209001
+ SAY_WEEGLI_OHNO = 0,
+ SAY_WEEGLI_OK_I_GO = 1
};
#define GOSSIP_WEEGLI "[PH] Please blow up the door."
@@ -363,7 +363,7 @@ public:
if (instance->GetData(EVENT_PYRAMID) == PYRAMID_CAGES_OPEN)
{
instance->SetData(EVENT_PYRAMID, PYRAMID_ARRIVED_AT_STAIR);
- DoScriptText(SAY_WEEGLI_OHNO, me);
+ Talk(SAY_WEEGLI_OHNO);
me->SetHomePosition(1882.69f, 1272.28f, 41.87f, 0);
}
else
@@ -388,7 +388,7 @@ public:
me->setFaction(FACTION_FRIENDLY);
me->GetMotionMaster()->MovePoint(0, 1858.57f, 1146.35f, 14.745f);
me->SetHomePosition(1858.57f, 1146.35f, 14.745f, 3.85f); // in case he gets interrupted
- DoScriptText(SAY_WEEGLI_OK_I_GO, me);
+ Talk(SAY_WEEGLI_OK_I_GO);
destroyingDoor=true;
}
}
diff --git a/src/server/scripts/Kalimdor/ashenvale.cpp b/src/server/scripts/Kalimdor/ashenvale.cpp
index 0e44da371d6..40ac1609fee 100644
--- a/src/server/scripts/Kalimdor/ashenvale.cpp
+++ b/src/server/scripts/Kalimdor/ashenvale.cpp
@@ -97,7 +97,7 @@ class npc_torek : public CreatureScript
me->SummonCreature(ENTRY_SILVERWING_WARRIOR, 1778.73f, -2049.50f, 109.83f, 1.67f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
break;
case 20:
- DoScriptText(SAY_WIN, me, player);
+ Talk(SAY_WIN, player->GetGUID());
Completed = true;
player->GroupEventHappens(QUEST_TOREK_ASSULT, me);
break;
@@ -269,16 +269,16 @@ class npc_ruul_snowhoof : public CreatureScript
enum Muglash
{
- SAY_MUG_START1 = -1800054,
- SAY_MUG_START2 = -1800055,
- SAY_MUG_BRAZIER = -1800056,
- SAY_MUG_BRAZIER_WAIT = -1800057,
- SAY_MUG_ON_GUARD = -1800058,
- SAY_MUG_REST = -1800059,
- SAY_MUG_DONE = -1800060,
- SAY_MUG_GRATITUDE = -1800061,
- SAY_MUG_PATROL = -1800062,
- SAY_MUG_RETURN = -1800063,
+ SAY_MUG_START1 = 0,
+ SAY_MUG_START2 = 1,
+ SAY_MUG_BRAZIER = 2,
+ SAY_MUG_BRAZIER_WAIT = 3,
+ SAY_MUG_ON_GUARD = 4,
+ SAY_MUG_REST = 5,
+ SAY_MUG_DONE = 6,
+ SAY_MUG_GRATITUDE = 7,
+ SAY_MUG_PATROL = 8,
+ SAY_MUG_RETURN = 9,
QUEST_VORSHA = 6641,
@@ -337,10 +337,10 @@ class npc_muglash : public CreatureScript
switch (waypointId)
{
case 0:
- DoScriptText(SAY_MUG_START2, me, player);
+ Talk(SAY_MUG_START2, player->GetGUID());
break;
case 24:
- DoScriptText(SAY_MUG_BRAZIER, me, player);
+ Talk(SAY_MUG_BRAZIER, player->GetGUID());
if (GameObject* go = GetClosestGameObjectWithEntry(me, GO_NAGA_BRAZIER, INTERACTION_DISTANCE*2))
{
@@ -349,14 +349,14 @@ class npc_muglash : public CreatureScript
}
break;
case 25:
- DoScriptText(SAY_MUG_GRATITUDE, me);
+ Talk(SAY_MUG_GRATITUDE);
player->GroupEventHappens(QUEST_VORSHA, me);
break;
case 26:
- DoScriptText(SAY_MUG_PATROL, me);
+ Talk(SAY_MUG_PATROL);
break;
case 27:
- DoScriptText(SAY_MUG_RETURN, me);
+ Talk(SAY_MUG_RETURN);
break;
}
}
@@ -368,7 +368,7 @@ class npc_muglash : public CreatureScript
if (HasEscortState(STATE_ESCORT_PAUSED))
{
if (urand(0, 1))
- DoScriptText(SAY_MUG_ON_GUARD, me, player);
+ Talk(SAY_MUG_ON_GUARD, player->GetGUID());
return;
}
}
@@ -406,7 +406,7 @@ class npc_muglash : public CreatureScript
break;
case 4:
SetEscortPaused(false);
- DoScriptText(SAY_MUG_DONE, me);
+ Talk(SAY_MUG_DONE);
break;
}
}
@@ -445,7 +445,7 @@ class npc_muglash : public CreatureScript
{
if (npc_muglashAI* pEscortAI = CAST_AI(npc_muglashAI, creature->AI()))
{
- DoScriptText(SAY_MUG_START1, creature);
+ creature->AI()->Talk(SAY_MUG_START1);
creature->setFaction(113);
pEscortAI->Start(true, false, player->GetGUID());
@@ -466,7 +466,7 @@ class go_naga_brazier : public GameObjectScript
{
if (npc_muglash::npc_muglashAI* pEscortAI = CAST_AI(npc_muglash::npc_muglashAI, creature->AI()))
{
- DoScriptText(SAY_MUG_BRAZIER_WAIT, creature);
+ creature->AI()->Talk(SAY_MUG_BRAZIER_WAIT);
pEscortAI->IsBrazierExtinguished = true;
return false;
diff --git a/src/server/scripts/Kalimdor/azshara.cpp b/src/server/scripts/Kalimdor/azshara.cpp
index 213918db338..b38d1ac2c3b 100644
--- a/src/server/scripts/Kalimdor/azshara.cpp
+++ b/src/server/scripts/Kalimdor/azshara.cpp
@@ -195,12 +195,10 @@ enum RizzleSprysprocketData
SPELL_PERIODIC_DEPTH_CHARGE = 39912,
SPELL_GIVE_SOUTHFURY_MOONSTONE = 39886,
- SAY_RIZZLE_START = -1000351,
- MSG_ESCAPE_NOTICE = -1000352,
- SAY_RIZZLE_GRENADE = -1000353,
- SAY_RIZZLE_GRENADE_BACKFIRE = -1000354, // Not used
- SAY_RIZZLE_FINAL = -1000355,
- SAY_RIZZLE_FINAL2 = -1000356, // Not used
+ SAY_RIZZLE_START = 0,
+ SAY_RIZZLE_GRENADE = 1,
+ SAY_RIZZLE_FINAL = 2,
+ MSG_ESCAPE_NOTICE = 3
};
#define GOSSIP_GET_MOONSTONE "Hand over the Southfury moonstone and I'll let you go."
@@ -366,7 +364,7 @@ public:
if (!player)
return;
- SendText(MSG_ESCAPE_NOTICE, player);
+ Talk(MSG_ESCAPE_NOTICE, player->GetGUID());
DoCast(me, SPELL_PERIODIC_DEPTH_CHARGE);
me->SetUnitMovementFlags(MOVEMENTFLAG_HOVER | MOVEMENTFLAG_SWIMMING);
me->SetSpeed(MOVE_RUN, 0.85f, true);
@@ -389,7 +387,7 @@ public:
Player* player = Unit::GetPlayer(*me, PlayerGUID);
if (player)
{
- DoScriptText(SAY_RIZZLE_GRENADE, me, player);
+ Talk(SAY_RIZZLE_GRENADE, player->GetGUID());
DoCast(player, SPELL_RIZZLE_FROST_GRENADE, true);
}
GrenadeTimer = 30000;
@@ -406,7 +404,7 @@ public:
if (me->IsWithinDist(player, 10) && me->GetPositionX() > player->GetPositionX() && !Reached)
{
- DoScriptText(SAY_RIZZLE_FINAL, me);
+ Talk(SAY_RIZZLE_FINAL);
me->SetUInt32Value(UNIT_NPC_FLAGS, 1);
me->setFaction(35);
me->GetMotionMaster()->MoveIdle();
@@ -434,7 +432,7 @@ public:
if (who->GetTypeId() == TYPEID_PLAYER && CAST_PLR(who)->GetQuestStatus(QUEST_CHASING_THE_MOONSTONE) == QUEST_STATUS_INCOMPLETE)
{
PlayerGUID = who->GetGUID();
- DoScriptText(SAY_RIZZLE_START, me);
+ Talk(SAY_RIZZLE_START);
DoCast(who, SPELL_RIZZLE_BLACKJACK, false);
return;
}
diff --git a/src/server/scripts/Kalimdor/azuremyst_isle.cpp b/src/server/scripts/Kalimdor/azuremyst_isle.cpp
index 96e67c8de47..3f1ae0fa3bf 100644
--- a/src/server/scripts/Kalimdor/azuremyst_isle.cpp
+++ b/src/server/scripts/Kalimdor/azuremyst_isle.cpp
@@ -47,15 +47,9 @@ EndContentData */
enum draeneiSurvivor
{
- SAY_HEAL1 = -1000176,
- SAY_HEAL2 = -1000177,
- SAY_HEAL3 = -1000178,
- SAY_HEAL4 = -1000179,
+ SAY_HEAL = 0,
- SAY_HELP1 = -1000180,
- SAY_HELP2 = -1000181,
- SAY_HELP3 = -1000182,
- SAY_HELP4 = -1000183,
+ SAY_HELP = 1,
SPELL_IRRIDATION = 35046,
SPELL_STUNNED = 28630
@@ -108,7 +102,7 @@ public:
if (CanSayHelp && who->GetTypeId() == TYPEID_PLAYER && me->IsFriendlyTo(who) && me->IsWithinDistInMap(who, 25.0f))
{
//Random switch between 4 texts
- DoScriptText(RAND(SAY_HELP1, SAY_HELP2, SAY_HELP3, SAY_HELP4), me, who);
+ Talk(SAY_HELP, who->GetGUID());
SayHelpTimer = 20000;
CanSayHelp = false;
@@ -140,7 +134,7 @@ public:
if (Player* player = Unit::GetPlayer(*me, pCaster))
{
- DoScriptText(RAND(SAY_HEAL1, SAY_HEAL2, SAY_HEAL3, SAY_HEAL4), me, player);
+ Talk(SAY_HEAL, player->GetGUID());
player->TalkedToCreature(me->GetEntry(), me->GetGUID());
}
@@ -181,9 +175,9 @@ public:
enum Overgrind
{
- SAY_TEXT = -1000184,
- SAY_EMOTE = -1000185,
- ATTACK_YELL = -1000186,
+ SAY_TEXT = 0,
+ SAY_EMOTE = 1,
+ ATTACK_YELL = 2,
AREA_COVE = 3579,
AREA_ISLE = 3639,
@@ -257,7 +251,7 @@ public:
void EnterCombat(Unit* who)
{
- DoScriptText(ATTACK_YELL, me, who);
+ Talk(ATTACK_YELL, who->GetGUID());
}
void UpdateAI(const uint32 diff)
@@ -266,8 +260,8 @@ public:
{
if (EmoteTimer <= diff)
{
- DoScriptText(SAY_TEXT, me);
- DoScriptText(SAY_EMOTE, me);
+ Talk(SAY_TEXT);
+ Talk(SAY_EMOTE);
EmoteTimer = urand(120000, 150000);
} else EmoteTimer -= diff;
}
@@ -338,12 +332,12 @@ public:
enum Magwin
{
- SAY_START = -1000111,
- SAY_AGGRO = -1000112,
- SAY_PROGRESS = -1000113,
- SAY_END1 = -1000114,
- SAY_END2 = -1000115,
- EMOTE_HUG = -1000116,
+ SAY_START = 0,
+ SAY_AGGRO = 1,
+ SAY_PROGRESS = 2,
+ SAY_END1 = 3,
+ SAY_END2 = 4,
+ EMOTE_HUG = 5,
QUEST_A_CRY_FOR_SAY_HELP = 9528
};
@@ -380,17 +374,17 @@ public:
switch (waypointId)
{
case 0:
- DoScriptText(SAY_START, me, player);
+ Talk(SAY_START, player->GetGUID());
break;
case 17:
- DoScriptText(SAY_PROGRESS, me, player);
+ Talk(SAY_PROGRESS, player->GetGUID());
break;
case 28:
- DoScriptText(SAY_END1, me, player);
+ Talk(SAY_END1, player->GetGUID());
break;
case 29:
- DoScriptText(EMOTE_HUG, me, player);
- DoScriptText(SAY_END2, me, player);
+ Talk(EMOTE_HUG, player->GetGUID());
+ Talk(SAY_END2, player->GetGUID());
player->GroupEventHappens(QUEST_A_CRY_FOR_SAY_HELP, me);
break;
}
@@ -399,7 +393,7 @@ public:
void EnterCombat(Unit* who)
{
- DoScriptText(SAY_AGGRO, me, who);
+ Talk(SAY_AGGRO, who->GetGUID());
}
void Reset() {}
@@ -417,15 +411,15 @@ enum Geezle
SPELL_TREE_DISGUISE = 30298,
- GEEZLE_SAY_1 = -1000629,
- SPARK_SAY_2 = -1000630,
- SPARK_SAY_3 = -1000631,
- GEEZLE_SAY_4 = -1000632,
- SPARK_SAY_5 = -1000633,
- SPARK_SAY_6 = -1000634,
- GEEZLE_SAY_7 = -1000635,
+ GEEZLE_SAY_1 = 0,
+ SPARK_SAY_2 = 3,
+ SPARK_SAY_3 = 4,
+ GEEZLE_SAY_4 = 1,
+ SPARK_SAY_5 = 5,
+ SPARK_SAY_6 = 6,
+ GEEZLE_SAY_7 = 2,
- EMOTE_SPARK = -1000636,
+ EMOTE_SPARK = 7,
MOB_SPARK = 17243,
GO_NAGA_FLAG = 181694
@@ -479,41 +473,49 @@ public:
uint32 NextStep(uint8 Step)
{
Creature* Spark = Unit::GetCreature(*me, SparkGUID);
+ if (!Spark)
+ return 99999999;
switch (Step)
{
case 0:
- if (Spark)
- Spark->GetMotionMaster()->MovePoint(0, -5080.70f, -11253.61f, 0.56f);
+ Spark->GetMotionMaster()->MovePoint(0, -5080.70f, -11253.61f, 0.56f);
me->GetMotionMaster()->MovePoint(0, -5092.26f, -11252, 0.71f);
- return 9000; // NPCs are walking up to fire
+ return 9000;
case 1:
DespawnNagaFlag(true);
- DoScriptText(EMOTE_SPARK, Spark);
+ Spark->AI()->Talk(EMOTE_SPARK);
return 1000;
case 2:
- DoScriptText(GEEZLE_SAY_1, me, Spark);
- if (Spark)
- {
- Spark->SetInFront(me);
- me->SetInFront(Spark);
- }
+ Talk(GEEZLE_SAY_1, SparkGUID);
+ Spark->SetInFront(me);
+ me->SetInFront(Spark);
return 5000;
- case 3: DoScriptText(SPARK_SAY_2, Spark); return 7000;
- case 4: DoScriptText(SPARK_SAY_3, Spark); return 8000;
- case 5: DoScriptText(GEEZLE_SAY_4, me, Spark); return 8000;
- case 6: DoScriptText(SPARK_SAY_5, Spark); return 9000;
- case 7: DoScriptText(SPARK_SAY_6, Spark); return 8000;
- case 8: DoScriptText(GEEZLE_SAY_7, me, Spark); return 2000;
+ case 3:
+ Spark->AI()->Talk(SPARK_SAY_2);
+ return 7000;
+ case 4:
+ Spark->AI()->Talk(SPARK_SAY_3);
+ return 8000;
+ case 5:
+ Talk(GEEZLE_SAY_4, SparkGUID);
+ return 8000;
+ case 6:
+ Spark->AI()->Talk(SPARK_SAY_5);
+ return 9000;
+ case 7:
+ Spark->AI()->Talk(SPARK_SAY_6);
+ return 8000;
+ case 8:
+ Talk(GEEZLE_SAY_7, SparkGUID);
+ return 2000;
case 9:
me->GetMotionMaster()->MoveTargetedHome();
- if (Spark)
- Spark->GetMotionMaster()->MovePoint(0, SparkPos);
+ Spark->GetMotionMaster()->MovePoint(0, SparkPos);
CompleteQuest();
return 9000;
case 10:
- if (Spark)
- Spark->DisappearAndDie();
+ Spark->DisappearAndDie();
DespawnNagaFlag(false);
me->DisappearAndDie();
default: return 99999999;
@@ -658,9 +660,7 @@ enum BristlelimbCage
NPC_STILLPINE_CAPITIVE = 17375,
GO_BRISTELIMB_CAGE = 181714,
- CAPITIVE_SAY_1 = -1000474,
- CAPITIVE_SAY_2 = -1000475,
- CAPITIVE_SAY_3 = -1000476,
+ CAPITIVE_SAY = 0,
POINT_INIT = 1,
EVENT_DESPAWN = 1,
@@ -673,9 +673,7 @@ class npc_stillpine_capitive : public CreatureScript
struct npc_stillpine_capitiveAI : public ScriptedAI
{
- npc_stillpine_capitiveAI(Creature* creature) : ScriptedAI(creature)
- {
- }
+ npc_stillpine_capitiveAI(Creature* creature) : ScriptedAI(creature) {}
void Reset()
{
@@ -693,7 +691,7 @@ class npc_stillpine_capitive : public CreatureScript
{
if (owner)
{
- DoScriptText(RAND(CAPITIVE_SAY_1, CAPITIVE_SAY_2, CAPITIVE_SAY_3), me, owner);
+ Talk(CAPITIVE_SAY, owner->GetGUID());
_player = owner;
}
Position pos;
diff --git a/src/server/scripts/Kalimdor/bloodmyst_isle.cpp b/src/server/scripts/Kalimdor/bloodmyst_isle.cpp
index 339cd02c2e3..3b77ee34275 100644
--- a/src/server/scripts/Kalimdor/bloodmyst_isle.cpp
+++ b/src/server/scripts/Kalimdor/bloodmyst_isle.cpp
@@ -158,7 +158,7 @@ enum Stillpine
NPC_PRINCESS_STILLPINE = 17682,
GO_PRINCESS_STILLPINES_CAGE = 181928,
SPELL_OPENING_PRINCESS_STILLPINE_CREDIT = 31003,
- SAY_DIRECTION = -1800074
+ SAY_DIRECTION = 0
};
class go_princess_stillpines_cage : public GameObjectScript
@@ -191,7 +191,7 @@ public:
{
if (type == POINT_MOTION_TYPE && id == 1)
{
- DoScriptText(SAY_DIRECTION, me);
+ Talk(SAY_DIRECTION);
me->DespawnOrUnsummon();
}
}
diff --git a/src/server/scripts/Kalimdor/boss_azuregos.cpp b/src/server/scripts/Kalimdor/boss_azuregos.cpp
index 3b431d55a2c..7bc2e96e0dc 100644
--- a/src/server/scripts/Kalimdor/boss_azuregos.cpp
+++ b/src/server/scripts/Kalimdor/boss_azuregos.cpp
@@ -28,7 +28,7 @@ EndScriptData */
enum Say
{
- SAY_TELEPORT = -1000100
+ SAY_TELEPORT = 0
};
enum Spells
@@ -89,7 +89,7 @@ public:
if (TeleportTimer <= diff)
{
- DoScriptText(SAY_TELEPORT, me);
+ Talk(SAY_TELEPORT);
ThreatContainer::StorageType threatlist = me->getThreatManager().getThreatList();
ThreatContainer::StorageType::const_iterator i = threatlist.begin();
for (i = threatlist.begin(); i != threatlist.end(); ++i)
diff --git a/src/server/scripts/Kalimdor/darkshore.cpp b/src/server/scripts/Kalimdor/darkshore.cpp
index 5d10076c114..921cc6aaf97 100644
--- a/src/server/scripts/Kalimdor/darkshore.cpp
+++ b/src/server/scripts/Kalimdor/darkshore.cpp
@@ -43,23 +43,12 @@ EndContentData */
enum Kerlonian
{
- SAY_KER_START = -1000434,
-
- EMOTE_KER_SLEEP_1 = -1000435,
- EMOTE_KER_SLEEP_2 = -1000436,
- EMOTE_KER_SLEEP_3 = -1000437,
-
- SAY_KER_SLEEP_1 = -1000438,
- SAY_KER_SLEEP_2 = -1000439,
- SAY_KER_SLEEP_3 = -1000440,
- SAY_KER_SLEEP_4 = -1000441,
-
- EMOTE_KER_AWAKEN = -1000445,
-
- SAY_KER_ALERT_1 = -1000442,
- SAY_KER_ALERT_2 = -1000443,
-
- SAY_KER_END = -1000444,
+ SAY_KER_START = 0,
+ EMOTE_KER_SLEEP = 1,
+ SAY_KER_SLEEP = 2,
+ SAY_KER_ALERT_1 = 3,
+ SAY_KER_END = 4,
+ EMOTE_KER_AWAKEN = 5,
SPELL_SLEEP_VISUAL = 25148,
SPELL_AWAKEN = 17536,
@@ -81,7 +70,7 @@ public:
if (npc_kerlonianAI* pKerlonianAI = CAST_AI(npc_kerlonian::npc_kerlonianAI, creature->AI()))
{
creature->SetStandState(UNIT_STAND_STATE_STAND);
- DoScriptText(SAY_KER_START, creature, player);
+ creature->AI()->Talk(SAY_KER_START, player->GetGUID());
pKerlonianAI->StartFollow(player, FACTION_KER_ESCORTEE, quest);
}
}
@@ -118,7 +107,7 @@ public:
if (player->GetQuestStatus(QUEST_SLEEPER_AWAKENED) == QUEST_STATUS_INCOMPLETE)
player->GroupEventHappens(QUEST_SLEEPER_AWAKENED, me);
- DoScriptText(SAY_KER_END, me);
+ Talk(SAY_KER_END);
}
SetFollowComplete();
@@ -136,9 +125,9 @@ public:
{
SetFollowPaused(true);
- DoScriptText(RAND(EMOTE_KER_SLEEP_1, EMOTE_KER_SLEEP_2, EMOTE_KER_SLEEP_3), me);
+ Talk(EMOTE_KER_SLEEP);
- DoScriptText(RAND(SAY_KER_SLEEP_1, SAY_KER_SLEEP_2, SAY_KER_SLEEP_3, SAY_KER_SLEEP_4), me);
+ Talk(SAY_KER_SLEEP);
me->SetStandState(UNIT_STAND_STATE_SLEEP);
DoCast(me, SPELL_SLEEP_VISUAL, false);
@@ -149,7 +138,7 @@ public:
me->RemoveAurasDueToSpell(SPELL_SLEEP_VISUAL);
me->SetStandState(UNIT_STAND_STATE_STAND);
- DoScriptText(EMOTE_KER_AWAKEN, me);
+ Talk(EMOTE_KER_AWAKEN);
SetFollowPaused(false);
}
@@ -187,19 +176,19 @@ public:
enum Remtravel
{
- SAY_REM_START = -1000327,
- SAY_REM_AGGRO = -1000328,
- SAY_REM_RAMP1_1 = -1000329,
- SAY_REM_RAMP1_2 = -1000330,
- SAY_REM_BOOK = -1000331,
- SAY_REM_TENT1_1 = -1000332,
- SAY_REM_TENT1_2 = -1000333,
- SAY_REM_MOSS = -1000334,
- EMOTE_REM_MOSS = -1000335,
- SAY_REM_MOSS_PROGRESS = -1000336,
- SAY_REM_PROGRESS = -1000337,
- SAY_REM_REMEMBER = -1000338,
- EMOTE_REM_END = -1000339,
+ SAY_REM_START = 0,
+ SAY_REM_AGGRO = 1,
+ SAY_REM_RAMP1_1 = 2,
+ SAY_REM_RAMP1_2 = 3,
+ SAY_REM_BOOK = 4,
+ SAY_REM_TENT1_1 = 5,
+ SAY_REM_TENT1_2 = 6,
+ SAY_REM_MOSS = 7,
+ EMOTE_REM_MOSS = 8,
+ SAY_REM_MOSS_PROGRESS = 9,
+ SAY_REM_PROGRESS = 10,
+ SAY_REM_REMEMBER = 11,
+ EMOTE_REM_END = 12,
FACTION_ESCORTEE = 10,
QUEST_ABSENT_MINDED_PT2 = 731,
@@ -242,40 +231,40 @@ public:
switch (waypointId)
{
case 0:
- DoScriptText(SAY_REM_START, me, player);
+ Talk(SAY_REM_START, player->GetGUID());
break;
case 5:
- DoScriptText(SAY_REM_RAMP1_1, me, player);
+ Talk(SAY_REM_RAMP1_1, player->GetGUID());
break;
case 6:
DoSpawnCreature(NPC_GRAVEL_SCOUT, -10.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
DoSpawnCreature(NPC_GRAVEL_BONE, -10.0f, 7.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
break;
case 9:
- DoScriptText(SAY_REM_RAMP1_2, me, player);
+ Talk(SAY_REM_RAMP1_2, player->GetGUID());
break;
case 14:
//depend quest rewarded?
- DoScriptText(SAY_REM_BOOK, me, player);
+ Talk(SAY_REM_BOOK, player->GetGUID());
break;
case 15:
- DoScriptText(SAY_REM_TENT1_1, me, player);
+ Talk(SAY_REM_TENT1_1, player->GetGUID());
break;
case 16:
DoSpawnCreature(NPC_GRAVEL_SCOUT, -10.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
DoSpawnCreature(NPC_GRAVEL_BONE, -10.0f, 7.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
break;
case 17:
- DoScriptText(SAY_REM_TENT1_2, me, player);
+ Talk(SAY_REM_TENT1_2, player->GetGUID());
break;
case 26:
- DoScriptText(SAY_REM_MOSS, me, player);
+ Talk(SAY_REM_MOSS, player->GetGUID());
break;
case 27:
- DoScriptText(EMOTE_REM_MOSS, me, player);
+ Talk(EMOTE_REM_MOSS, player->GetGUID());
break;
case 28:
- DoScriptText(SAY_REM_MOSS_PROGRESS, me, player);
+ Talk(SAY_REM_MOSS_PROGRESS, player->GetGUID());
break;
case 29:
DoSpawnCreature(NPC_GRAVEL_SCOUT, -15.0f, 3.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
@@ -283,13 +272,13 @@ public:
DoSpawnCreature(NPC_GRAVEL_GEO, -15.0f, 7.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
break;
case 31:
- DoScriptText(SAY_REM_PROGRESS, me, player);
+ Talk(SAY_REM_PROGRESS, player->GetGUID());
break;
case 41:
- DoScriptText(SAY_REM_REMEMBER, me, player);
+ Talk(SAY_REM_REMEMBER, player->GetGUID());
break;
case 42:
- DoScriptText(EMOTE_REM_END, me, player);
+ Talk(EMOTE_REM_END, player->GetGUID());
player->GroupEventHappens(QUEST_ABSENT_MINDED_PT2, me);
break;
}
@@ -301,7 +290,7 @@ public:
void EnterCombat(Unit* who)
{
if (urand(0, 1))
- DoScriptText(SAY_REM_AGGRO, me, who);
+ Talk(SAY_REM_AGGRO, who->GetGUID());
}
void JustSummoned(Creature* /*pSummoned*/)
@@ -319,8 +308,8 @@ public:
enum Threshwackonator
{
- EMOTE_START = -1000325, //signed for 4966
- SAY_AT_CLOSE = -1000326, //signed for 4966
+ EMOTE_START = 0,
+ SAY_AT_CLOSE = 1,
QUEST_GYROMAST_REV = 2078,
NPC_GELKAK = 6667,
FACTION_HOSTILE = 14
@@ -342,7 +331,7 @@ public:
if (npc_threshwackonatorAI* pThreshAI = CAST_AI(npc_threshwackonator::npc_threshwackonatorAI, creature->AI()))
{
- DoScriptText(EMOTE_START, creature);
+ creature->AI()->Talk(EMOTE_START);
pThreshAI->StartFollow(player);
}
}
@@ -378,7 +367,7 @@ public:
{
if (me->IsWithinDistInMap(who, 10.0f))
{
- DoScriptText(SAY_AT_CLOSE, who);
+ Talk(SAY_AT_CLOSE, who->GetGUID());
DoAtEnd();
}
}
diff --git a/src/server/scripts/Kalimdor/desolace.cpp b/src/server/scripts/Kalimdor/desolace.cpp
index 30a87ef0197..8c56714e614 100644
--- a/src/server/scripts/Kalimdor/desolace.cpp
+++ b/src/server/scripts/Kalimdor/desolace.cpp
@@ -40,9 +40,7 @@ EndContentData */
enum DyingKodo
{
// signed for 9999
- SAY_SMEED_HOME_1 = -1000348,
- SAY_SMEED_HOME_2 = -1000349,
- SAY_SMEED_HOME_3 = -1000350,
+ SAY_SMEED_HOME = 0,
QUEST_KODO = 5561,
@@ -134,7 +132,8 @@ public:
if (me->IsWithinDistInMap(who, 10.0f))
{
- DoScriptText(RAND(SAY_SMEED_HOME_1, SAY_SMEED_HOME_2, SAY_SMEED_HOME_3), who);
+ if (Creature* talker = who->ToCreature())
+ talker->AI()->Talk(SAY_SMEED_HOME);
//spell have no implemented effect (dummy), so useful to notify spellHit
DoCast(me, SPELL_KODO_KOMBO_GOSSIP, true);
diff --git a/src/server/scripts/Kalimdor/durotar.cpp b/src/server/scripts/Kalimdor/durotar.cpp
index 83111829c9e..04e65693154 100644
--- a/src/server/scripts/Kalimdor/durotar.cpp
+++ b/src/server/scripts/Kalimdor/durotar.cpp
@@ -28,7 +28,7 @@
enum LazyPeonYells
{
- SAY_SPELL_HIT = -1000600 //Ow! OK, I''ll get back to work, $N!'
+ SAY_SPELL_HIT = 0
};
enum LazyPeon
@@ -77,7 +77,7 @@ public:
&& CAST_PLR(caster)->GetQuestStatus(QUEST_LAZY_PEONS) == QUEST_STATUS_INCOMPLETE)
{
caster->ToPlayer()->KilledMonsterCredit(me->GetEntry(), me->GetGUID());
- DoScriptText(SAY_SPELL_HIT, me, caster);
+ Talk(SAY_SPELL_HIT, caster->GetGUID());
me->RemoveAllAuras();
if (GameObject* Lumberpile = me->FindNearestGameObject(GO_LUMBERPILE, 20))
me->GetMotionMaster()->MovePoint(1, Lumberpile->GetPositionX()-1, Lumberpile->GetPositionY(), Lumberpile->GetPositionZ());
diff --git a/src/server/scripts/Kalimdor/dustwallow_marsh.cpp b/src/server/scripts/Kalimdor/dustwallow_marsh.cpp
index 6ab9b653c5d..018b39c58e8 100644
--- a/src/server/scripts/Kalimdor/dustwallow_marsh.cpp
+++ b/src/server/scripts/Kalimdor/dustwallow_marsh.cpp
@@ -138,22 +138,16 @@ class mobs_risen_husk_spirit : public CreatureScript
enum TheramoreGuard
{
- SAY_QUEST1 = -1000641,
- SAY_QUEST2 = -1000642,
- SAY_QUEST3 = -1000643,
- SAY_QUEST4 = -1000644,
- SAY_QUEST5 = -1000645,
- SAY_QUEST6 = -1000646,
- SAY_QUEST7 = -1000647,
- SAY_QUEST8 = -1000648,
- SAY_QUEST9 = -1000649,
-
- QUEST_DISCREDITING_THE_DESERTERS = 11133,
-
- NPC_THERAMORE_GUARD = 4979,
-
- SPELL_DOCTORED_LEAFLET = 42725,
- SPELL_PROPAGANDIZED = 42246,
+ QUEST_DISCREDITING_THE_DESERTERS = 11133,
+
+ NPC_THERAMORE_GUARD = 4979,
+
+ SPELL_DOCTORED_LEAFLET = 42725,
+ SPELL_PROPAGANDIZED = 42246,
+
+ SAY_QUEST1 = 0,
+ SAY_QUEST2 = 1,
+ SAY_QUEST3 = 2
};
#define GOSSIP_ITEM_THERAMORE_GUARD "You look like an intelligent person. Why don't you read one of these leaflets and give it some thought?"
@@ -181,7 +175,7 @@ public:
{
player->CLOSE_GOSSIP_MENU();
player->KilledMonsterCredit(NPC_THERAMORE_GUARD, 0);
- DoScriptText(SAY_QUEST1, creature);
+ creature->AI()->Talk(SAY_QUEST1);
creature->CastSpell(creature, SPELL_DOCTORED_LEAFLET, false);
creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
CAST_AI(npc_theramore_guard::npc_theramore_guardAI, creature->AI())->YellTimer = 4000;
@@ -220,12 +214,12 @@ public:
switch (Step)
{
case 0:
- DoScriptText(RAND(SAY_QUEST2, SAY_QUEST3, SAY_QUEST4, SAY_QUEST5, SAY_QUEST6), me);
+ Talk(SAY_QUEST2);
YellTimer = 3000;
++Step;
break;
case 1:
- DoScriptText(RAND(SAY_QUEST7, SAY_QUEST8, SAY_QUEST9), me);
+ Talk(SAY_QUEST3);
me->HandleEmoteCommand(EMOTE_ONESHOT_LAUGH);
Step = 0;
bYellTimer = false;
@@ -328,12 +322,11 @@ public:
enum Hendel
{
- // looks like all this text ids are wrong.
- SAY_PROGRESS_1_TER = -1000411, // signed for 3568
- SAY_PROGRESS_2_HEN = -1000412, // signed for 3568
- SAY_PROGRESS_3_TER = -1000413,
- SAY_PROGRESS_4_TER = -1000414,
- EMOTE_SURRENDER = -1000415,
+ SAY_PROGRESS_1_TER = 0,
+ SAY_PROGRESS_2_HEN = 1,
+ SAY_PROGRESS_3_TER = 2,
+ SAY_PROGRESS_4_TER = 3,
+ EMOTE_SURRENDER = 4,
QUEST_MISSING_DIPLO_PT16 = 1324,
FACTION_HOSTILE = 168, //guessed, may be different
@@ -391,7 +384,7 @@ public:
if (Player* player = pDoneBy->GetCharmerOrOwnerPlayerOrPlayerItself())
player->GroupEventHappens(QUEST_MISSING_DIPLO_PT16, me);
- DoScriptText(EMOTE_SURRENDER, me);
+ Talk(EMOTE_SURRENDER);
EnterEvadeMode();
}
}
@@ -407,8 +400,8 @@ Position const MovePosition = {-2967.030f, -3872.1799f, 35.620f, 0.0f};
enum Zelfrax
{
- SAY_ZELFRAX = -1000472,
- SAY_ZELFRAX_2 = -1000473
+ SAY_ZELFRAX1 = 0,
+ SAY_ZELFRAX2 = 1
};
class npc_zelfrax : public CreatureScript
@@ -461,8 +454,8 @@ public:
{
SetCombatMovement(false);
me->GetMotionMaster()->MovePoint(0, MovePosition);
- DoScriptText(SAY_ZELFRAX, me);
- DoScriptText(SAY_ZELFRAX_2, me);
+ Talk(SAY_ZELFRAX1);
+ Talk(SAY_ZELFRAX2);
}
void UpdateAI(uint32 const /*Diff*/)
@@ -484,16 +477,16 @@ enum Stinky
{
QUEST_STINKYS_ESCAPE_H = 1270,
QUEST_STINKYS_ESCAPE_A = 1222,
- SAY_QUEST_ACCEPTED = -1000507,
- SAY_STAY_1 = -1000508,
- SAY_STAY_2 = -1000509,
- SAY_STAY_3 = -1000510,
- SAY_STAY_4 = -1000511,
- SAY_STAY_5 = -1000512,
- SAY_STAY_6 = -1000513,
- SAY_QUEST_COMPLETE = -1000514,
- SAY_ATTACKED_1 = -1000515,
- EMOTE_DISAPPEAR = -1000516
+ SAY_QUEST_ACCEPTED = 0,
+ SAY_STAY_1 = 1,
+ SAY_STAY_2 = 2,
+ SAY_STAY_3 = 3,
+ SAY_STAY_4 = 4,
+ SAY_STAY_5 = 5,
+ SAY_STAY_6 = 6,
+ SAY_QUEST_COMPLETE = 7,
+ SAY_ATTACKED_1 = 8,
+ EMOTE_DISAPPEAR = 9
};
class npc_stinky : public CreatureScript
@@ -514,7 +507,7 @@ public:
{
creature->setFaction(FACTION_ESCORT_N_NEUTRAL_ACTIVE);
creature->SetStandState(UNIT_STAND_STATE_STAND);
- DoScriptText(SAY_QUEST_ACCEPTED, creature);
+ creature->AI()->Talk(SAY_QUEST_ACCEPTED);
pEscortAI->Start(false, false, player->GetGUID());
}
}
@@ -534,29 +527,29 @@ public:
switch (waypointId)
{
case 7:
- DoScriptText(SAY_STAY_1, me, player);
+ Talk(SAY_STAY_1, player->GetGUID());
break;
case 11:
- DoScriptText(SAY_STAY_2, me, player);
+ Talk(SAY_STAY_2, player->GetGUID());
break;
case 25:
- DoScriptText(SAY_STAY_3, me, player);
+ Talk(SAY_STAY_3, player->GetGUID());
break;
case 26:
- DoScriptText(SAY_STAY_4, me, player);
+ Talk(SAY_STAY_4, player->GetGUID());
break;
case 27:
- DoScriptText(SAY_STAY_5, me, player);
+ Talk(SAY_STAY_5, player->GetGUID());
break;
case 28:
- DoScriptText(SAY_STAY_6, me, player);
+ Talk(SAY_STAY_6, player->GetGUID());
me->SetStandState(UNIT_STAND_STATE_KNEEL);
break;
case 29:
me->SetStandState(UNIT_STAND_STATE_STAND);
break;
case 37:
- DoScriptText(SAY_QUEST_COMPLETE, me, player);
+ Talk(SAY_QUEST_COMPLETE, player->GetGUID());
me->SetSpeed(MOVE_RUN, 1.2f, true);
me->SetWalk(false);
if (player->GetQuestStatus(QUEST_STINKYS_ESCAPE_H))
@@ -565,14 +558,14 @@ public:
player->GroupEventHappens(QUEST_STINKYS_ESCAPE_A, me);
break;
case 39:
- DoScriptText(EMOTE_DISAPPEAR, me);
+ Talk(EMOTE_DISAPPEAR);
break;
}
}
void EnterCombat(Unit* who)
{
- DoScriptText(SAY_ATTACKED_1, me, who);
+ Talk(SAY_ATTACKED_1, who->GetGUID());
}
void Reset() {}
diff --git a/src/server/scripts/Kalimdor/feralas.cpp b/src/server/scripts/Kalimdor/feralas.cpp
index df4345b3aae..148f53c9e57 100644
--- a/src/server/scripts/Kalimdor/feralas.cpp
+++ b/src/server/scripts/Kalimdor/feralas.cpp
@@ -75,12 +75,10 @@ public:
enum OOX
{
- //signed for 7806
- SAY_OOX_START = -1000287,
- SAY_OOX_AGGRO1 = -1000288,
- SAY_OOX_AGGRO2 = -1000289,
- SAY_OOX_AMBUSH = -1000290,
- SAY_OOX_END = -1000292,
+ SAY_OOX_START = 0,
+ SAY_OOX_AGGRO = 1,
+ SAY_OOX_AMBUSH = 2,
+ SAY_OOX_END = 3,
NPC_YETI = 7848,
NPC_GORILLA = 5260,
@@ -103,7 +101,7 @@ public:
{
if (quest->GetQuestId() == QUEST_RESCUE_OOX22FE)
{
- DoScriptText(SAY_OOX_START, creature);
+ creature->AI()->Talk(SAY_OOX_START);
//change that the npc is not lying dead on the ground
creature->SetStandState(UNIT_STAND_STATE_STAND);
@@ -135,28 +133,28 @@ public:
{
// First Ambush(3 Yetis)
case 11:
- DoScriptText(SAY_OOX_AMBUSH, me);
+ Talk(SAY_OOX_AMBUSH);
me->SummonCreature(NPC_YETI, -4841.01f, 1593.91f, 73.42f, 3.98f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
me->SummonCreature(NPC_YETI, -4837.61f, 1568.58f, 78.21f, 3.13f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
me->SummonCreature(NPC_YETI, -4841.89f, 1569.95f, 76.53f, 0.68f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
break;
//Second Ambush(3 Gorillas)
case 21:
- DoScriptText(SAY_OOX_AMBUSH, me);
+ Talk(SAY_OOX_AMBUSH);
me->SummonCreature(NPC_GORILLA, -4595.81f, 2005.99f, 53.08f, 3.74f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
me->SummonCreature(NPC_GORILLA, -4597.53f, 2008.31f, 52.70f, 3.78f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
me->SummonCreature(NPC_GORILLA, -4599.37f, 2010.59f, 52.77f, 3.84f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
break;
//Third Ambush(4 Gnolls)
case 30:
- DoScriptText(SAY_OOX_AMBUSH, me);
+ Talk(SAY_OOX_AMBUSH);
me->SummonCreature(NPC_WOODPAW_REAVER, -4425.14f, 2075.87f, 47.77f, 3.77f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
me->SummonCreature(NPC_WOODPAW_BRUTE, -4426.68f, 2077.98f, 47.57f, 3.77f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
me->SummonCreature(NPC_WOODPAW_MYSTIC, -4428.33f, 2080.24f, 47.43f, 3.87f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
me->SummonCreature(NPC_WOODPAW_ALPHA, -4430.04f, 2075.54f, 46.83f, 3.81f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
break;
case 37:
- DoScriptText(SAY_OOX_END, me);
+ Talk(SAY_OOX_END);
// Award quest credit
if (Player* player = GetPlayerForEscort())
player->GroupEventHappens(QUEST_RESCUE_OOX22FE, me);
@@ -174,7 +172,7 @@ public:
{
//For an small probability the npc says something when he get aggro
if (urand(0, 9) > 7)
- DoScriptText(RAND(SAY_OOX_AGGRO1, SAY_OOX_AGGRO2), me);
+ Talk(SAY_OOX_AGGRO);
}
void JustSummoned(Creature* summoned)
diff --git a/src/server/scripts/Kalimdor/moonglade.cpp b/src/server/scripts/Kalimdor/moonglade.cpp
index 6d93e074e79..f438275b82a 100644
--- a/src/server/scripts/Kalimdor/moonglade.cpp
+++ b/src/server/scripts/Kalimdor/moonglade.cpp
@@ -37,6 +37,9 @@ EndContentData */
#include "ScriptedGossip.h"
#include "Player.h"
#include "SpellInfo.h"
+#include "Cell.h"
+#include "CellImpl.h"
+#include "GridNotifiers.h"
/*######
## npc_bunthen_plainswind
@@ -275,14 +278,8 @@ enum ClintarSpirit
{
ASPECT_RAVEN = 22915,
- //from -1000292 to -1000287 are signed for 7806. but all this texts ids wrong.
- CLINTAR_SPIRIT_SAY_START = -1000286,
- CLINTAR_SPIRIT_SAY_UNDER_ATTACK_1 = -1000287,
- CLINTAR_SPIRIT_SAY_UNDER_ATTACK_2 = -1000288,
- CLINTAR_SPIRIT_SAY_GET_ONE = -1000289,
- CLINTAR_SPIRIT_SAY_GET_TWO = -1000290,
- CLINTAR_SPIRIT_SAY_GET_THREE = -1000291,
- CLINTAR_SPIRIT_SAY_GET_FINAL = -1000292
+ // Texts for EnterCombat, the event and the end of the event are missing
+ CLINTAR_SPIRIT_SAY_START = 0,
};
class npc_clintar_spirit : public CreatureScript
@@ -325,6 +322,28 @@ public:
}
}
+ void IsSummonedBy(Unit* /*summoner*/)
+ {
+ std::list<Player*> playerOnQuestList;
+ Trinity::AnyPlayerInObjectRangeCheck checker(me, 5.0f);
+ Trinity::PlayerListSearcher<Trinity::AnyPlayerInObjectRangeCheck> searcher(me, playerOnQuestList, checker);
+ me->VisitNearbyWorldObject(5.0f, searcher);
+ for (std::list<Player*>::const_iterator itr = playerOnQuestList.begin(); itr != playerOnQuestList.end(); ++itr)
+ {
+ // Check if found player target has active quest
+ if (Player* player = (*itr))
+ {
+ if (player->GetQuestStatus(10965) == QUEST_STATUS_INCOMPLETE)
+ {
+ StartEvent(player);
+ break;
+ }
+ }
+ else
+ break;
+ }
+ }
+
void JustDied(Unit* /*killer*/)
{
if (!PlayerGUID)
@@ -350,15 +369,6 @@ public:
npc_escortAI::EnterEvadeMode();
}
- void EnterCombat(Unit* who)
- {
- switch (urand(0, 1))
- {
- case 0: DoScriptText(CLINTAR_SPIRIT_SAY_UNDER_ATTACK_1, me, who); break;
- case 1: DoScriptText(CLINTAR_SPIRIT_SAY_UNDER_ATTACK_2, me, who); break;
- }
- }
-
void StartEvent(Player* player)
{
if (player && player->GetQuestStatus(10965) == QUEST_STATUS_INCOMPLETE)
@@ -373,7 +383,7 @@ public:
return;
}
- void UpdateAI(const uint32 diff)
+ void UpdateAI(uint32 const diff)
{
npc_escortAI::UpdateAI(diff);
@@ -410,7 +420,7 @@ public:
switch (Step)
{
case 0:
- me->Say(CLINTAR_SPIRIT_SAY_START, 0, PlayerGUID);
+ Talk(CLINTAR_SPIRIT_SAY_START, PlayerGUID);
EventTimer = 8000;
Step = 1;
break;
@@ -429,7 +439,7 @@ public:
break;
case 1:
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);
- DoScriptText(CLINTAR_SPIRIT_SAY_GET_ONE, me, player);
+ // Needs text
EventOnWait = false;
break;
}
@@ -452,7 +462,7 @@ public:
switch (Step)
{
case 0:
- DoScriptText(CLINTAR_SPIRIT_SAY_GET_TWO, me, player);
+ // Needs text
EventTimer = 15000;
Step = 1;
break;
@@ -496,7 +506,7 @@ public:
switch (Step)
{
case 0:
- DoScriptText(CLINTAR_SPIRIT_SAY_GET_THREE, me, player);
+ // Needs text
EventTimer = 4000;
Step = 1;
break;
@@ -510,7 +520,7 @@ public:
{
case 0:
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 2);
- DoScriptText(CLINTAR_SPIRIT_SAY_GET_FINAL, me, player);
+ // Needs text
player->CompleteQuest(10965);
EventTimer = 1500;
Step = 1;
@@ -548,30 +558,6 @@ public:
};
/*####
-# npc_clintar_dreamwalker
-####*/
-
-enum Clintar
-{
- CLINTAR_SPIRIT = 22916
-};
-
-class npc_clintar_dreamwalker : public CreatureScript
-{
-public:
- npc_clintar_dreamwalker() : CreatureScript("npc_clintar_dreamwalker") { }
-
- bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest)
- {
- if (quest->GetQuestId() == 10965)
- if (Creature* clintar_spirit = creature->SummonCreature(CLINTAR_SPIRIT, ClintarSpiritSummon, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 100000))
- CAST_AI(npc_clintar_spirit::npc_clintar_spiritAI, clintar_spirit->AI())->StartEvent(player);
- return true;
- }
-
-};
-
-/*####
# npc_omen
####*/
@@ -722,7 +708,6 @@ void AddSC_moonglade()
new npc_bunthen_plainswind();
new npc_great_bear_spirit();
new npc_silva_filnaveth();
- new npc_clintar_dreamwalker();
new npc_clintar_spirit();
new npc_omen();
new npc_giant_spotlight();
diff --git a/src/server/scripts/Kalimdor/mulgore.cpp b/src/server/scripts/Kalimdor/mulgore.cpp
index 8ed26b8cf38..a86f891c6c0 100644
--- a/src/server/scripts/Kalimdor/mulgore.cpp
+++ b/src/server/scripts/Kalimdor/mulgore.cpp
@@ -76,10 +76,9 @@ public:
enum KyleFrenzied
{
- //emote signed for 7780 but propably thats wrong id.
- EMOTE_SEE_LUNCH = -1000340,
- EMOTE_EAT_LUNCH = -1000341,
- EMOTE_DANCE = -1000342,
+ EMOTE_SEE_LUNCH = 0,
+ EMOTE_EAT_LUNCH = 1,
+ EMOTE_DANCE = 2,
SPELL_LUNCH = 42222,
NPC_KYLE_FRENZIED = 23616,
@@ -134,7 +133,7 @@ public:
}
EventActive = true;
- DoScriptText(EMOTE_SEE_LUNCH, me);
+ Talk(EMOTE_SEE_LUNCH);
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_CREATURE_SPECIAL);
}
}
@@ -173,7 +172,7 @@ public:
}
break;
case 2:
- DoScriptText(EMOTE_EAT_LUNCH, me);
+ Talk(EMOTE_EAT_LUNCH);
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USE_STANDING);
break;
case 3:
@@ -184,7 +183,7 @@ public:
break;
case 4:
EventTimer = 30000;
- DoScriptText(EMOTE_DANCE, me);
+ Talk(EMOTE_DANCE);
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_DANCESPECIAL);
break;
case 5:
diff --git a/src/server/scripts/Kalimdor/silithus.cpp b/src/server/scripts/Kalimdor/silithus.cpp
index df7d3b1ee89..f9b16b907eb 100644
--- a/src/server/scripts/Kalimdor/silithus.cpp
+++ b/src/server/scripts/Kalimdor/silithus.cpp
@@ -230,56 +230,56 @@ public:
####*/
enum EternalBoard
{
- QUEST_A_PAWN_ON_THE_ETERNAL_BOARD = 8519,
-
- FACTION_HOSTILE = 14,
- FACTION_FRIENDLY = 35,
-
- C_ANACHRONOS = 15381,
- C_FANDRAL_STAGHELM = 15382,
- C_ARYGOS = 15380,
- C_MERITHRA = 15378,
- C_CAELESTRASZ = 15379,
-
- ANACHRONOS_SAY_1 = -1350000,
- ANACHRONOS_SAY_2 = -1350001,
- ANACHRONOS_SAY_3 = -1350002,
- ANACHRONOS_SAY_4 = -1350003,
- ANACHRONOS_SAY_5 = -1350004,
- ANACHRONOS_SAY_6 = -1350005,
- ANACHRONOS_SAY_7 = -1350006,
- ANACHRONOS_SAY_8 = -1350007,
- ANACHRONOS_SAY_9 = -1350008,
- ANACHRONOS_SAY_10 = -1350009,
- ANACHRONOS_EMOTE_1 = -1350010,
- ANACHRONOS_EMOTE_2 = -1350011,
- ANACHRONOS_EMOTE_3 = -1350012,
-
- FANDRAL_SAY_1 = -1350013,
- FANDRAL_SAY_2 = -1350014,
- FANDRAL_SAY_3 = -1350015,
- FANDRAL_SAY_4 = -1350016,
- FANDRAL_SAY_5 = -1350017,
- FANDRAL_SAY_6 = -1350018,
- FANDRAL_EMOTE_1 = -1350019,
- FANDRAL_EMOTE_2 = -1350020,
-
- CAELESTRASZ_SAY_1 = -1350021,
- CAELESTRASZ_SAY_2 = -1350022,
- CAELESTRASZ_YELL_1 = -1350023,
-
- ARYGOS_SAY_1 = -1350024,
- ARYGOS_YELL_1 = -1350025,
- ARYGOS_EMOTE_1 = -1350026,
-
- MERITHRA_SAY_1 = -1350027,
- MERITHRA_SAY_2 = -1350028,
- MERITHRA_YELL_1 = -1350029,
- MERITHRA_EMOTE_1 = -1350030,
-
- GO_GATE_OF_AHN_QIRAJ = 176146,
- GO_GLYPH_OF_AHN_QIRAJ = 176148,
- GO_ROOTS_OF_AHN_QIRAJ = 176147
+ QUEST_A_PAWN_ON_THE_ETERNAL_BOARD = 8519,
+
+ FACTION_HOSTILE = 14,
+ FACTION_FRIENDLY = 35,
+
+ C_ANACHRONOS = 15381,
+ C_FANDRAL_STAGHELM = 15382,
+ C_ARYGOS = 15380,
+ C_MERITHRA = 15378,
+ C_CAELESTRASZ = 15379,
+
+ ANACHRONOS_SAY_1 = 0,
+ ANACHRONOS_SAY_2 = 1,
+ ANACHRONOS_SAY_3 = 2,
+ ANACHRONOS_SAY_4 = 3,
+ ANACHRONOS_SAY_5 = 4,
+ ANACHRONOS_SAY_6 = 5,
+ ANACHRONOS_SAY_7 = 6,
+ ANACHRONOS_SAY_8 = 7,
+ ANACHRONOS_SAY_9 = 8,
+ ANACHRONOS_SAY_10 = 9,
+ ANACHRONOS_EMOTE_1 = 10,
+ ANACHRONOS_EMOTE_2 = 11,
+ ANACHRONOS_EMOTE_3 = 12,
+
+ FANDRAL_SAY_1 = 0,
+ FANDRAL_SAY_2 = 1,
+ FANDRAL_SAY_3 = 2,
+ FANDRAL_SAY_4 = 3,
+ FANDRAL_SAY_5 = 4,
+ FANDRAL_SAY_6 = 5,
+ FANDRAL_EMOTE_1 = 6,
+ FANDRAL_EMOTE_2 = 7,
+
+ CAELESTRASZ_SAY_1 = 0,
+ CAELESTRASZ_SAY_2 = 1,
+ CAELESTRASZ_YELL_1 = 2,
+
+ ARYGOS_SAY_1 = 0,
+ ARYGOS_YELL_1 = 1,
+ ARYGOS_EMOTE_1 = 2,
+
+ MERITHRA_SAY_1 = 0,
+ MERITHRA_SAY_2 = 1,
+ MERITHRA_YELL_1 = 2,
+ MERITHRA_EMOTE_1 = 3,
+
+ GO_GATE_OF_AHN_QIRAJ = 176146,
+ GO_GLYPH_OF_AHN_QIRAJ = 176148,
+ GO_ROOTS_OF_AHN_QIRAJ = 176147
};
/*#####
# Quest: A Pawn on the Eternal Board
@@ -530,10 +530,10 @@ public:
if (!player)
return;
- Unit* Fandral = player->FindNearestCreature(C_FANDRAL_STAGHELM, 100.0f, me);
- Unit* Arygos = player->FindNearestCreature(C_ARYGOS, 100.0f, me);
- Unit* Caelestrasz = player->FindNearestCreature(C_CAELESTRASZ, 100.0f, me);
- Unit* Merithra = player->FindNearestCreature(C_MERITHRA, 100.0f, me);
+ Creature* Fandral = player->FindNearestCreature(C_FANDRAL_STAGHELM, 100.0f, me);
+ Creature* Arygos = player->FindNearestCreature(C_ARYGOS, 100.0f, me);
+ Creature* Caelestrasz = player->FindNearestCreature(C_CAELESTRASZ, 100.0f, me);
+ Creature* Merithra = player->FindNearestCreature(C_MERITHRA, 100.0f, me);
if (!Fandral || !Arygos || !Caelestrasz || !Merithra)
return;
@@ -544,35 +544,35 @@ public:
switch (AnimationCount)
{
case 0:
- DoScriptText(ANACHRONOS_SAY_1, me, Fandral);
+ Talk(ANACHRONOS_SAY_1,Fandral->GetGUID());
break;
case 1:
Fandral->SetTarget(me->GetGUID());
- DoScriptText(FANDRAL_SAY_1, Fandral, me);
+ Fandral->AI()->Talk(FANDRAL_SAY_1, me->GetGUID());
break;
case 2:
Fandral->SetTarget(0);
- DoScriptText(MERITHRA_EMOTE_1, Merithra);
+ Merithra->AI()->Talk(MERITHRA_EMOTE_1);
break;
case 3:
- DoScriptText(MERITHRA_SAY_1, Merithra);
+ Merithra->AI()->Talk(MERITHRA_SAY_1);
break;
case 4:
- DoScriptText(ARYGOS_EMOTE_1, Arygos);
+ Arygos->AI()->Talk(ARYGOS_EMOTE_1);
break;
case 5:
Caelestrasz->SetTarget(Fandral->GetGUID());
- DoScriptText(CAELESTRASZ_SAY_1, Caelestrasz);
+ Caelestrasz->AI()->Talk(CAELESTRASZ_SAY_1);
break;
case 6:
- DoScriptText(MERITHRA_SAY_2, Merithra);
+ Merithra->AI()->Talk(MERITHRA_SAY_2);
break;
case 7:
Caelestrasz->SetTarget(0);
Merithra->GetMotionMaster()->MoveCharge(-8065, 1530, 2.61f, 10);
break;
case 8:
- DoScriptText(MERITHRA_YELL_1, Merithra);
+ Merithra->AI()->Talk(MERITHRA_YELL_1);
break;
case 9:
Merithra->CastSpell(Merithra, 25105, true);
@@ -591,7 +591,7 @@ public:
case 13:
break;
case 14:
- DoScriptText(ARYGOS_SAY_1, Arygos);
+ Arygos->AI()->Talk(ARYGOS_SAY_1);
Merithra->SetVisible(false);
break;
case 15:
@@ -599,7 +599,7 @@ public:
Merithra->GetMotionMaster()->MoveCharge(-8034.535f, 1535.14f, 2.61f, 42);
break;
case 16:
- DoScriptText(ARYGOS_YELL_1, Arygos);
+ Arygos->AI()->Talk(ARYGOS_YELL_1);
break;
case 17:
Arygos->CastSpell(Arygos, 25107, true);
@@ -618,7 +618,7 @@ public:
case 21:
break;
case 22:
- DoScriptText(CAELESTRASZ_SAY_2, Caelestrasz, Fandral);
+ Caelestrasz->AI()->Talk(CAELESTRASZ_SAY_2, Fandral->GetGUID());
break;
case 23:
Caelestrasz->GetMotionMaster()->MoveCharge(-8065, 1530, 2.61f, 10);
@@ -626,7 +626,7 @@ public:
Arygos->GetMotionMaster()->MoveCharge(-8034.535f, 1535.14f, 2.61f, 10);
break;
case 24:
- DoScriptText(CAELESTRASZ_YELL_1, Caelestrasz);
+ Caelestrasz->AI()->Talk(CAELESTRASZ_YELL_1);
break;
case 25:
Caelestrasz->CastSpell(Caelestrasz, 25106, true);
@@ -640,16 +640,16 @@ public:
Caelestrasz->CastSpell(Caelestrasz, 54293, false);
break;
case 28:
- DoScriptText(ANACHRONOS_SAY_2, me, Fandral);
+ Talk(ANACHRONOS_SAY_2, Fandral->GetGUID());
break;
case 29:
Caelestrasz->GetMotionMaster()->MoveCharge(-8095, 1530, 50, 42);
- DoScriptText(FANDRAL_SAY_2, Fandral, me);
+ Fandral->AI()->Talk(FANDRAL_SAY_2);
break;
case 30:
break;
case 31:
- DoScriptText(ANACHRONOS_SAY_3, me, Fandral);
+ Talk(ANACHRONOS_SAY_3, Fandral->GetGUID());
break;
case 32:
Caelestrasz->SetVisible(false);
@@ -658,7 +658,7 @@ public:
me->GetMotionMaster()->MoveCharge(-8113, 1525, 2.77f, 8);
break;//both run to the gate
case 33:
- DoScriptText(ANACHRONOS_SAY_4, me);
+ Talk(ANACHRONOS_SAY_4);
Caelestrasz->GetMotionMaster()->MoveCharge(-8050, 1473, 65, 15);
break; //Text: sands will stop
case 34:
@@ -678,43 +678,43 @@ public:
me->SummonGameObject(GO_GLYPH_OF_AHN_QIRAJ, -8130, 1525, 17.5f, 0, 0, 0, 0, 0, 0);
break;
case 39:
- DoScriptText(ANACHRONOS_SAY_5, me, Fandral);
+ Talk(ANACHRONOS_SAY_5, Fandral->GetGUID());
break;
case 40:
Fandral->CastSpell(me, 25167, true);
break;
case 41:
Fandral->SummonGameObject(GO_ROOTS_OF_AHN_QIRAJ, -8130, 1525, 17.5f, 0, 0, 0, 0, 0, 0);
- DoScriptText(FANDRAL_SAY_3, Fandral);
+ Fandral->AI()->Talk(FANDRAL_SAY_3);
break;
case 42:
me->CastStop();
- DoScriptText(FANDRAL_EMOTE_1, Fandral);
+ Fandral->AI()->Talk(FANDRAL_EMOTE_1);
break;
case 43:
Fandral->CastStop();
break;
case 44:
- DoScriptText(ANACHRONOS_SAY_6, me);
+ Talk(ANACHRONOS_SAY_6);
break;
case 45:
- DoScriptText(ANACHRONOS_SAY_7, me);
+ Talk(ANACHRONOS_SAY_7);
break;
case 46:
- DoScriptText(ANACHRONOS_SAY_8, me);
+ Talk(ANACHRONOS_SAY_8);
me->GetMotionMaster()->MoveCharge(-8110, 1527, 2.77f, 4);
break;
case 47:
- DoScriptText(ANACHRONOS_EMOTE_1, me);
+ Talk(ANACHRONOS_EMOTE_1);
break;
case 48:
- DoScriptText(FANDRAL_SAY_4, Fandral, me);
+ Fandral->AI()->Talk(FANDRAL_SAY_4, me->GetGUID());
break;
case 49:
- DoScriptText(FANDRAL_SAY_5, Fandral, me);
+ Fandral->AI()->Talk(FANDRAL_SAY_5, me->GetGUID());
break;
case 50:
- DoScriptText(FANDRAL_EMOTE_2, Fandral);
+ Fandral->AI()->Talk(FANDRAL_EMOTE_2);
Fandral->CastSpell(-8127, 1525, 17.5f, 33806, true);
break;
case 51:
@@ -734,19 +734,19 @@ public:
}
case 52:
Fandral->GetMotionMaster()->MoveCharge(-8028.75f, 1538.795f, 2.61f, 4);
- DoScriptText(ANACHRONOS_SAY_9, me, Fandral);
+ Fandral->AI()->Talk(ANACHRONOS_SAY_9, me->GetGUID());
break;
case 53:
- DoScriptText(FANDRAL_SAY_6, Fandral);
+ Fandral->AI()->Talk(FANDRAL_SAY_6);
break;
case 54:
- DoScriptText(ANACHRONOS_EMOTE_2, me);
+ Talk(ANACHRONOS_EMOTE_2);
break;
case 55:
Fandral->SetVisible(false);
break;
case 56:
- DoScriptText(ANACHRONOS_EMOTE_3, me);
+ Talk(ANACHRONOS_EMOTE_3);
me->GetMotionMaster()->MoveCharge(-8116, 1522, 3.65f, 4);
break;
case 57:
@@ -760,7 +760,7 @@ public:
break;
case 60:
if (player)
- DoScriptText(ANACHRONOS_SAY_10, me, player);
+ Talk(ANACHRONOS_SAY_10, player->GetGUID());
me->GetMotionMaster()->MoveCharge(-8113.46f, 1524.16f, 2.89f, 4);
break;
case 61:
@@ -782,7 +782,7 @@ public:
me->SetVisible(false);
if (Creature* AnachronosQuestTrigger = (Unit::GetCreature(*me, AnachronosQuestTriggerGUID)))
{
- DoScriptText(ARYGOS_YELL_1, me);
+ Talk(ARYGOS_YELL_1);
AnachronosQuestTrigger->AI()->EnterEvadeMode();
eventEnd=true;
}
@@ -1054,7 +1054,7 @@ public:
{
if (!Announced && AnnounceTimer <= diff)
{
- DoScriptText(WavesInfo[WaveCount].WaveTextId, me);
+ Talk(WavesInfo[WaveCount].WaveTextId);
Announced = true;
} else AnnounceTimer -= diff;
diff --git a/src/server/scripts/Kalimdor/stonetalon_mountains.cpp b/src/server/scripts/Kalimdor/stonetalon_mountains.cpp
index 5cf6d141805..033274f8561 100644
--- a/src/server/scripts/Kalimdor/stonetalon_mountains.cpp
+++ b/src/server/scripts/Kalimdor/stonetalon_mountains.cpp
@@ -101,9 +101,9 @@ enum Kaya
NPC_GRIMTOTEM_BRUTE = 11912,
NPC_GRIMTOTEM_SORCERER = 11913,
- SAY_START = -1000357,
- SAY_AMBUSH = -1000358,
- SAY_END = -1000359,
+ SAY_START = 0,
+ SAY_AMBUSH = 1,
+ SAY_END = 2,
QUEST_PROTECT_KAYA = 6523
};
@@ -126,14 +126,14 @@ public:
switch (waypointId)
{
case 16:
- DoScriptText(SAY_AMBUSH, me);
+ Talk(SAY_AMBUSH);
me->SummonCreature(NPC_GRIMTOTEM_BRUTE, -48.53f, -503.34f, -46.31f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
me->SummonCreature(NPC_GRIMTOTEM_RUFFIAN, -38.85f, -503.77f, -45.90f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
me->SummonCreature(NPC_GRIMTOTEM_SORCERER, -36.37f, -496.23f, -45.71f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
break;
case 18:
me->SetInFront(player);
- DoScriptText(SAY_END, me, player);
+ Talk(SAY_END);
player->GroupEventHappens(QUEST_PROTECT_KAYA, me);
break;
}
@@ -154,7 +154,7 @@ public:
if (npc_escortAI* pEscortAI = CAST_AI(npc_kaya_flathoof::npc_kaya_flathoofAI, creature->AI()))
pEscortAI->Start(true, false, player->GetGUID());
- DoScriptText(SAY_START, creature);
+ creature->AI()->Talk(SAY_START);
creature->setFaction(113);
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
}
diff --git a/src/server/scripts/Kalimdor/tanaris.cpp b/src/server/scripts/Kalimdor/tanaris.cpp
index 7341ccb1e2c..b7644395571 100644
--- a/src/server/scripts/Kalimdor/tanaris.cpp
+++ b/src/server/scripts/Kalimdor/tanaris.cpp
@@ -47,7 +47,7 @@ EndContentData */
enum Aquementas
{
- AGGRO_YELL_AQUE = -1000350,
+ AGGRO_YELL_AQUE = 0,
SPELL_AQUA_JET = 13586,
SPELL_FROST_SHOCK = 15089
@@ -101,7 +101,7 @@ public:
void EnterCombat(Unit* who)
{
- DoScriptText(AGGRO_YELL_AQUE, me, who);
+ Talk(AGGRO_YELL_AQUE, who->GetGUID());
}
void UpdateAI(const uint32 diff)
@@ -427,13 +427,11 @@ public:
enum Npc00X17
{
- //texts are signed for 7806
- SAY_OOX_START = -1000287,
- SAY_OOX_AGGRO1 = -1000288,
- SAY_OOX_AGGRO2 = -1000289,
- SAY_OOX_AMBUSH = -1000290,
- SAY_OOX17_AMBUSH_REPLY = -1000291,
- SAY_OOX_END = -1000292,
+ SAY_OOX_START = 0,
+ SAY_OOX_AGGRO = 1,
+ SAY_OOX_AMBUSH = 2,
+ SAY_OOX17_AMBUSH_REPLY = 0,
+ SAY_OOX_END = 3,
Q_OOX17 = 648,
SPAWN_FIRST = 7803,
@@ -454,7 +452,7 @@ public:
creature->SetFullHealth();
creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
- DoScriptText(SAY_OOX_START, creature);
+ creature->AI()->Talk(SAY_OOX_START);
if (npc_escortAI* pEscortAI = CAST_AI(npc_OOX17::npc_OOX17AI, creature->AI()))
pEscortAI->Start(true, false, player->GetGUID());
@@ -481,18 +479,18 @@ public:
me->SummonCreature(SPAWN_FIRST, -8350.96f, -4445.79f, 10.10f, 6.20f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
me->SummonCreature(SPAWN_FIRST, -8355.96f, -4447.79f, 10.10f, 6.27f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
me->SummonCreature(SPAWN_FIRST, -8353.96f, -4442.79f, 10.10f, 6.08f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
- DoScriptText(SAY_OOX_AMBUSH, me);
+ Talk(SAY_OOX_AMBUSH);
break;
case 56:
me->SummonCreature(SPAWN_SECOND_1, -7510.07f, -4795.50f, 9.35f, 6.06f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
me->SummonCreature(SPAWN_SECOND_2, -7515.07f, -4797.50f, 9.35f, 6.22f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
me->SummonCreature(SPAWN_SECOND_2, -7518.07f, -4792.50f, 9.35f, 6.22f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
- DoScriptText(SAY_OOX_AMBUSH, me);
- if (Unit* scoff = me->FindNearestCreature(SPAWN_SECOND_2, 30))
- DoScriptText(SAY_OOX17_AMBUSH_REPLY, scoff);
+ Talk(SAY_OOX_AMBUSH);
+ if (Creature* scoff = me->FindNearestCreature(SPAWN_SECOND_2, 30))
+ scoff->AI()->Talk(SAY_OOX17_AMBUSH_REPLY);
break;
case 86:
- DoScriptText(SAY_OOX_END, me);
+ Talk(SAY_OOX_END);
player->GroupEventHappens(Q_OOX17, me);
break;
}
@@ -503,7 +501,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_OOX_AGGRO1, SAY_OOX_AGGRO2), me);
+ Talk(SAY_OOX_AGGRO);
}
void JustSummoned(Creature* summoned)
@@ -519,14 +517,13 @@ public:
enum Tooga
{
- SAY_TOOG_THIRST = -1000391,
- SAY_TOOG_WORRIED = -1000392,
- SAY_TOOG_POST_1 = -1000393,
- SAY_TORT_POST_2 = -1000394,
- SAY_TOOG_POST_3 = -1000395,
- SAY_TORT_POST_4 = -1000396,
- SAY_TOOG_POST_5 = -1000397,
- SAY_TORT_POST_6 = -1000398,
+ SAY_TOOG_WORRIED = 0,
+ SAY_TOOG_POST_1 = 1,
+ SAY_TORT_POST_2 = 0,
+ SAY_TOOG_POST_3 = 2,
+ SAY_TORT_POST_4 = 1,
+ SAY_TOOG_POST_5 = 3,
+ SAY_TORT_POST_6 = 2,
QUEST_TOOGA = 1560,
NPC_TORTA = 6015,
@@ -617,8 +614,8 @@ public:
{
PostEventTimer = 5000;
- Unit* pTorta = Unit::GetUnit(*me, TortaGUID);
- if (!pTorta || !pTorta->isAlive())
+ Creature* torta = Creature::GetCreature(*me, TortaGUID);
+ if (!torta || !torta->isAlive())
{
//something happened, so just complete
SetFollowComplete();
@@ -628,22 +625,22 @@ public:
switch (PhasePostEvent)
{
case 1:
- DoScriptText(SAY_TOOG_POST_1, me);
+ Talk(SAY_TOOG_POST_1);
break;
case 2:
- DoScriptText(SAY_TORT_POST_2, pTorta);
+ torta->AI()->Talk(SAY_TORT_POST_2);
break;
case 3:
- DoScriptText(SAY_TOOG_POST_3, me);
+ Talk(SAY_TOOG_POST_3);
break;
case 4:
- DoScriptText(SAY_TORT_POST_4, pTorta);
+ torta->AI()->Talk(SAY_TORT_POST_4);
break;
case 5:
- DoScriptText(SAY_TOOG_POST_5, me);
+ Talk(SAY_TOOG_POST_5);
break;
case 6:
- DoScriptText(SAY_TORT_POST_6, pTorta);
+ torta->AI()->Talk(SAY_TORT_POST_6);
me->GetMotionMaster()->MovePoint(POINT_ID_TO_WATER, ToWaterLoc);
break;
}
@@ -661,7 +658,7 @@ public:
CheckSpeechTimer = 5000;
if (urand(0, 9) > 8)
- DoScriptText(RAND(SAY_TOOG_THIRST, SAY_TOOG_WORRIED), me);
+ Talk(SAY_TOOG_WORRIED);
}
else
CheckSpeechTimer -= Diff;
diff --git a/src/server/scripts/Kalimdor/teldrassil.cpp b/src/server/scripts/Kalimdor/teldrassil.cpp
index 6c1993d6447..dfd42d132d8 100644
--- a/src/server/scripts/Kalimdor/teldrassil.cpp
+++ b/src/server/scripts/Kalimdor/teldrassil.cpp
@@ -38,8 +38,8 @@ EndContentData */
enum Mist
{
- SAY_AT_HOME = -1000323,
- EMOTE_AT_HOME = -1000324,
+ SAY_AT_HOME = 0,
+ EMOTE_AT_HOME = 1,
QUEST_MIST = 938,
NPC_ARYNIA = 3519,
FACTION_DARNASSUS = 79
@@ -78,7 +78,7 @@ public:
{
if (me->IsWithinDistInMap(who, 10.0f))
{
- DoScriptText(SAY_AT_HOME, who);
+ Talk(SAY_AT_HOME, who->GetGUID());
DoComplete();
}
}
@@ -86,7 +86,7 @@ public:
void DoComplete()
{
- DoScriptText(EMOTE_AT_HOME, me);
+ Talk(EMOTE_AT_HOME);
Player* player = GetLeaderForFollower();
if (player && player->GetQuestStatus(QUEST_MIST) == QUEST_STATUS_INCOMPLETE)
diff --git a/src/server/scripts/Kalimdor/the_barrens.cpp b/src/server/scripts/Kalimdor/the_barrens.cpp
index 8a24f696a23..9417e7993f7 100644
--- a/src/server/scripts/Kalimdor/the_barrens.cpp
+++ b/src/server/scripts/Kalimdor/the_barrens.cpp
@@ -83,17 +83,14 @@ public:
enum Gilthares
{
- SAY_GIL_START = -1000370,
- SAY_GIL_AT_LAST = -1000371,
- SAY_GIL_PROCEED = -1000372,
- SAY_GIL_FREEBOOTERS = -1000373,
- SAY_GIL_AGGRO_1 = -1000374,
- SAY_GIL_AGGRO_2 = -1000375,
- SAY_GIL_AGGRO_3 = -1000376,
- SAY_GIL_AGGRO_4 = -1000377,
- SAY_GIL_ALMOST = -1000378,
- SAY_GIL_SWEET = -1000379,
- SAY_GIL_FREED = -1000380,
+ SAY_GIL_START = 0,
+ SAY_GIL_AT_LAST = 1,
+ SAY_GIL_PROCEED = 2,
+ SAY_GIL_FREEBOOTERS = 3,
+ SAY_GIL_AGGRO = 4,
+ SAY_GIL_ALMOST = 5,
+ SAY_GIL_SWEET = 6,
+ SAY_GIL_FREED = 7,
QUEST_FREE_FROM_HOLD = 898,
AREA_MERCHANT_COAST = 391,
@@ -112,7 +109,7 @@ public:
creature->setFaction(FACTION_ESCORTEE);
creature->SetStandState(UNIT_STAND_STATE_STAND);
- DoScriptText(SAY_GIL_START, creature, player);
+ creature->AI()->Talk(SAY_GIL_START, player->GetGUID());
if (npc_giltharesAI* pEscortAI = CAST_AI(npc_gilthares::npc_giltharesAI, creature->AI()))
pEscortAI->Start(false, false, player->GetGUID(), quest);
@@ -140,22 +137,22 @@ public:
switch (waypointId)
{
case 16:
- DoScriptText(SAY_GIL_AT_LAST, me, player);
+ Talk(SAY_GIL_AT_LAST, player->GetGUID());
break;
case 17:
- DoScriptText(SAY_GIL_PROCEED, me, player);
+ Talk(SAY_GIL_PROCEED, player->GetGUID());
break;
case 18:
- DoScriptText(SAY_GIL_FREEBOOTERS, me, player);
+ Talk(SAY_GIL_FREEBOOTERS, player->GetGUID());
break;
case 37:
- DoScriptText(SAY_GIL_ALMOST, me, player);
+ Talk(SAY_GIL_ALMOST,player->GetGUID());
break;
case 47:
- DoScriptText(SAY_GIL_SWEET, me, player);
+ Talk(SAY_GIL_SWEET, player->GetGUID());
break;
case 53:
- DoScriptText(SAY_GIL_FREED, me, player);
+ Talk(SAY_GIL_FREED, player->GetGUID());
player->GroupEventHappens(QUEST_FREE_FROM_HOLD, me);
break;
}
@@ -171,7 +168,7 @@ public:
if (who->GetTypeId() != TYPEID_PLAYER && me->GetAreaId() == AREA_MERCHANT_COAST)
{
//appears to be pretty much random (possible only if escorter not in combat with who yet?)
- DoScriptText(RAND(SAY_GIL_AGGRO_1, SAY_GIL_AGGRO_2, SAY_GIL_AGGRO_3, SAY_GIL_AGGRO_4), me, who);
+ Talk(SAY_GIL_AGGRO, who->GetGUID());
}
}
};
@@ -324,11 +321,11 @@ enum TwiggyFlathead
NPC_BIG_WILL = 6238,
NPC_AFFRAY_CHALLENGER = 6240,
- SAY_BIG_WILL_READY = -1000123,
- SAY_TWIGGY_FLATHEAD_BEGIN = -1000124,
- SAY_TWIGGY_FLATHEAD_FRAY = -1000125,
- SAY_TWIGGY_FLATHEAD_DOWN = -1000126,
- SAY_TWIGGY_FLATHEAD_OVER = -1000127,
+ SAY_BIG_WILL_READY = 0,
+ SAY_TWIGGY_FLATHEAD_BEGIN = 0,
+ SAY_TWIGGY_FLATHEAD_FRAY = 1,
+ SAY_TWIGGY_FLATHEAD_DOWN = 2,
+ SAY_TWIGGY_FLATHEAD_OVER = 3
};
Position const AffrayChallengerLoc[6] =
@@ -412,7 +409,7 @@ public:
return;
if (!pWarrior->isAlive() && pWarrior->GetQuestStatus(1719) == QUEST_STATUS_INCOMPLETE) {
- DoScriptText(SAY_TWIGGY_FLATHEAD_DOWN, me);
+ Talk(SAY_TWIGGY_FLATHEAD_DOWN);
pWarrior->FailQuest(1719);
for (uint8 i = 0; i < 6; ++i) // unsummon challengers
@@ -441,7 +438,7 @@ public:
if (x >= -1684 && x <= -1674 && y >= -4334 && y <= -4324) {
pWarrior->AreaExploredOrEventHappens(1719);
- DoScriptText(SAY_TWIGGY_FLATHEAD_BEGIN, me, pWarrior);
+ Talk(SAY_TWIGGY_FLATHEAD_BEGIN, pWarrior->GetGUID());
for (uint8 i = 0; i < 6; ++i)
{
@@ -470,7 +467,7 @@ public:
Creature* creature = Unit::GetCreature((*me), AffrayChallenger[i]);
if ((!creature || (!creature->isAlive())) && !ChallengerDown[i])
{
- DoScriptText(SAY_TWIGGY_FLATHEAD_DOWN, me);
+ Talk(SAY_TWIGGY_FLATHEAD_DOWN);
ChallengerDown[i] = true;
}
}
@@ -482,7 +479,7 @@ public:
{
if (Wave < 6 && AffrayChallenger[Wave] && !EventBigWill)
{
- DoScriptText(SAY_TWIGGY_FLATHEAD_FRAY, me);
+ Talk(SAY_TWIGGY_FLATHEAD_FRAY);
Creature* creature = Unit::GetCreature((*me), AffrayChallenger[Wave]);
if (creature && (creature->isAlive()))
{
@@ -512,7 +509,7 @@ public:
Creature* creature = Unit::GetCreature((*me), BigWill);
if (!creature || !creature->isAlive())
{
- DoScriptText(SAY_TWIGGY_FLATHEAD_OVER, me);
+ Talk(SAY_TWIGGY_FLATHEAD_OVER);
Reset();
}
}
@@ -530,14 +527,14 @@ public:
enum Wizzlecrank
{
- SAY_START = -1000298,
- SAY_STARTUP1 = -1000299,
- SAY_STARTUP2 = -1000300,
- SAY_MERCENARY = -1000301,
- SAY_PROGRESS_1 = -1000302,
- SAY_PROGRESS_2 = -1000303,
- SAY_PROGRESS_3 = -1000304,
- SAY_END = -1000305,
+ SAY_MERCENARY = 0,
+ SAY_START = 0,
+ SAY_STARTUP1 = 1,
+ SAY_STARTUP2 = 2,
+ SAY_PROGRESS_1 = 3,
+ SAY_PROGRESS_2 = 4,
+ SAY_PROGRESS_3 = 5,
+ SAY_END = 6,
QUEST_ESCAPE = 863,
FACTION_RATCHET = 637,
@@ -581,7 +578,7 @@ public:
switch (waypointId)
{
case 0:
- DoScriptText(SAY_STARTUP1, me);
+ Talk(SAY_STARTUP1);
break;
case 9:
SetRun(false);
@@ -589,7 +586,7 @@ public:
case 17:
if (Creature* temp = me->SummonCreature(NPC_MERCENARY, 1128.489f, -3037.611f, 92.701f, 1.472f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000))
{
- DoScriptText(SAY_MERCENARY, temp);
+ temp->AI()->Talk(SAY_MERCENARY);
me->SummonCreature(NPC_MERCENARY, 1160.172f, -2980.168f, 97.313f, 3.690f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
}
break;
@@ -609,10 +606,10 @@ public:
switch (PointId)
{
case 9:
- DoScriptText(SAY_STARTUP2, me, player);
+ Talk(SAY_STARTUP2, player->GetGUID());
break;
case 18:
- DoScriptText(SAY_PROGRESS_1, me, player);
+ Talk(SAY_PROGRESS_1, player->GetGUID());
SetRun();
break;
}
@@ -638,13 +635,13 @@ public:
switch (PostEventCount)
{
case 0:
- DoScriptText(SAY_PROGRESS_2, me);
+ Talk(SAY_PROGRESS_2);
break;
case 1:
- DoScriptText(SAY_PROGRESS_3, me);
+ Talk(SAY_PROGRESS_3);
break;
case 2:
- DoScriptText(SAY_END, me);
+ Talk(SAY_END);
break;
case 3:
if (Player* player = GetPlayerForEscort())
diff --git a/src/server/scripts/Kalimdor/thousand_needles.cpp b/src/server/scripts/Kalimdor/thousand_needles.cpp
index 7667a8b312c..53751cb8278 100644
--- a/src/server/scripts/Kalimdor/thousand_needles.cpp
+++ b/src/server/scripts/Kalimdor/thousand_needles.cpp
@@ -44,7 +44,7 @@ EndContentData */
enum Kanati
{
- SAY_KAN_START = -1000410,
+ SAY_KAN_START = 0,
QUEST_PROTECT_KANATI = 4966,
NPC_GALAK_ASS = 10720
@@ -82,7 +82,7 @@ public:
switch (waypointId)
{
case 0:
- DoScriptText(SAY_KAN_START, me);
+ Talk(SAY_KAN_START);
DoSpawnGalak();
break;
case 1:
@@ -112,11 +112,11 @@ public:
enum Lakota
{
- SAY_LAKO_START = -1000365,
- SAY_LAKO_LOOK_OUT = -1000366,
- SAY_LAKO_HERE_COME = -1000367,
- SAY_LAKO_MORE = -1000368,
- SAY_LAKO_END = -1000369,
+ SAY_LAKO_START = 0,
+ SAY_LAKO_LOOK_OUT = 1,
+ SAY_LAKO_HERE_COME = 2,
+ SAY_LAKO_MORE = 3,
+ SAY_LAKO_END = 4,
QUEST_FREE_AT_LAST = 4904,
NPC_GRIM_BANDIT = 10758,
@@ -146,7 +146,7 @@ public:
{
if (quest->GetQuestId() == QUEST_FREE_AT_LAST)
{
- DoScriptText(SAY_LAKO_START, creature, player);
+ creature->AI()->Talk(SAY_LAKO_START, player->GetGUID());
creature->setFaction(FACTION_ESCORTEE_LAKO);
if (npc_lakota_windsongAI* pEscortAI = CAST_AI(npc_lakota_windsong::npc_lakota_windsongAI, creature->AI()))
@@ -171,15 +171,15 @@ public:
switch (waypointId)
{
case 8:
- DoScriptText(SAY_LAKO_LOOK_OUT, me);
+ Talk(SAY_LAKO_LOOK_OUT);
DoSpawnBandits(ID_AMBUSH_1);
break;
case 14:
- DoScriptText(SAY_LAKO_HERE_COME, me);
+ Talk(SAY_LAKO_HERE_COME);
DoSpawnBandits(ID_AMBUSH_2);
break;
case 21:
- DoScriptText(SAY_LAKO_MORE, me);
+ Talk(SAY_LAKO_MORE);
DoSpawnBandits(ID_AMBUSH_3);
break;
case 45:
@@ -204,9 +204,9 @@ public:
enum Packa
{
- SAY_START = -1000362,
- SAY_WYVERN = -1000363,
- SAY_COMPLETE = -1000364,
+ SAY_START = 0,
+ SAY_WYVERN = 1,
+ SAY_COMPLETE = 2,
QUEST_HOMEWARD = 4770,
NPC_WYVERN = 4107,
@@ -229,7 +229,7 @@ public:
{
if (quest->GetQuestId() == QUEST_HOMEWARD)
{
- DoScriptText(SAY_START, creature, player);
+ creature->AI()->Talk(SAY_START, player->GetGUID());
creature->setFaction(FACTION_ESCORTEE);
if (npc_paoka_swiftmountainAI* pEscortAI = CAST_AI(npc_paoka_swiftmountain::npc_paoka_swiftmountainAI, creature->AI()))
@@ -254,11 +254,11 @@ public:
switch (waypointId)
{
case 15:
- DoScriptText(SAY_WYVERN, me);
+ Talk(SAY_WYVERN);
DoSpawnWyvern();
break;
case 26:
- DoScriptText(SAY_COMPLETE, me);
+ Talk(SAY_COMPLETE);
break;
case 27:
if (Player* player = GetPlayerForEscort())
diff --git a/src/server/scripts/Kalimdor/ungoro_crater.cpp b/src/server/scripts/Kalimdor/ungoro_crater.cpp
index e00ea566c8f..801855e7249 100644
--- a/src/server/scripts/Kalimdor/ungoro_crater.cpp
+++ b/src/server/scripts/Kalimdor/ungoro_crater.cpp
@@ -37,12 +37,12 @@ EndContentData */
enum AmeData
{
- SAY_READY = -1000517,
- SAY_AGGRO1 = -1000518,
- SAY_SEARCH = -1000519,
- SAY_AGGRO2 = -1000520,
- SAY_AGGRO3 = -1000521,
- SAY_FINISH = -1000522,
+ SAY_READY = 0,
+ SAY_AGGRO1 = 1,
+ SAY_SEARCH = 2,
+ SAY_AGGRO2 = 3,
+ SAY_AGGRO3 = 4,
+ SAY_FINISH = 5,
SPELL_DEMORALIZINGSHOUT = 13730,
@@ -62,7 +62,7 @@ public:
if (quest->GetQuestId() == QUEST_CHASING_AME)
{
CAST_AI(npc_escortAI, (creature->AI()))->Start(false, false, player->GetGUID());
- DoScriptText(SAY_READY, creature, player);
+ creature->AI()->Talk(SAY_READY, player->GetGUID());
creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
// Change faction so mobs attack
creature->setFaction(113);
@@ -89,21 +89,21 @@ public:
{
case 19:
me->SummonCreature(ENTRY_STOMPER, -6391.69f, -1730.49f, -272.83f, 4.96f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
- DoScriptText(SAY_AGGRO1, me, player);
+ Talk(SAY_AGGRO1, player->GetGUID());
break;
case 28:
- DoScriptText(SAY_SEARCH, me, player);
+ Talk(SAY_SEARCH, player->GetGUID());
break;
case 38:
me->SummonCreature(ENTRY_TARLORD, -6370.75f, -1382.84f, -270.51f, 6.06f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
- DoScriptText(SAY_AGGRO2, me, player);
+ Talk(SAY_AGGRO2, player->GetGUID());
break;
case 49:
me->SummonCreature(ENTRY_TARLORD1, -6324.44f, -1181.05f, -270.17f, 4.34f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
- DoScriptText(SAY_AGGRO3, me, player);
+ Talk(SAY_AGGRO3, player->GetGUID());
break;
case 55:
- DoScriptText(SAY_FINISH, me, player);
+ Talk(SAY_FINISH, player->GetGUID());
player->GroupEventHappens(QUEST_CHASING_AME, me);
break;
}
@@ -147,27 +147,20 @@ public:
enum Ringo
{
- SAY_RIN_START_1 = -1000416,
- SAY_RIN_START_2 = -1000417,
-
- SAY_FAINT_1 = -1000418,
- SAY_FAINT_2 = -1000419,
- SAY_FAINT_3 = -1000420,
- SAY_FAINT_4 = -1000421,
-
- SAY_WAKE_1 = -1000422,
- SAY_WAKE_2 = -1000423,
- SAY_WAKE_3 = -1000424,
- SAY_WAKE_4 = -1000425,
-
- SAY_RIN_END_1 = -1000426,
- SAY_SPR_END_2 = -1000427,
- SAY_RIN_END_3 = -1000428,
- EMOTE_RIN_END_4 = -1000429,
- EMOTE_RIN_END_5 = -1000430,
- SAY_RIN_END_6 = -1000431, // signed for 6784
- SAY_SPR_END_7 = -1000432,
- EMOTE_RIN_END_8 = -1000433,
+ SAY_RIN_START = 0,
+
+ SAY_FAINT = 1,
+
+ SAY_WAKE = 2,
+
+ SAY_RIN_END_1 = 3,
+ SAY_SPR_END_2 = 0,
+ SAY_RIN_END_3 = 4,
+ EMOTE_RIN_END_4 = 5,
+ EMOTE_RIN_END_5 = 6,
+ SAY_RIN_END_6 = 7,
+ SAY_SPR_END_7 = 1,
+ EMOTE_RIN_END_8 = 8,
SPELL_REVIVE_RINGO = 15591,
QUEST_A_LITTLE_HELP = 4491,
@@ -184,10 +177,10 @@ public:
{
if (quest->GetQuestId() == QUEST_A_LITTLE_HELP)
{
- if (npc_ringoAI* pRingoAI = CAST_AI(npc_ringo::npc_ringoAI, creature->AI()))
+ if (npc_ringoAI* ringoAI = CAST_AI(npc_ringo::npc_ringoAI, creature->AI()))
{
creature->SetStandState(UNIT_STAND_STATE_STAND);
- pRingoAI->StartFollow(player, FACTION_ESCORTEE, quest);
+ ringoAI->StartFollow(player, FACTION_ESCORTEE, quest);
}
}
@@ -249,7 +242,7 @@ public:
{
SetFollowPaused(true);
- DoScriptText(RAND(SAY_FAINT_1, SAY_FAINT_2, SAY_FAINT_3, SAY_FAINT_4), me);
+ Talk(SAY_FAINT);
}
//what does actually happen here? Emote? Aura?
@@ -263,7 +256,7 @@ public:
if (HasFollowState(STATE_FOLLOW_POSTEVENT))
return;
- DoScriptText(RAND(SAY_WAKE_1, SAY_WAKE_2, SAY_WAKE_3, SAY_WAKE_4), me);
+ Talk(SAY_WAKE);
SetFollowPaused(false);
}
@@ -276,8 +269,8 @@ public:
{
if (EndEventTimer <= Diff)
{
- Unit* pSpraggle = Unit::GetUnit(*me, SpraggleGUID);
- if (!pSpraggle || !pSpraggle->isAlive())
+ Creature* spraggle = Creature::GetCreature(*me, SpraggleGUID);
+ if (!spraggle || !spraggle->isAlive())
{
SetFollowComplete();
return;
@@ -286,37 +279,37 @@ public:
switch (EndEventProgress)
{
case 1:
- DoScriptText(SAY_RIN_END_1, me);
+ Talk(SAY_RIN_END_1);
EndEventTimer = 3000;
break;
case 2:
- DoScriptText(SAY_SPR_END_2, pSpraggle);
+ spraggle->AI()->Talk(SAY_SPR_END_2);
EndEventTimer = 5000;
break;
case 3:
- DoScriptText(SAY_RIN_END_3, me);
+ Talk(SAY_RIN_END_3);
EndEventTimer = 1000;
break;
case 4:
- DoScriptText(EMOTE_RIN_END_4, me);
+ Talk(EMOTE_RIN_END_4);
SetFaint();
EndEventTimer = 9000;
break;
case 5:
- DoScriptText(EMOTE_RIN_END_5, me);
+ Talk(EMOTE_RIN_END_5);
ClearFaint();
EndEventTimer = 1000;
break;
case 6:
- DoScriptText(SAY_RIN_END_6, me);
+ Talk(SAY_RIN_END_6);
EndEventTimer = 3000;
break;
case 7:
- DoScriptText(SAY_SPR_END_7, pSpraggle);
+ spraggle->AI()->Talk(SAY_SPR_END_7);
EndEventTimer = 10000;
break;
case 8:
- DoScriptText(EMOTE_RIN_END_8, me);
+ Talk(EMOTE_RIN_END_8);
EndEventTimer = 5000;
break;
case 9:
diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp
index 3bc91855d36..11ef00775d0 100644
--- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp
@@ -44,17 +44,12 @@ enum Creatures
// not in db
enum Yells
{
- SAY_INTRO = -1601010,
- SAY_AGGRO = -1601000,
- SAY_SLAY_1 = -1601001,
- SAY_SLAY_2 = -1601002,
- SAY_SLAY_3 = -1601003,
- SAY_LOCUST_1 = -1601005,
- SAY_LOCUST_2 = -1601006,
- SAY_LOCUST_3 = -1601007,
- SAY_SUBMERGE_1 = -1601008,
- SAY_SUBMERGE_2 = -1601009,
- SAY_DEATH = -1601004
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_LOCUST = 3,
+ SAY_SUBMERGE = 4,
+ SAY_INTRO = 5
};
enum
@@ -161,7 +156,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
DelayTimer = 0;
if (instance)
instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
@@ -338,7 +333,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
Summons.DespawnAll();
if (instance)
instance->SetData(DATA_ANUBARAK_EVENT, DONE);
@@ -348,7 +343,7 @@ public:
{
if (victim == me)
return;
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me);
+ Talk(SAY_SLAY);
}
void JustSummoned(Creature* summon)
diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp
index 1acc3b77a61..4c817fa9465 100644
--- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp
@@ -61,19 +61,12 @@ enum Mobs
enum Yells
{
- SAY_AGGRO = -1601011,
- SAY_SLAY_1 = -1601012,
- SAY_SLAY_2 = -1601013,
- SAY_DEATH = -1601014,
- //Not in db
- SAY_SEND_GROUP_1 = -1601020,
- SAY_SEND_GROUP_2 = -1601021,
- SAY_SEND_GROUP_3 = -1601022,
- SAY_SWARM_1 = -1601015,
- SAY_SWARM_2 = -1601016,
- SAY_PREFIGHT_1 = -1601017,
- SAY_PREFIGHT_2 = -1601018,
- SAY_PREFIGHT_3 = -1601019
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_SWARM = 3,
+ SAY_PREFIGHT = 4,
+ SAY_SEND_GROUP = 5
};
const Position SpawnPoint[] =
@@ -117,7 +110,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
Summon();
uiSummonTimer = 15*IN_MILLISECONDS;
@@ -180,7 +173,7 @@ public:
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_KRIKTHIR_THE_GATEWATCHER_EVENT, DONE);
@@ -191,7 +184,7 @@ public:
if (victim == me)
return;
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
void JustSummoned(Creature* summoned)
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp
index e20b08c515e..6d4b4bc9379 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp
@@ -23,30 +23,25 @@
#include "CellImpl.h"
#include "obsidian_sanctum.h"
-enum eEnums
+enum Enums
{
//Sartharion Yell
- SAY_SARTHARION_AGGRO = -1615018,
- SAY_SARTHARION_BERSERK = -1615019,
- SAY_SARTHARION_BREATH = -1615020,
- SAY_SARTHARION_CALL_SHADRON = -1615021,
- SAY_SARTHARION_CALL_TENEBRON = -1615022,
- SAY_SARTHARION_CALL_VESPERON = -1615023,
- SAY_SARTHARION_DEATH = -1615024,
- SAY_SARTHARION_SPECIAL_1 = -1615025,
- SAY_SARTHARION_SPECIAL_2 = -1615026,
- SAY_SARTHARION_SPECIAL_3 = -1615027,
- SAY_SARTHARION_SPECIAL_4 = -1615028,
- SAY_SARTHARION_SLAY_1 = -1615029,
- SAY_SARTHARION_SLAY_2 = -1615030,
- SAY_SARTHARION_SLAY_3 = -1615031,
-
- WHISPER_LAVA_CHURN = -1615032,
-
- WHISPER_SHADRON_DICIPLE = -1615008,
- WHISPER_VESPERON_DICIPLE = -1615041,
- WHISPER_HATCH_EGGS = -1615017,
- WHISPER_OPEN_PORTAL = -1615042, // whisper, shared by two dragons
+ SAY_SARTHARION_AGGRO = 0,
+ SAY_SARTHARION_BERSERK = 1,
+ SAY_SARTHARION_BREATH = 2,
+ SAY_SARTHARION_CALL_SHADRON = 3,
+ SAY_SARTHARION_CALL_TENEBRON = 4,
+ SAY_SARTHARION_CALL_VESPERON = 5,
+ SAY_SARTHARION_DEATH = 6,
+ SAY_SARTHARION_SPECIAL = 7,
+ SAY_SARTHARION_SLAY = 8,
+ WHISPER_LAVA_CHURN = 9,
+
+ WHISPER_HATCH_EGGS = 6,
+ WHISPER_OPEN_PORTAL = 6, // whisper, shared by two dragons
+
+ WHISPER_SHADRON_DICIPLE = 7,
+ WHISPER_VESPERON_DICIPLE = 7,
//Sartharion Spells
SPELL_BERSERK = 61632, // Increases the caster's attack speed by 150% and all damage it deals by 500% for 5 min.
@@ -357,7 +352,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_SARTHARION_AGGRO, me);
+ Talk(SAY_SARTHARION_AGGRO);
DoZoneInCombat();
if (instance)
@@ -369,7 +364,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_SARTHARION_DEATH, me);
+ Talk(SAY_SARTHARION_DEATH);
if (instance)
{
@@ -389,7 +384,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SARTHARION_SLAY_1, SAY_SARTHARION_SLAY_2, SAY_SARTHARION_SLAY_3), me);
+ Talk(SAY_SARTHARION_SLAY);
}
// me->ResetLootMode() is called from Reset()
@@ -511,7 +506,7 @@ public:
break;
}
- DoScriptText(iTextId, me);
+ Talk(iTextId);
}
}
}
@@ -527,7 +522,7 @@ public:
if (!PlayerList.isEmpty())
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
if (i->getSource() && i->getSource()->isAlive())
- DoScriptText(WHISPER_LAVA_CHURN, me, i->getSource());
+ Talk(WHISPER_LAVA_CHURN, i->getSource()->GetGUID());
}
}
@@ -566,7 +561,7 @@ public:
if (!m_bIsBerserk && !HealthAbovePct(35)
&& ((pTene && pTene->isAlive()) || (pShad && pShad->isAlive()) || (pVesp && pVesp->isAlive())))
{
- DoScriptText(SAY_SARTHARION_BERSERK, me);
+ Talk(SAY_SARTHARION_BERSERK);
DoCast(me, SPELL_BERSERK);
m_bIsBerserk = true;
}
@@ -624,7 +619,7 @@ public:
// flame breath
if (m_uiFlameBreathTimer <= uiDiff)
{
- DoScriptText(SAY_SARTHARION_BREATH, me);
+ Talk(SAY_SARTHARION_BREATH);
DoCast(me->getVictim(), RAID_MODE(SPELL_FLAME_BREATH, SPELL_FLAME_BREATH_H));
m_uiFlameBreathTimer = urand(25000, 35000);
}
@@ -657,7 +652,7 @@ public:
CastLavaStrikeOnTarget(target);
if (urand(0, 5) == 0)
- DoScriptText(RAND(SAY_SARTHARION_SPECIAL_1, SAY_SARTHARION_SPECIAL_2, SAY_SARTHARION_SPECIAL_3), me);
+ Talk(SAY_SARTHARION_SPECIAL);
}
m_uiLavaStrikeTimer = (m_bIsSoftEnraged ? urand(1400, 2000) : urand(5000, 20000));
}
@@ -701,38 +696,32 @@ public:
enum TeneText
{
- SAY_TENEBRON_AGGRO = -1615009,
- SAY_TENEBRON_SLAY_1 = -1615010,
- SAY_TENEBRON_SLAY_2 = -1615011,
- SAY_TENEBRON_DEATH = -1615012,
- SAY_TENEBRON_BREATH = -1615013,
- SAY_TENEBRON_RESPOND = -1615014,
- SAY_TENEBRON_SPECIAL_1 = -1615015,
- SAY_TENEBRON_SPECIAL_2 = -1615016
+ SAY_TENEBRON_AGGRO = 0,
+ SAY_TENEBRON_SLAY = 1,
+ SAY_TENEBRON_DEATH = 2,
+ SAY_TENEBRON_BREATH = 3,
+ SAY_TENEBRON_RESPOND = 4,
+ SAY_TENEBRON_SPECIAL = 5
};
enum ShadText
{
- SAY_SHADRON_AGGRO = -1615000,
- SAY_SHADRON_SLAY_1 = -1615001,
- SAY_SHADRON_SLAY_2 = -1615002,
- SAY_SHADRON_DEATH = -1615003,
- SAY_SHADRON_BREATH = -1615004,
- SAY_SHADRON_RESPOND = -1615005,
- SAY_SHADRON_SPECIAL_1 = -1615006,
- SAY_SHADRON_SPECIAL_2 = -1615007
+ SAY_SHADRON_AGGRO = 0,
+ SAY_SHADRON_SLAY = 1,
+ SAY_SHADRON_DEATH = 2,
+ SAY_SHADRON_BREATH = 3,
+ SAY_SHADRON_RESPOND = 4,
+ SAY_SHADRON_SPECIAL = 5
};
enum VespText
{
- SAY_VESPERON_AGGRO = -1615033,
- SAY_VESPERON_SLAY_1 = -1615034,
- SAY_VESPERON_SLAY_2 = -1615035,
- SAY_VESPERON_DEATH = -1615036,
- SAY_VESPERON_BREATH = -1615037,
- SAY_VESPERON_RESPOND = -1615038,
- SAY_VESPERON_SPECIAL_1 = -1615039,
- SAY_VESPERON_SPECIAL_2 = -1615040
+ SAY_VESPERON_AGGRO = 0,
+ SAY_VESPERON_SLAY = 1,
+ SAY_VESPERON_DEATH = 2,
+ SAY_VESPERON_BREATH = 3,
+ SAY_VESPERON_RESPOND = 4,
+ SAY_VESPERON_SPECIAL = 5,
};
//to control each dragons common abilities
@@ -829,7 +818,7 @@ struct dummy_dragonAI : public ScriptedAI
if (!PlayerList.isEmpty())
{
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
- DoScriptText(iTextId, me, i->getSource());
+ Talk(iTextId, i->getSource()->GetGUID());
}
}
}
@@ -943,7 +932,7 @@ struct dummy_dragonAI : public ScriptedAI
break;
}
- DoScriptText(iTextId, me);
+ Talk(iTextId);
me->RemoveAurasDueToSpell(uiSpellId);
@@ -1019,13 +1008,13 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_TENEBRON_AGGRO, me);
+ Talk(SAY_TENEBRON_AGGRO);
DoZoneInCombat();
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_TENEBRON_SLAY_1, SAY_TENEBRON_SLAY_2), me);
+ Talk(SAY_TENEBRON_SLAY);
}
void UpdateAI(const uint32 uiDiff)
@@ -1060,7 +1049,7 @@ public:
// shadow breath
if (m_uiShadowBreathTimer <= uiDiff)
{
- DoScriptText(SAY_TENEBRON_BREATH, me);
+ Talk(SAY_TENEBRON_BREATH);
DoCast(me->getVictim(), RAID_MODE(SPELL_SHADOW_BREATH, SPELL_SHADOW_BREATH_H));
m_uiShadowBreathTimer = urand(20000, 25000);
}
@@ -1114,13 +1103,13 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_SHADRON_AGGRO, me);
+ Talk(SAY_SHADRON_AGGRO);
DoZoneInCombat();
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SHADRON_SLAY_1, SAY_SHADRON_SLAY_2), me);
+ Talk(SAY_SHADRON_SLAY);
}
void UpdateAI(const uint32 uiDiff)
@@ -1164,7 +1153,7 @@ public:
// shadow breath
if (m_uiShadowBreathTimer <= uiDiff)
{
- DoScriptText(SAY_SHADRON_BREATH, me);
+ Talk(SAY_SHADRON_BREATH);
DoCast(me->getVictim(), RAID_MODE(SPELL_SHADOW_BREATH, SPELL_SHADOW_BREATH_H));
m_uiShadowBreathTimer = urand(20000, 25000);
}
@@ -1212,13 +1201,13 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_VESPERON_AGGRO, me);
+ Talk(SAY_VESPERON_AGGRO);
DoZoneInCombat();
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_VESPERON_SLAY_1, SAY_VESPERON_SLAY_2), me);
+ Talk(SAY_VESPERON_SLAY);
}
void UpdateAI(const uint32 uiDiff)
@@ -1259,7 +1248,7 @@ public:
// shadow breath
if (m_uiShadowBreathTimer <= uiDiff)
{
- DoScriptText(SAY_VESPERON_BREATH, me);
+ Talk(SAY_VESPERON_BREATH);
DoCast(me->getVictim(), RAID_MODE(SPELL_SHADOW_BREATH, SPELL_SHADOW_BREATH_H));
m_uiShadowBreathTimer = urand(20000, 25000);
}
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 d77c84b2978..3c20acf34a6 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp
@@ -27,10 +27,34 @@ EndScriptData */
#include "SpellScript.h"
#include "trial_of_the_champion.h"
#include "ScriptedEscortAI.h"
-
-enum eSpells
+/*
+enum Yells
+{
+ // Eadric the Pure
+ SAY_INTRO = 0,
+ SAY_AGGRO = 1,
+ EMOTE_RADIANCE = 2,
+ EMOTE_HAMMER_RIGHTEOUS = 3,
+ SAY_HAMMER_RIGHTEOUS = 4,
+ SAY_KILL_PLAYER = 5,
+ SAY_DEFEATED = 6,
+
+ // Argent Confessor Paletress
+ SAY_INTRO_1 = 0,
+ SAY_INTRO_2 = 1,
+ SAY_AGGRO = 2,
+ SAY_MEMORY_SUMMON = 3,
+ SAY_MEMORY_DEATH = 4,
+ SAY_KILL_PLAYER = 5,
+ SAY_DEFEATED = 6,
+
+ // Memory of X
+ EMOTE_WAKING_NIGHTMARE = 0
+};
+*/
+enum Spells
{
- //Eadric
+ // Eadric the Pure
SPELL_EADRIC_ACHIEVEMENT = 68197,
SPELL_HAMMER_JUSTICE = 66863,
SPELL_HAMMER_RIGHTEOUS = 66867,
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 c56d44ceb08..c1a2f9c07d2 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp
@@ -27,7 +27,7 @@ EndScriptData */
#include "ScriptedEscortAI.h"
#include "trial_of_the_champion.h"
-enum eSpells
+enum Spells
{
//phase 1
SPELL_PLAGUE_STRIKE = 67884,
@@ -61,13 +61,13 @@ enum eSpells
SPELL_KILL_CREDIT = 68663
};
-enum eModels
+enum Models
{
MODEL_SKELETON = 29846,
MODEL_GHOST = 21300
};
-enum ePhases
+enum Phases
{
PHASE_UNDEAD = 1,
PHASE_SKELETON = 2,
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 ffda3d12e2f..9c0b894bfa7 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
@@ -33,6 +33,18 @@ EndContentData */
#include "Vehicle.h"
#include "Player.h"
+enum Yells
+{
+ SAY_INTRO_1 = 0,
+ SAY_INTRO_2 = 1,
+ SAY_INTRO_3 = 2,
+ SAY_AGGRO = 3,
+ SAY_PHASE_2 = 4,
+ SAY_PHASE_3 = 5,
+ SAY_KILL_PLAYER = 6,
+ SAY_DEATH = 7
+};
+
#define GOSSIP_START_EVENT1 "I'm ready to start challenge."
#define GOSSIP_START_EVENT2 "I'm ready for the next challenge."
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.h b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.h
index cb3a43acdd0..6116a150334 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.h
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.h
@@ -19,7 +19,7 @@
#ifndef DEF_TOC_H
#define DEF_TOC_H
-enum eData
+enum Data
{
BOSS_GRAND_CHAMPIONS,
BOSS_ARGENT_CHALLENGE_E,
@@ -46,7 +46,7 @@ enum Data64
DATA_GRAND_CHAMPION_3
};
-enum eNpcs
+enum CreatureIds
{
// Horde Champions
NPC_MOKRA = 35572,
@@ -78,7 +78,7 @@ enum eNpcs
NPC_ARELAS = 35005
};
-enum eGameObjects
+enum GameObjects
{
GO_MAIN_GATE = 195647,
@@ -92,7 +92,7 @@ enum eGameObjects
GO_PALETRESS_LOOT_H = 195324
};
-enum eVehicles
+enum Vehicles
{
//Grand Champions Alliance Vehicles
VEHICLE_MARSHAL_JACOB_ALERIUS_MOUNT = 35637,
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 f618d0e04e7..a9dc9cf394d 100755..100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp
@@ -25,6 +25,7 @@
#include "ScriptedCreature.h"
#include "trial_of_the_crusader.h"
#include "SpellScript.h"
+#include "SpellAuraEffects.h"
#include <limits>
enum Yells
@@ -53,54 +54,54 @@ enum Summons
enum BossSpells
{
- SPELL_FREEZE_SLASH = 66012,
- SPELL_PENETRATING_COLD = 66013,
- SPELL_LEECHING_SWARM = 66118,
- SPELL_LEECHING_HEAL = 66125,
- SPELL_LEECHING_DAMAGE = 66240,
- SPELL_MARK = 67574,
- SPELL_SPIKE_CALL = 66169,
- SPELL_SUBMERGE_ANUBARAK = 65981,
- SPELL_CLEAR_ALL_DEBUFFS = 34098,
- SPELL_EMERGE_ANUBARAK = 65982,
- SPELL_SUMMON_BEATLES = 66339,
- SPELL_SUMMON_BURROWER = 66332,
+ SPELL_FREEZE_SLASH = 66012,
+ SPELL_PENETRATING_COLD = 66013,
+ SPELL_LEECHING_SWARM = 66118,
+ SPELL_LEECHING_SWARM_HEAL = 66125,
+ SPELL_LEECHING_SWARM_DMG = 66240,
+ SPELL_MARK = 67574,
+ SPELL_SPIKE_CALL = 66169,
+ SPELL_SUBMERGE_ANUBARAK = 65981,
+ SPELL_CLEAR_ALL_DEBUFFS = 34098,
+ SPELL_EMERGE_ANUBARAK = 65982,
+ SPELL_SUMMON_BEATLES = 66339,
+ SPELL_SUMMON_BURROWER = 66332,
// Burrow
- SPELL_CHURNING_GROUND = 66969,
+ SPELL_CHURNING_GROUND = 66969,
// Scarab
- SPELL_DETERMINATION = 66092,
- SPELL_ACID_MANDIBLE = 65774, //Passive - Triggered
+ SPELL_DETERMINATION = 66092,
+ SPELL_ACID_MANDIBLE = 65774, //Passive - Triggered
// Burrower
- SPELL_SPIDER_FRENZY = 66128,
- SPELL_EXPOSE_WEAKNESS = 67720, //Passive - Triggered
- SPELL_SHADOW_STRIKE = 66134,
- SPELL_SUBMERGE_EFFECT = 68394,
- SPELL_AWAKENED = 66311,
- SPELL_EMERGE_EFFECT = 65982,
+ SPELL_SPIDER_FRENZY = 66128,
+ SPELL_EXPOSE_WEAKNESS = 67720, //Passive - Triggered
+ SPELL_SHADOW_STRIKE = 66134,
+ SPELL_SUBMERGE_EFFECT = 68394,
+ SPELL_AWAKENED = 66311,
+ SPELL_EMERGE_EFFECT = 65982,
- SPELL_PERSISTENT_DIRT = 68048,
+ SPELL_PERSISTENT_DIRT = 68048,
- SUMMON_SCARAB = NPC_SCARAB,
- SUMMON_FROSTSPHERE = NPC_FROST_SPHERE,
- SPELL_BERSERK = 26662,
+ SUMMON_SCARAB = NPC_SCARAB,
+ SUMMON_FROSTSPHERE = NPC_FROST_SPHERE,
+ SPELL_BERSERK = 26662,
//Frost Sphere
- SPELL_FROST_SPHERE = 67539,
- SPELL_PERMAFROST = 66193,
- SPELL_PERMAFROST_VISUAL = 65882,
- SPELL_PERMAFROST_MODEL = 66185,
+ SPELL_FROST_SPHERE = 67539,
+ SPELL_PERMAFROST = 66193,
+ SPELL_PERMAFROST_VISUAL = 65882,
+ SPELL_PERMAFROST_MODEL = 66185,
//Spike
- SPELL_SUMMON_SPIKE = 66169,
- SPELL_SPIKE_SPEED1 = 65920,
- SPELL_SPIKE_TRAIL = 65921,
- SPELL_SPIKE_SPEED2 = 65922,
- SPELL_SPIKE_SPEED3 = 65923,
- SPELL_SPIKE_FAIL = 66181,
- SPELL_SPIKE_TELE = 66170
+ SPELL_SUMMON_SPIKE = 66169,
+ SPELL_SPIKE_SPEED1 = 65920,
+ SPELL_SPIKE_TRAIL = 65921,
+ SPELL_SPIKE_SPEED2 = 65922,
+ SPELL_SPIKE_SPEED3 = 65923,
+ SPELL_SPIKE_FAIL = 66181,
+ SPELL_SPIKE_TELE = 66170
};
#define SPELL_PERMAFROST_HELPER RAID_MODE<uint32>(66193, 67855, 67856, 67857)
@@ -841,6 +842,49 @@ class spell_impale : public SpellScriptLoader
}
};
+class spell_anubarak_leeching_swarm : public SpellScriptLoader
+{
+ public:
+ spell_anubarak_leeching_swarm() : SpellScriptLoader("spell_anubarak_leeching_swarm") { }
+
+ class spell_anubarak_leeching_swarm_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_anubarak_leeching_swarm_AuraScript);
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_LEECHING_SWARM_DMG) || !sSpellMgr->GetSpellInfo(SPELL_LEECHING_SWARM_HEAL))
+ return false;
+ return true;
+ }
+
+ void HandleEffectPeriodic(AuraEffect const* aurEff)
+ {
+ Unit* caster = GetCaster();
+ if (Unit* target = GetTarget())
+ {
+ int32 lifeLeeched = target->CountPctFromCurHealth(aurEff->GetAmount());
+ if (lifeLeeched < 250)
+ lifeLeeched = 250;
+ // Damage
+ caster->CastCustomSpell(target, SPELL_LEECHING_SWARM_DMG, &lifeLeeched, 0, 0, false);
+ // Heal
+ caster->CastCustomSpell(caster, SPELL_LEECHING_SWARM_HEAL, &lifeLeeched, 0, 0, false);
+ }
+ }
+
+ void Register()
+ {
+ OnEffectPeriodic += AuraEffectPeriodicFn(spell_anubarak_leeching_swarm_AuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
+ }
+ };
+
+ AuraScript* GetAuraScript() const
+ {
+ return new spell_anubarak_leeching_swarm_AuraScript();
+ }
+};
+
void AddSC_boss_anubarak_trial()
{
new boss_anubarak_trial();
@@ -850,4 +894,5 @@ void AddSC_boss_anubarak_trial()
new mob_frost_sphere();
new spell_impale();
+ new spell_anubarak_leeching_swarm();
}
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 a99aa373602..a99aa373602 100755..100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
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 e2068cabb95..e2068cabb95 100755..100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
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 2d09feef089..2d09feef089 100755..100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp
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 01d3bcbfe90..01d3bcbfe90 100755..100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp
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 fb084ec1e3c..fb084ec1e3c 100755..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
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 b4d35afa8fb..b4d35afa8fb 100755..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
diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp
index 6ce56958d60..1ad776a0b46 100644
--- a/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp
+++ b/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp
@@ -36,12 +36,11 @@ enum Spells
//not in db
enum Yells
{
- SAY_AGGRO = -1600000,
- SAY_KILL = -1600001,
- SAY_DEATH = -1600002,
- SAY_NECRO_ADD = -1600003,
- SAY_REUBBLE_1 = -1600004,
- SAY_REUBBLE_2 = -1600005
+ SAY_AGGRO = 0,
+ SAY_KILL = 1,
+ SAY_DEATH = 2,
+ SAY_NECRO_ADD = 3,
+ SAY_REUBBLE = 4
};
enum Creatures
@@ -123,7 +122,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
Phase = PHASE_1;
uiCrystalHandlerTimer = 30*IN_MILLISECONDS;
uiTimer = 1*IN_MILLISECONDS;
@@ -159,7 +158,7 @@ public:
{
if (uiCrystalHandlerTimer <= diff)
{
- DoScriptText(SAY_NECRO_ADD, me);
+ Talk(SAY_NECRO_ADD);
Creature* pCrystalHandler = me->SummonCreature(CREATURE_CRYSTAL_HANDLER, CrystalHandlerSpawnPoint, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20*IN_MILLISECONDS);
pCrystalHandler->GetMotionMaster()->MovePoint(0, AddDestinyPoint);
uiCrystalHandlerTimer = urand(20*IN_MILLISECONDS, 30*IN_MILLISECONDS);
@@ -181,7 +180,7 @@ public:
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_NOVOS_EVENT, DONE);
lSummons.DespawnAll();
@@ -191,7 +190,7 @@ public:
{
if (victim == me)
return;
- DoScriptText(SAY_KILL, me);
+ Talk(SAY_KILL);
}
void JustSummoned(Creature* summon)
diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp
index 79739280055..4cbabe2449a 100644
--- a/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp
+++ b/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp
@@ -44,14 +44,11 @@ enum Spells
enum Yells
{
- SAY_AGGRO = -1600011,
- SAY_KILL_1 = -1600012,
- SAY_KILL_2 = -1600013,
- SAY_FLESH_1 = -1600014,
- SAY_FLESH_2 = -1600015,
- SAY_SKELETON_1 = -1600016,
- SAY_SKELETON_2 = -1600017,
- SAY_DEATH = -1600018
+ SAY_AGGRO = 0,
+ SAY_KILL = 1,
+ SAY_FLESH = 2,
+ SAY_SKELETON = 3,
+ SAY_DEATH = 4
};
enum Models
{
@@ -104,7 +101,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_THARON_JA_EVENT, IN_PROGRESS);
@@ -150,7 +147,7 @@ public:
case GOING_FLESH:
if (uiPhaseTimer < diff)
{
- DoScriptText(RAND(SAY_FLESH_1, SAY_FLESH_2), me);
+ Talk(SAY_FLESH);
me->SetDisplayId(MODEL_FLESH);
std::list<Unit*> playerList;
@@ -200,7 +197,7 @@ public:
case GOING_SKELETAL:
if (uiPhaseTimer < diff)
{
- DoScriptText(RAND(SAY_SKELETON_1, SAY_SKELETON_2), me);
+ Talk(SAY_SKELETON);
me->DeMorph();
Phase = SKELETAL;
uiPhaseTimer = 20*IN_MILLISECONDS;
@@ -224,12 +221,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2), me);
+ Talk(SAY_KILL);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
{
diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp
index d8c720b6f95..60001e048a3 100644
--- a/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp
+++ b/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp
@@ -39,11 +39,11 @@ enum Spells
enum Yells
{
- SAY_AGGRO = -1600006,
- SAY_KILL = -1600007,
- SAY_CONSUME = -1600008,
- SAY_EXPLODE = -1600009,
- SAY_DEATH = -1600010
+ SAY_AGGRO = 0,
+ SAY_KILL = 1,
+ SAY_CONSUME = 2,
+ SAY_EXPLODE = 3,
+ SAY_DEATH = 4
};
enum Creatures
@@ -102,7 +102,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_TROLLGORE_EVENT, IN_PROGRESS);
@@ -124,7 +124,7 @@ public:
if (uiConsumeTimer <= diff)
{
- DoScriptText(SAY_CONSUME, me);
+ Talk(SAY_CONSUME);
DoCast(SPELL_CONSUME);
uiConsumeTimer = 15*IN_MILLISECONDS;
} else uiConsumeTimer -= diff;
@@ -151,7 +151,7 @@ public:
if (uiExplodeCorpseTimer <= diff)
{
DoCast(SPELL_CORPSE_EXPLODE);
- DoScriptText(SAY_EXPLODE, me);
+ Talk(SAY_EXPLODE);
uiExplodeCorpseTimer = urand(15*IN_MILLISECONDS, 19*IN_MILLISECONDS);
} else uiExplodeCorpseTimer -= diff;
@@ -160,7 +160,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
lSummons.DespawnAll();
@@ -180,7 +180,7 @@ public:
{
if (victim == me)
return;
- DoScriptText(SAY_KILL, me);
+ Talk(SAY_KILL);
}
void JustSummoned(Creature* summon)
diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp
index b790ed518d5..1940ff4e2af 100644
--- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp
@@ -23,12 +23,11 @@
enum Yells
{
- SAY_AGGRO = -1632001,
- SAY_SLAY_1 = -1632002,
- SAY_SLAY_2 = -1632003,
- SAY_DEATH = -1632004,
- SAY_SOUL_STORM = -1632005,
- SAY_CORRUPT_SOUL = -1632006,
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_SOUL_STORM = 3,
+ SAY_CORRUPT_SOUL = 4,
};
enum Spells
@@ -98,7 +97,7 @@ class boss_bronjahm : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
me->RemoveAurasDueToSpell(SPELL_SOULSTORM_CHANNEL);
instance->SetBossState(DATA_BRONJAHM, IN_PROGRESS);
@@ -106,7 +105,7 @@ class boss_bronjahm : public CreatureScript
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
instance->SetBossState(DATA_BRONJAHM, DONE);
}
@@ -114,7 +113,7 @@ class boss_bronjahm : public CreatureScript
void KilledUnit(Unit* who)
{
if (who->GetTypeId() == TYPEID_PLAYER)
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/)
@@ -163,13 +162,13 @@ class boss_bronjahm : public CreatureScript
case EVENT_CORRUPT_SOUL:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true))
{
- DoScriptText(SAY_CORRUPT_SOUL, me);
+ Talk(SAY_CORRUPT_SOUL);
DoCast(target, SPELL_CORRUPT_SOUL);
}
events.ScheduleEvent(EVENT_CORRUPT_SOUL, urand(25000, 35000), 0, PHASE_1);
break;
case EVENT_SOULSTORM:
- DoScriptText(SAY_SOUL_STORM, me);
+ Talk(SAY_SOUL_STORM);
me->CastSpell(me, SPELL_SOULSTORM_VISUAL, true);
me->CastSpell(me, SPELL_SOULSTORM, false);
break;
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 714e5df6444..248fe3c6eb0 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
@@ -29,40 +29,32 @@
enum Yells
{
- SAY_FACE_ANGER_AGGRO = -1632010,
- SAY_FACE_DESIRE_AGGRO = -1632011,
- SAY_FACE_ANGER_SLAY_1 = -1632012,
- SAY_FACE_SORROW_SLAY_1 = -1632013,
- SAY_FACE_DESIRE_SLAY_1 = -1632014,
- SAY_FACE_ANGER_SLAY_2 = -1632015,
- SAY_FACE_SORROW_SLAY_2 = -1632016,
- SAY_FACE_DESIRE_SLAY_2 = -1632017,
- SAY_FACE_SORROW_DEATH = -1632019,
- SAY_FACE_DESIRE_DEATH = -1632020,
- EMOTE_MIRRORED_SOUL = -1632021,
- EMOTE_UNLEASH_SOUL = -1632022,
- SAY_FACE_ANGER_UNLEASH_SOUL = -1632023,
- SAY_FACE_SORROW_UNLEASH_SOUL = -1632024,
- SAY_FACE_DESIRE_UNLEASH_SOUL = -1632025,
- EMOTE_WAILING_SOUL = -1632026,
- SAY_FACE_ANGER_WAILING_SOUL = -1632027,
- SAY_FACE_DESIRE_WAILING_SOUL = -1632028,
-
- SAY_JAINA_OUTRO = -1632029,
- SAY_SYLVANAS_OUTRO = -1632030,
+ SAY_FACE_AGGRO = 0,
+ SAY_FACE_ANGER_SLAY = 1,
+ SAY_FACE_SORROW_SLAY = 2,
+ SAY_FACE_DESIRE_SLAY = 3,
+ SAY_FACE_DEATH = 4,
+ EMOTE_MIRRORED_SOUL = 5,
+ EMOTE_UNLEASH_SOUL = 6,
+ SAY_FACE_UNLEASH_SOUL = 7,
+ EMOTE_WAILING_SOUL = 8,
+ SAY_FACE_WAILING_SOUL = 9,
+
+ SAY_JAINA_OUTRO = 0,
+ SAY_SYLVANAS_OUTRO = 0
};
enum Spells
{
- SPELL_PHANTOM_BLAST = 68982,
- H_SPELL_PHANTOM_BLAST = 70322,
- SPELL_MIRRORED_SOUL = 69051,
- SPELL_WELL_OF_SOULS = 68820,
- SPELL_UNLEASHED_SOULS = 68939,
- SPELL_WAILING_SOULS_STARTING = 68912, // Initial spell cast at begining of wailing souls phase
- SPELL_WAILING_SOULS_BEAM = 68875, // the beam visual
- SPELL_WAILING_SOULS = 68873, // the actual spell
- H_SPELL_WAILING_SOULS = 70324,
+ SPELL_PHANTOM_BLAST = 68982,
+ H_SPELL_PHANTOM_BLAST = 70322,
+ SPELL_MIRRORED_SOUL = 69051,
+ SPELL_WELL_OF_SOULS = 68820,
+ SPELL_UNLEASHED_SOULS = 68939,
+ SPELL_WAILING_SOULS_STARTING = 68912, // Initial spell cast at begining of wailing souls phase
+ SPELL_WAILING_SOULS_BEAM = 68875, // the beam visual
+ SPELL_WAILING_SOULS = 68873, // the actual spell
+ H_SPELL_WAILING_SOULS = 70324,
// 68871, 68873, 68875, 68876, 68899, 68912, 70324,
// 68899 trigger 68871
};
@@ -157,7 +149,7 @@ class boss_devourer_of_souls : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_FACE_ANGER_AGGRO, SAY_FACE_DESIRE_AGGRO), me);
+ Talk(SAY_FACE_AGGRO);
if (!me->FindNearestCreature(NPC_CRUCIBLE_OF_SOULS, 60)) // Prevent double spawn
instance->instance->SummonCreature(NPC_CRUCIBLE_OF_SOULS, CrucibleSummonPos);
@@ -196,20 +188,20 @@ class boss_devourer_of_souls : public CreatureScript
switch (me->GetDisplayId())
{
case DISPLAY_ANGER:
- textId = RAND(SAY_FACE_ANGER_SLAY_1, SAY_FACE_ANGER_SLAY_2);
+ textId = SAY_FACE_ANGER_SLAY;
break;
case DISPLAY_SORROW:
- textId = RAND(SAY_FACE_SORROW_SLAY_1, SAY_FACE_SORROW_SLAY_2);
+ textId = SAY_FACE_SORROW_SLAY;
break;
case DISPLAY_DESIRE:
- textId = RAND(SAY_FACE_DESIRE_SLAY_1, SAY_FACE_DESIRE_SLAY_2);
+ textId = SAY_FACE_DESIRE_SLAY;
break;
default:
break;
}
if (textId)
- DoScriptText(textId, me);
+ Talk(textId);
}
void JustDied(Unit* /*killer*/)
@@ -218,7 +210,7 @@ class boss_devourer_of_souls : public CreatureScript
Position spawnPoint = {5618.139f, 2451.873f, 705.854f, 0};
- DoScriptText(RAND(SAY_FACE_SORROW_DEATH, SAY_FACE_DESIRE_DEATH), me);
+ Talk(SAY_FACE_DEATH);
instance->SetData(DATA_DEVOURER_EVENT, DONE);
@@ -234,9 +226,9 @@ class boss_devourer_of_souls : public CreatureScript
{
summon->GetMotionMaster()->MovePoint(0, outroPositions[i].movePosition);
if (summon->GetEntry() == NPC_JAINA_PART2)
- DoScriptText(SAY_JAINA_OUTRO, summon);
+ summon->AI()->Talk(SAY_JAINA_OUTRO);
else if (summon->GetEntry() == NPC_SYLVANAS_PART2)
- DoScriptText(SAY_SYLVANAS_OUTRO, summon);
+ summon->AI()->Talk(SAY_SYLVANAS_OUTRO);
}
}
}
@@ -279,7 +271,7 @@ class boss_devourer_of_souls : public CreatureScript
{
mirroredSoulTarget = target->GetGUID();
DoCast(target, SPELL_MIRRORED_SOUL);
- DoScriptText(EMOTE_MIRRORED_SOUL, me);
+ Talk(EMOTE_MIRRORED_SOUL);
}
events.ScheduleEvent(EVENT_MIRRORED_SOUL, urand(15000, 30000));
break;
@@ -292,8 +284,8 @@ class boss_devourer_of_souls : public CreatureScript
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(target, SPELL_UNLEASHED_SOULS);
me->SetDisplayId(DISPLAY_SORROW);
- DoScriptText(RAND(SAY_FACE_ANGER_UNLEASH_SOUL, SAY_FACE_SORROW_UNLEASH_SOUL, SAY_FACE_DESIRE_UNLEASH_SOUL), me);
- DoScriptText(EMOTE_UNLEASH_SOUL, me);
+ Talk(SAY_FACE_UNLEASH_SOUL);
+ Talk(EMOTE_UNLEASH_SOUL);
events.ScheduleEvent(EVENT_UNLEASHED_SOULS, 30000);
events.ScheduleEvent(EVENT_FACE_ANGER, 5000);
break;
@@ -303,8 +295,8 @@ class boss_devourer_of_souls : public CreatureScript
case EVENT_WAILING_SOULS:
me->SetDisplayId(DISPLAY_DESIRE);
- DoScriptText(RAND(SAY_FACE_ANGER_WAILING_SOUL, SAY_FACE_DESIRE_WAILING_SOUL), me);
- DoScriptText(EMOTE_WAILING_SOUL, me);
+ Talk(SAY_FACE_WAILING_SOUL);
+ Talk(EMOTE_WAILING_SOUL);
DoCast(me, SPELL_WAILING_SOULS_STARTING);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp
index 2f89d3bd503..895efd84580 100644
--- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp
@@ -42,21 +42,21 @@ enum Events
enum Yells
{
- SAY_JAINA_INTRO_1 = -1632040,
- SAY_JAINA_INTRO_2 = -1632041,
- SAY_JAINA_INTRO_3 = -1632042,
- SAY_JAINA_INTRO_4 = -1632043,
- SAY_JAINA_INTRO_5 = -1632044,
- SAY_JAINA_INTRO_6 = -1632045,
- SAY_JAINA_INTRO_7 = -1632046,
- SAY_JAINA_INTRO_8 = -1632047,
-
- SAY_SYLVANAS_INTRO_1 = -1632050,
- SAY_SYLVANAS_INTRO_2 = -1632051,
- SAY_SYLVANAS_INTRO_3 = -1632052,
- SAY_SYLVANAS_INTRO_4 = -1632053,
- SAY_SYLVANAS_INTRO_5 = -1632054,
- SAY_SYLVANAS_INTRO_6 = -1632055,
+ SAY_JAINA_INTRO_1 = 0,
+ SAY_JAINA_INTRO_2 = 1,
+ SAY_JAINA_INTRO_3 = 2,
+ SAY_JAINA_INTRO_4 = 3,
+ SAY_JAINA_INTRO_5 = 4,
+ SAY_JAINA_INTRO_6 = 5,
+ SAY_JAINA_INTRO_7 = 6,
+ SAY_JAINA_INTRO_8 = 7,
+
+ SAY_SYLVANAS_INTRO_1 = 0,
+ SAY_SYLVANAS_INTRO_2 = 1,
+ SAY_SYLVANAS_INTRO_3 = 2,
+ SAY_SYLVANAS_INTRO_4 = 3,
+ SAY_SYLVANAS_INTRO_5 = 4,
+ SAY_SYLVANAS_INTRO_6 = 5,
};
enum eSylvanas
@@ -120,32 +120,32 @@ public:
switch (events.ExecuteEvent())
{
case EVENT_INTRO_1:
- DoScriptText(SAY_SYLVANAS_INTRO_1, me);
+ Talk(SAY_SYLVANAS_INTRO_1);
events.ScheduleEvent(EVENT_INTRO_2, 11500);
break;
case EVENT_INTRO_2:
- DoScriptText(SAY_SYLVANAS_INTRO_2, me);
+ Talk(SAY_SYLVANAS_INTRO_2);
events.ScheduleEvent(EVENT_INTRO_3, 10500);
break;
case EVENT_INTRO_3:
- DoScriptText(SAY_SYLVANAS_INTRO_3, me);
+ Talk(SAY_SYLVANAS_INTRO_3);
events.ScheduleEvent(EVENT_INTRO_4, 9500);
break;
case EVENT_INTRO_4:
- DoScriptText(SAY_SYLVANAS_INTRO_4, me);
+ Talk(SAY_SYLVANAS_INTRO_4);
events.ScheduleEvent(EVENT_INTRO_5, 10500);
break;
case EVENT_INTRO_5:
- DoScriptText(SAY_SYLVANAS_INTRO_5, me);
+ Talk(SAY_SYLVANAS_INTRO_5);
events.ScheduleEvent(EVENT_INTRO_6, 9500);
break;
case EVENT_INTRO_6:
- DoScriptText(SAY_SYLVANAS_INTRO_6, me);
+ Talk(SAY_SYLVANAS_INTRO_6);
// End of Intro
phase = PHASE_NORMAL;
break;
@@ -246,42 +246,42 @@ public:
switch (events.ExecuteEvent())
{
case EVENT_INTRO_1:
- DoScriptText(SAY_JAINA_INTRO_1, me);
+ Talk(SAY_JAINA_INTRO_1);
events.ScheduleEvent(EVENT_INTRO_2, 8000);
break;
case EVENT_INTRO_2:
- DoScriptText(SAY_JAINA_INTRO_2, me);
+ Talk(SAY_JAINA_INTRO_2);
events.ScheduleEvent(EVENT_INTRO_3, 8500);
break;
case EVENT_INTRO_3:
- DoScriptText(SAY_JAINA_INTRO_3, me);
+ Talk(SAY_JAINA_INTRO_3);
events.ScheduleEvent(EVENT_INTRO_4, 8000);
break;
case EVENT_INTRO_4:
- DoScriptText(SAY_JAINA_INTRO_4, me);
+ Talk(SAY_JAINA_INTRO_4);
events.ScheduleEvent(EVENT_INTRO_5, 10000);
break;
case EVENT_INTRO_5:
- DoScriptText(SAY_JAINA_INTRO_5, me);
+ Talk(SAY_JAINA_INTRO_5);
events.ScheduleEvent(EVENT_INTRO_6, 8000);
break;
case EVENT_INTRO_6:
- DoScriptText(SAY_JAINA_INTRO_6, me);
+ Talk(SAY_JAINA_INTRO_6);
events.ScheduleEvent(EVENT_INTRO_7, 12000);
break;
case EVENT_INTRO_7:
- DoScriptText(SAY_JAINA_INTRO_7, me);
+ Talk(SAY_JAINA_INTRO_7);
events.ScheduleEvent(EVENT_INTRO_8, 8000);
break;
case EVENT_INTRO_8:
- DoScriptText(SAY_JAINA_INTRO_8, me);
+ Talk(SAY_JAINA_INTRO_8);
// End of Intro
phase = PHASE_NORMAL;
break;
diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp
index 4df13d32bf8..bb3028518ec 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp
@@ -21,12 +21,11 @@
enum Yells
{
- SAY_AGGRO = -1668050,
- SAY_SLAY_1 = -1668051,
- SAY_SLAY_2 = -1668052,
- SAY_DEATH = -1668053,
- SAY_IMPENDING_DESPAIR = -1668054,
- SAY_DEFILING_HORROR = -1668055,
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_IMPENDING_DESPAIR = 3,
+ SAY_DEFILING_HORROR = 4,
};
enum Spells
@@ -74,7 +73,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_FALRIC_EVENT, IN_PROGRESS);
@@ -85,7 +84,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_FALRIC_EVENT, DONE);
@@ -93,7 +92,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
void UpdateAI(const uint32 diff)
@@ -116,7 +115,7 @@ public:
case EVENT_IMPENDING_DESPAIR:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
{
- DoScriptText(SAY_IMPENDING_DESPAIR, me);
+ Talk(SAY_IMPENDING_DESPAIR);
DoCast(target, SPELL_IMPENDING_DESPAIR);
}
events.ScheduleEvent(EVENT_IMPENDING_DESPAIR, 13000);
diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp
index 8334a199791..697e8cfb664 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp
@@ -21,12 +21,10 @@
enum Yells
{
- SAY_AGGRO = -1668060,
- SAY_SLAY_1 = -1668061,
- SAY_SLAY_2 = -1668062,
- SAY_DEATH = -1668063,
- SAY_CORRUPTED_FLESH_1 = -1668064,
- SAY_CORRUPTED_FLESH_2 = -1668065,
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_CORRUPTED_FLESH = 3
};
enum Spells
@@ -70,7 +68,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_MARWYN_EVENT, IN_PROGRESS);
@@ -82,7 +80,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_MARWYN_EVENT, DONE);
@@ -90,7 +88,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
void UpdateAI(const uint32 diff)
@@ -115,7 +113,7 @@ public:
events.ScheduleEvent(EVENT_WELL_OF_CORRUPTION, 13000);
break;
case EVENT_CORRUPTED_FLESH:
- DoScriptText(RAND(SAY_CORRUPTED_FLESH_1, SAY_CORRUPTED_FLESH_2), me);
+ Talk(SAY_CORRUPTED_FLESH);
DoCast(SPELL_CORRUPTED_FLESH);
events.ScheduleEvent(EVENT_CORRUPTED_FLESH, 20000);
break;
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 4f80fd746ee..c1a3a432407 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
@@ -23,52 +23,54 @@
enum Yells
{
- SAY_JAINA_INTRO_1 = -1668001,
- SAY_JAINA_INTRO_2 = -1668002,
- SAY_JAINA_INTRO_3 = -1668003,
- SAY_JAINA_INTRO_4 = -1668004,
- SAY_UTHER_INTRO_A2_1 = -1668005,
- SAY_JAINA_INTRO_5 = -1668006,
- SAY_UTHER_INTRO_A2_2 = -1668007,
- SAY_JAINA_INTRO_6 = -1668008,
- SAY_UTHER_INTRO_A2_3 = -1668009,
- SAY_JAINA_INTRO_7 = -1668010,
- SAY_UTHER_INTRO_A2_4 = -1668011,
- SAY_JAINA_INTRO_8 = -1668012,
- SAY_UTHER_INTRO_A2_5 = -1668013,
- SAY_JAINA_INTRO_9 = -1668014,
- SAY_UTHER_INTRO_A2_6 = -1668015,
- SAY_UTHER_INTRO_A2_7 = -1668016,
- SAY_JAINA_INTRO_10 = -1668017,
- SAY_UTHER_INTRO_A2_8 = -1668018,
- SAY_JAINA_INTRO_11 = -1668019,
- SAY_UTHER_INTRO_A2_9 = -1668020,
-
- SAY_SYLVANAS_INTRO_1 = -1668021,
- SAY_SYLVANAS_INTRO_2 = -1668022,
- SAY_SYLVANAS_INTRO_3 = -1668023,
- SAY_UTHER_INTRO_H2_1 = -1668024,
- SAY_SYLVANAS_INTRO_4 = -1668025,
- SAY_UTHER_INTRO_H2_2 = -1668026,
- SAY_SYLVANAS_INTRO_5 = -1668027,
- SAY_UTHER_INTRO_H2_3 = -1668028,
- SAY_SYLVANAS_INTRO_6 = -1668029,
- SAY_UTHER_INTRO_H2_4 = -1668030,
- SAY_SYLVANAS_INTRO_7 = -1668031,
- SAY_UTHER_INTRO_H2_5 = -1668032,
- SAY_UTHER_INTRO_H2_6 = -1668033,
- SAY_SYLVANAS_INTRO_8 = -1668034,
- SAY_UTHER_INTRO_H2_7 = -1668035,
-
- SAY_LK_INTRO_1 = -1668036,
- SAY_LK_INTRO_2 = -1668037,
- SAY_LK_INTRO_3 = -1668038,
- SAY_FALRIC_INTRO_1 = -1668039,
- SAY_MARWYN_INTRO_1 = -1668040,
- SAY_FALRIC_INTRO_2 = -1668041,
-
- SAY_JAINA_INTRO_END = -1668042,
- SAY_SYLVANAS_INTRO_END = -1668043,
+ SAY_JAINA_INTRO_1 = 0,
+ SAY_JAINA_INTRO_2 = 1,
+ SAY_JAINA_INTRO_3 = 2,
+ SAY_JAINA_INTRO_4 = 3,
+ SAY_JAINA_INTRO_5 = 4,
+ SAY_JAINA_INTRO_6 = 5,
+ SAY_JAINA_INTRO_7 = 6,
+ SAY_JAINA_INTRO_8 = 7,
+ SAY_JAINA_INTRO_9 = 8,
+ SAY_JAINA_INTRO_10 = 9,
+ SAY_JAINA_INTRO_11 = 10,
+ SAY_JAINA_INTRO_END = 11,
+
+ SAY_SYLVANAS_INTRO_1 = 0,
+ SAY_SYLVANAS_INTRO_2 = 1,
+ SAY_SYLVANAS_INTRO_3 = 2,
+ SAY_SYLVANAS_INTRO_4 = 3,
+ SAY_SYLVANAS_INTRO_5 = 4,
+ SAY_SYLVANAS_INTRO_6 = 5,
+ SAY_SYLVANAS_INTRO_7 = 6,
+ SAY_SYLVANAS_INTRO_8 = 7,
+ SAY_SYLVANAS_INTRO_END = 8,
+
+ SAY_UTHER_INTRO_A2_1 = 0,
+ SAY_UTHER_INTRO_A2_2 = 1,
+ SAY_UTHER_INTRO_A2_3 = 2,
+ SAY_UTHER_INTRO_A2_4 = 3,
+ SAY_UTHER_INTRO_A2_5 = 4,
+ SAY_UTHER_INTRO_A2_6 = 5,
+ SAY_UTHER_INTRO_A2_7 = 6,
+ SAY_UTHER_INTRO_A2_8 = 7,
+ SAY_UTHER_INTRO_A2_9 = 8,
+ SAY_UTHER_INTRO_H2_1 = 9,
+ SAY_UTHER_INTRO_H2_2 = 10,
+ SAY_UTHER_INTRO_H2_3 = 11,
+ SAY_UTHER_INTRO_H2_4 = 12,
+ SAY_UTHER_INTRO_H2_5 = 13,
+ SAY_UTHER_INTRO_H2_6 = 14,
+ SAY_UTHER_INTRO_H2_7 = 15,
+
+ SAY_LK_INTRO_1 = 0,
+ SAY_LK_INTRO_2 = 1,
+ SAY_LK_INTRO_3 = 2,
+
+ SAY_FALRIC_INTRO_1 = 5,
+ SAY_FALRIC_INTRO_2 = 6,
+
+ SAY_MARWYN_INTRO_1 = 4
};
enum Events
@@ -214,8 +216,8 @@ public:
}
InstanceScript* instance;
- uint64 uiUther;
- uint64 uiLichKing;
+ uint64 utherGUID;
+ uint64 lichkingGUID;
EventMap events;
@@ -223,8 +225,8 @@ public:
{
events.Reset();
- uiUther = 0;
- uiLichKing = 0;
+ utherGUID = 0;
+ lichkingGUID = 0;
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
me->SetStandState(UNIT_STAND_STATE_STAND);
@@ -260,11 +262,11 @@ public:
// A2 Intro Events
case EVENT_INTRO_A2_1:
- DoScriptText(SAY_JAINA_INTRO_3, me);
+ Talk(SAY_JAINA_INTRO_3);
events.ScheduleEvent(EVENT_INTRO_A2_2, 5000);
break;
case EVENT_INTRO_A2_2:
- DoScriptText(SAY_JAINA_INTRO_4, me);
+ Talk(SAY_JAINA_INTRO_4);
events.ScheduleEvent(EVENT_INTRO_A2_3, 10000);
break;
case EVENT_INTRO_A2_3:
@@ -274,197 +276,197 @@ public:
break;
case EVENT_INTRO_A2_4:
// spawn UTHER during speach 2
- if (Creature* pUther = me->SummonCreature(NPC_UTHER, UtherSpawnPos, TEMPSUMMON_MANUAL_DESPAWN))
+ if (Creature* uther = me->SummonCreature(NPC_UTHER, UtherSpawnPos, TEMPSUMMON_MANUAL_DESPAWN))
{
- pUther->GetMotionMaster()->MoveIdle();
- pUther->SetReactState(REACT_PASSIVE); // be sure he will not aggro arthas
- uiUther = pUther->GetGUID();
+ uther->GetMotionMaster()->MoveIdle();
+ uther->SetReactState(REACT_PASSIVE); // be sure he will not aggro arthas
+ utherGUID = uther->GetGUID();
}
events.ScheduleEvent(EVENT_INTRO_A2_5, 2000);
break;
case EVENT_INTRO_A2_5:
- if (Creature* pUther = me->GetCreature(*me, uiUther))
- DoScriptText(SAY_UTHER_INTRO_A2_1, pUther);
+ if (Creature* uther = me->GetCreature(*me, utherGUID))
+ uther->AI()->Talk(SAY_UTHER_INTRO_A2_1);
events.ScheduleEvent(EVENT_INTRO_A2_6, 3000);
break;
case EVENT_INTRO_A2_6:
- DoScriptText(SAY_JAINA_INTRO_5, me);
+ Talk(SAY_JAINA_INTRO_5);
events.ScheduleEvent(EVENT_INTRO_A2_7, 6000);
break;
case EVENT_INTRO_A2_7:
- if (Creature* pUther = me->GetCreature(*me, uiUther))
- DoScriptText(SAY_UTHER_INTRO_A2_2, pUther);
+ if (Creature* uther = me->GetCreature(*me, utherGUID))
+ uther->AI()->Talk(SAY_UTHER_INTRO_A2_2);
events.ScheduleEvent(EVENT_INTRO_A2_8, 6500);
break;
case EVENT_INTRO_A2_8:
- DoScriptText(SAY_JAINA_INTRO_6, me);
+ Talk(SAY_JAINA_INTRO_6);
events.ScheduleEvent(EVENT_INTRO_A2_9, 2000);
break;
case EVENT_INTRO_A2_9:
- if (Creature* pUther = me->GetCreature(*me, uiUther))
- DoScriptText(SAY_UTHER_INTRO_A2_3, pUther);
+ if (Creature* uther = me->GetCreature(*me, utherGUID))
+ uther->AI()->Talk(SAY_UTHER_INTRO_A2_3);
events.ScheduleEvent(EVENT_INTRO_A2_10, 9000);
break;
case EVENT_INTRO_A2_10:
- DoScriptText(SAY_JAINA_INTRO_7, me);
+ Talk(SAY_JAINA_INTRO_7);
events.ScheduleEvent(EVENT_INTRO_A2_11, 5000);
break;
case EVENT_INTRO_A2_11:
- if (Creature* pUther = me->GetCreature(*me, uiUther))
- DoScriptText(SAY_UTHER_INTRO_A2_4, pUther);
+ if (Creature* uther = me->GetCreature(*me, utherGUID))
+ uther->AI()->Talk(SAY_UTHER_INTRO_A2_4);
events.ScheduleEvent(EVENT_INTRO_A2_12, 11000);
break;
case EVENT_INTRO_A2_12:
- DoScriptText(SAY_JAINA_INTRO_8, me);
+ Talk(SAY_JAINA_INTRO_8);
events.ScheduleEvent(EVENT_INTRO_A2_13, 4000);
break;
case EVENT_INTRO_A2_13:
- if (Creature* pUther = me->GetCreature(*me, uiUther))
- DoScriptText(SAY_UTHER_INTRO_A2_5, pUther);
+ if (Creature* uther = me->GetCreature(*me, utherGUID))
+ uther->AI()->Talk(SAY_UTHER_INTRO_A2_5);
events.ScheduleEvent(EVENT_INTRO_A2_14, 12500);
break;
case EVENT_INTRO_A2_14:
- DoScriptText(SAY_JAINA_INTRO_9, me);
+ Talk(SAY_JAINA_INTRO_9);
events.ScheduleEvent(EVENT_INTRO_A2_15, 10000);
break;
case EVENT_INTRO_A2_15:
- if (Creature* pUther = me->GetCreature(*me, uiUther))
- DoScriptText(SAY_UTHER_INTRO_A2_6, pUther);
+ if (Creature* uther = me->GetCreature(*me, utherGUID))
+ uther->AI()->Talk(SAY_UTHER_INTRO_A2_6);
events.ScheduleEvent(EVENT_INTRO_A2_16, 22000);
break;
case EVENT_INTRO_A2_16:
- if (Creature* pUther = me->GetCreature(*me, uiUther))
- DoScriptText(SAY_UTHER_INTRO_A2_7, pUther);
+ if (Creature* uther = me->GetCreature(*me, utherGUID))
+ uther->AI()->Talk(SAY_UTHER_INTRO_A2_7);
events.ScheduleEvent(EVENT_INTRO_A2_17, 4000);
break;
case EVENT_INTRO_A2_17:
- DoScriptText(SAY_JAINA_INTRO_10, me);
+ Talk(SAY_JAINA_INTRO_10);
events.ScheduleEvent(EVENT_INTRO_A2_18, 2000);
break;
case EVENT_INTRO_A2_18:
- if (Creature* pUther = me->GetCreature(*me, uiUther))
+ if (Creature* uther = me->GetCreature(*me, utherGUID))
{
- pUther->HandleEmoteCommand(EMOTE_ONESHOT_NO);
- DoScriptText(SAY_UTHER_INTRO_A2_8, pUther);
+ uther->HandleEmoteCommand(EMOTE_ONESHOT_NO);
+ uther->AI()->Talk(SAY_UTHER_INTRO_A2_8);
}
events.ScheduleEvent(EVENT_INTRO_A2_19, 11000);
break;
case EVENT_INTRO_A2_19:
- DoScriptText(SAY_JAINA_INTRO_11, me);
+ Talk(SAY_JAINA_INTRO_11);
events.ScheduleEvent(EVENT_INTRO_LK_1, 2000);
break;
// H2 Intro Events
case EVENT_INTRO_H2_1:
- DoScriptText(SAY_SYLVANAS_INTRO_1, me);
+ Talk(SAY_SYLVANAS_INTRO_1);
events.ScheduleEvent(EVENT_INTRO_H2_2, 8000);
break;
case EVENT_INTRO_H2_2:
- DoScriptText(SAY_SYLVANAS_INTRO_2, me);
+ Talk(SAY_SYLVANAS_INTRO_2);
events.ScheduleEvent(EVENT_INTRO_H2_3, 6000);
break;
case EVENT_INTRO_H2_3:
- DoScriptText(SAY_SYLVANAS_INTRO_3, me);
+ Talk(SAY_SYLVANAS_INTRO_3);
// TODO: she's doing some kind of spell casting emote
events.ScheduleEvent(EVENT_INTRO_H2_4, 6000);
break;
case EVENT_INTRO_H2_4:
// spawn UTHER during speach 2
- if (Creature* pUther = me->SummonCreature(NPC_UTHER, UtherSpawnPos, TEMPSUMMON_MANUAL_DESPAWN))
+ if (Creature* uther = me->SummonCreature(NPC_UTHER, UtherSpawnPos, TEMPSUMMON_MANUAL_DESPAWN))
{
- pUther->GetMotionMaster()->MoveIdle();
- pUther->SetReactState(REACT_PASSIVE); // be sure he will not aggro arthas
- uiUther = pUther->GetGUID();
+ uther->GetMotionMaster()->MoveIdle();
+ uther->SetReactState(REACT_PASSIVE); // be sure he will not aggro arthas
+ utherGUID = uther->GetGUID();
}
events.ScheduleEvent(EVENT_INTRO_H2_5, 2000);
break;
case EVENT_INTRO_H2_5:
- if (Creature* pUther = me->GetCreature(*me, uiUther))
- DoScriptText(SAY_UTHER_INTRO_H2_1, pUther);
+ if (Creature* uther = me->GetCreature(*me, utherGUID))
+ uther->AI()->Talk(SAY_UTHER_INTRO_H2_1);
events.ScheduleEvent(EVENT_INTRO_H2_6, 11000);
break;
case EVENT_INTRO_H2_6:
- DoScriptText(SAY_SYLVANAS_INTRO_4, me);
+ Talk(SAY_SYLVANAS_INTRO_4);
events.ScheduleEvent(EVENT_INTRO_H2_7, 3000);
break;
case EVENT_INTRO_H2_7:
- if (Creature* pUther = me->GetCreature(*me, uiUther))
- DoScriptText(SAY_UTHER_INTRO_H2_2, pUther);
+ if (Creature* uther = me->GetCreature(*me, utherGUID))
+ uther->AI()->Talk(SAY_UTHER_INTRO_H2_2);
events.ScheduleEvent(EVENT_INTRO_H2_8, 6000);
break;
case EVENT_INTRO_H2_8:
- DoScriptText(SAY_SYLVANAS_INTRO_5, me);
+ Talk(SAY_SYLVANAS_INTRO_5);
events.ScheduleEvent(EVENT_INTRO_H2_9, 5000);
break;
case EVENT_INTRO_H2_9:
- if (Creature* pUther = me->GetCreature(*me, uiUther))
- DoScriptText(SAY_UTHER_INTRO_H2_3, pUther);
+ if (Creature* uther = me->GetCreature(*me, utherGUID))
+ uther->AI()->Talk(SAY_UTHER_INTRO_H2_3);
events.ScheduleEvent(EVENT_INTRO_H2_10, 19000);
break;
case EVENT_INTRO_H2_10:
- DoScriptText(SAY_SYLVANAS_INTRO_6, me);
+ Talk(SAY_SYLVANAS_INTRO_6);
events.ScheduleEvent(EVENT_INTRO_H2_11, 1500);
break;
case EVENT_INTRO_H2_11:
- if (Creature* pUther = me->GetCreature(*me, uiUther))
- DoScriptText(SAY_UTHER_INTRO_H2_4, pUther);
+ if (Creature* uther = me->GetCreature(*me, utherGUID))
+ uther->AI()->Talk(SAY_UTHER_INTRO_H2_4);
events.ScheduleEvent(EVENT_INTRO_H2_12, 19500);
break;
case EVENT_INTRO_H2_12:
- DoScriptText(SAY_SYLVANAS_INTRO_7, me);
+ Talk(SAY_SYLVANAS_INTRO_7);
events.ScheduleEvent(EVENT_INTRO_H2_13, 2000);
break;
case EVENT_INTRO_H2_13:
- if (Creature* pUther = me->GetCreature(*me, uiUther))
+ if (Creature* uther = me->GetCreature(*me, utherGUID))
{
- pUther->HandleEmoteCommand(EMOTE_ONESHOT_NO);
- DoScriptText(SAY_UTHER_INTRO_H2_5, pUther);
+ uther->HandleEmoteCommand(EMOTE_ONESHOT_NO);
+ uther->AI()->Talk(SAY_UTHER_INTRO_H2_5);
}
events.ScheduleEvent(EVENT_INTRO_H2_14, 12000);
break;
case EVENT_INTRO_H2_14:
- if (Creature* pUther = me->GetCreature(*me, uiUther))
- DoScriptText(SAY_UTHER_INTRO_H2_6, pUther);
+ if (Creature* uther = me->GetCreature(*me, utherGUID))
+ uther->AI()->Talk(SAY_UTHER_INTRO_H2_6);
events.ScheduleEvent(EVENT_INTRO_H2_15, 8000);
break;
case EVENT_INTRO_H2_15:
- DoScriptText(SAY_SYLVANAS_INTRO_8, me);
+ Talk(SAY_SYLVANAS_INTRO_8);
events.ScheduleEvent(EVENT_INTRO_LK_1, 2000);
break;
// Remaining Intro Events common for both faction
case EVENT_INTRO_LK_1:
// Spawn LK in front of door, and make him move to the sword.
- if (Creature* pLichKing = me->SummonCreature(NPC_LICH_KING_EVENT, LichKingSpawnPos, TEMPSUMMON_MANUAL_DESPAWN))
+ if (Creature* lichking = me->SummonCreature(NPC_LICH_KING_EVENT, LichKingSpawnPos, TEMPSUMMON_MANUAL_DESPAWN))
{
- pLichKing->GetMotionMaster()->MovePoint(0, LichKingMoveThronePos);
- pLichKing->SetReactState(REACT_PASSIVE);
- uiLichKing = pLichKing->GetGUID();
+ lichking->GetMotionMaster()->MovePoint(0, LichKingMoveThronePos);
+ lichking->SetReactState(REACT_PASSIVE);
+ lichkingGUID = lichking->GetGUID();
}
- if (Creature* pUther = me->GetCreature(*me, uiUther))
+ if (Creature* uther = me->GetCreature(*me, utherGUID))
{
if (instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
- DoScriptText(SAY_UTHER_INTRO_A2_9, pUther);
+ uther->AI()->Talk(SAY_UTHER_INTRO_A2_9);
else
- DoScriptText(SAY_UTHER_INTRO_H2_7, pUther);
+ uther->AI()->Talk(SAY_UTHER_INTRO_H2_7);
}
events.ScheduleEvent(EVENT_INTRO_LK_2, 11000);
break;
case EVENT_INTRO_LK_2:
- if (Creature* pLichKing = me->GetCreature(*me, uiLichKing))
- DoScriptText(SAY_LK_INTRO_1, pLichKing);
+ if (Creature* lichking = me->GetCreature(*me, lichkingGUID))
+ lichking->AI()->Talk(SAY_LK_INTRO_1);
events.ScheduleEvent(EVENT_INTRO_LK_3, 2000);
break;
case EVENT_INTRO_LK_3:
// The Lich King banishes Uther to the abyss.
- if (Creature* pUther = me->GetCreature(*me, uiUther))
+ if (Creature* uther = me->GetCreature(*me, utherGUID))
{
- pUther->DisappearAndDie();
- uiUther = 0;
+ uther->DisappearAndDie();
+ utherGUID = 0;
}
// He steps forward and removes the runeblade from the heap of skulls.
@@ -473,8 +475,8 @@ public:
break;
case EVENT_INTRO_LK_4:
- if (Creature* pLichKing = me->GetCreature(*me, uiLichKing))
- DoScriptText(SAY_LK_INTRO_2, pLichKing);
+ if (Creature* lichking = me->GetCreature(*me, lichkingGUID))
+ lichking->AI()->Talk(SAY_LK_INTRO_2);
events.ScheduleEvent(EVENT_INTRO_LK_5, 10000);
break;
@@ -485,41 +487,41 @@ public:
if (Creature* pMarwyn = me->GetCreature(*me, instance->GetData64(DATA_MARWYN)))
pMarwyn->SetVisible(true);
- if (Creature* pLichKing = me->GetCreature(*me, uiLichKing))
+ if (Creature* lichking = me->GetCreature(*me, lichkingGUID))
{
- pLichKing->GetMotionMaster()->MovePoint(0, LichKingSpawnPos);
- DoScriptText(SAY_LK_INTRO_3, pLichKing);
+ lichking->GetMotionMaster()->MovePoint(0, LichKingSpawnPos);
+ lichking->AI()->Talk(SAY_LK_INTRO_3);
}
events.ScheduleEvent(EVENT_INTRO_LK_6, 8000);
break;
case EVENT_INTRO_LK_6:
- if (Creature* pFalric = me->GetCreature(*me, instance->GetData64(DATA_FALRIC)))
- DoScriptText(SAY_FALRIC_INTRO_1, pFalric);
+ if (Creature* falric = me->GetCreature(*me, instance->GetData64(DATA_FALRIC)))
+ falric->AI()->Talk(SAY_FALRIC_INTRO_1);
events.ScheduleEvent(EVENT_INTRO_LK_7, 2000);
break;
case EVENT_INTRO_LK_7:
- if (Creature* pMarwyn = me->GetCreature(*me, instance->GetData64(DATA_MARWYN)))
- DoScriptText(SAY_MARWYN_INTRO_1, pMarwyn);
+ if (Creature* marwyn = me->GetCreature(*me, instance->GetData64(DATA_MARWYN)))
+ marwyn->AI()->Talk(SAY_MARWYN_INTRO_1);
events.ScheduleEvent(EVENT_INTRO_LK_8, 2000);
break;
case EVENT_INTRO_LK_8:
- if (Creature* pFalric = me->GetCreature(*me, instance->GetData64(DATA_FALRIC)))
- DoScriptText(SAY_FALRIC_INTRO_2, pFalric);
+ if (Creature* falric = me->GetCreature(*me, instance->GetData64(DATA_FALRIC)))
+ falric->AI()->Talk(SAY_FALRIC_INTRO_2);
events.ScheduleEvent(EVENT_INTRO_LK_9, 5000);
break;
case EVENT_INTRO_LK_9:
if (instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
- DoScriptText(SAY_JAINA_INTRO_END, me);
+ Talk(SAY_JAINA_INTRO_END);
else
- DoScriptText(SAY_SYLVANAS_INTRO_END, me);
+ Talk(SAY_SYLVANAS_INTRO_END);
me->GetMotionMaster()->MovePoint(0, LichKingSpawnPos);
// TODO: Loralen/Koreln shall run also
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 cdc21eb25ec..e8557482420 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp
@@ -23,15 +23,15 @@
enum Yells
{
- SAY_AGGRO = 0,
- SAY_PHASE2 = 1,
- SAY_PHASE3 = 2,
- SAY_DEATH = 3,
- SAY_SLAY = 4,
- SAY_THROW_SARONITE = 5,
- SAY_CAST_DEEP_FREEZE = 6,
-
- SAY_TYRANNUS_DEATH = -1658007, // todo
+ SAY_AGGRO = 0,
+ SAY_PHASE2 = 1,
+ SAY_PHASE3 = 2,
+ SAY_DEATH = 3,
+ SAY_SLAY = 4,
+ SAY_THROW_SARONITE = 5,
+ SAY_CAST_DEEP_FREEZE = 6,
+
+ SAY_TYRANNUS_DEATH = 0
};
enum Spells
@@ -48,16 +48,6 @@ enum Spells
#define SPELL_PERMAFROST_HELPER RAID_MODE<uint32>(68786, 70336)
#define SPELL_FORGE_BLADE_HELPER RAID_MODE<uint32>(68774, 70334)
-enum Events
-{
- EVENT_THROW_SARONITE = 1,
- EVENT_CHILLING_WAVE = 2,
- EVENT_DEEP_FREEZE = 3,
- EVENT_JUMP = 4,
- EVENT_FORGING = 5,
- EVENT_RESUME_ATTACK = 6,
-};
-
enum Phases
{
PHASE_ONE = 1,
@@ -82,6 +72,15 @@ Position const southForgePos = {639.257f, -210.1198f, 529.015f, 0.523599f};
class boss_garfrost : public CreatureScript
{
+enum Events
+{
+ EVENT_THROW_SARONITE = 1,
+ EVENT_CHILLING_WAVE = 2,
+ EVENT_DEEP_FREEZE = 3,
+ EVENT_JUMP = 4,
+ EVENT_FORGING = 5,
+ EVENT_RESUME_ATTACK = 6,
+};
public:
boss_garfrost() : CreatureScript("boss_garfrost") { }
@@ -130,7 +129,7 @@ class boss_garfrost : public CreatureScript
Talk(SAY_DEATH);
if (Creature* tyrannus = me->GetCreature(*me, instance->GetData64(DATA_TYRANNUS)))
- DoScriptText(SAY_TYRANNUS_DEATH, tyrannus);
+ tyrannus->AI()->Talk(SAY_TYRANNUS_DEATH);
instance->SetBossState(DATA_GARFROST, DONE);
}
diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp
index 41cfc300958..ed196d2cd0c 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp
@@ -48,33 +48,30 @@ enum Spells
enum Yells
{
// Krick
- SAY_KRICK_AGGRO = -1658010,
- SAY_KRICK_SLAY_1 = -1658011,
- SAY_KRICK_SLAY_2 = -1658012,
- SAY_KRICK_BARRAGE_1 = -1658013,
- SAY_KRICK_BARRAGE_2 = -1658014,
- SAY_KRICK_POISON_NOVA = -1658015,
- SAY_KRICK_CHASE_1 = -1658016,
- SAY_KRICK_CHASE_2 = -1658017,
- SAY_KRICK_CHASE_3 = -1658018,
+ SAY_KRICK_AGGRO = 0,
+ SAY_KRICK_SLAY = 1,
+ SAY_KRICK_BARRAGE_1 = 2,
+ SAY_KRICK_BARRAGE_2 = 3,
+ SAY_KRICK_POISON_NOVA = 4,
+ SAY_KRICK_CHASE = 5,
+ SAY_KRICK_OUTRO_1 = 6,
+ SAY_KRICK_OUTRO_3 = 7,
+ SAY_KRICK_OUTRO_5 = 8,
+ SAY_KRICK_OUTRO_8 = 9,
// Ick
- SAY_ICK_POISON_NOVA = -1658020,
- SAY_ICK_CHASE_1 = -1658021,
+ SAY_ICK_POISON_NOVA = 0,
+ SAY_ICK_CHASE_1 = 1,
// OUTRO
- SAY_KRICK_OUTRO_1 = -1658030,
- SAY_JAYNA_OUTRO_2 = -1658031,
- SAY_SYLVANAS_OUTRO_2 = -1658032,
- SAY_KRICK_OUTRO_3 = -1658033,
- SAY_JAYNA_OUTRO_4 = -1658034,
- SAY_SYLVANAS_OUTRO_4 = -1658035,
- SAY_KRICK_OUTRO_5 = -1658036,
- SAY_TYRANNUS_OUTRO_7 = -1658037,
- SAY_KRICK_OUTRO_8 = -1658038,
- SAY_TYRANNUS_OUTRO_9 = -1658039,
- SAY_JAYNA_OUTRO_10 = -1658040,
- SAY_SYLVANAS_OUTRO_10 = -1658041,
+ SAY_JAYNA_OUTRO_2 = 0,
+ SAY_JAYNA_OUTRO_4 = 1,
+ SAY_JAYNA_OUTRO_10 = 2,
+ SAY_SYLVANAS_OUTRO_2 = 0,
+ SAY_SYLVANAS_OUTRO_4 = 1,
+ SAY_SYLVANAS_OUTRO_10 = 2,
+ SAY_TYRANNUS_OUTRO_7 = 1,
+ SAY_TYRANNUS_OUTRO_9 = 2,
};
enum Events
@@ -167,7 +164,7 @@ class boss_ick : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
if (Creature* krick = GetKrick())
- DoScriptText(SAY_KRICK_AGGRO, krick);
+ krick->AI()->Talk(SAY_KRICK_AGGRO);
events.ScheduleEvent(EVENT_MIGHTY_KICK, 20000);
events.ScheduleEvent(EVENT_TOXIC_WASTE, 5000);
@@ -250,8 +247,8 @@ class boss_ick : public CreatureScript
case EVENT_EXPLOSIVE_BARRAGE:
if (Creature* krick = GetKrick())
{
- DoScriptText(SAY_KRICK_BARRAGE_1, krick);
- DoScriptText(SAY_KRICK_BARRAGE_2, krick);
+ krick->AI()->Talk(SAY_KRICK_BARRAGE_1);
+ krick->AI()->Talk(SAY_KRICK_BARRAGE_2);
krick->CastSpell(krick, SPELL_EXPLOSIVE_BARRAGE_KRICK, true);
DoCast(me, SPELL_EXPLOSIVE_BARRAGE_ICK);
}
@@ -259,14 +256,14 @@ class boss_ick : public CreatureScript
break;
case EVENT_POISON_NOVA:
if (Creature* krick = GetKrick())
- DoScriptText(SAY_KRICK_POISON_NOVA, krick);
+ krick->AI()->Talk(SAY_KRICK_POISON_NOVA);
- DoScriptText(SAY_ICK_POISON_NOVA, me);
+ Talk(SAY_ICK_POISON_NOVA);
DoCast(me, SPELL_POISON_NOVA);
break;
case EVENT_PURSUIT:
if (Creature* krick = GetKrick())
- DoScriptText(RAND(SAY_KRICK_CHASE_1, SAY_KRICK_CHASE_2, SAY_KRICK_CHASE_3), krick);
+ krick->AI()->Talk(SAY_KRICK_CHASE);
DoCast(me, SPELL_PURSUIT);
break;
default:
@@ -328,7 +325,7 @@ class boss_krick : public CreatureScript
if (victim == me)
return;
- DoScriptText(RAND(SAY_KRICK_SLAY_1, SAY_KRICK_SLAY_2), me);
+ Talk(SAY_KRICK_SLAY);
}
void JustSummoned(Creature* summon)
@@ -362,7 +359,7 @@ class boss_krick : public CreatureScript
if (type != POINT_MOTION_TYPE || id != POINT_KRICK_INTRO)
return;
- DoScriptText(SAY_KRICK_OUTRO_1, me);
+ Talk(SAY_KRICK_OUTRO_1);
_phase = PHASE_OUTRO;
_events.Reset();
_events.ScheduleEvent(EVENT_OUTRO_1, 1000);
@@ -404,28 +401,28 @@ class boss_krick : public CreatureScript
jainaOrSylvanas->SetFacingToObject(me);
me->SetFacingToObject(jainaOrSylvanas);
if (_instanceScript->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
- DoScriptText(SAY_JAYNA_OUTRO_2, jainaOrSylvanas);
+ jainaOrSylvanas->AI()->Talk(SAY_JAYNA_OUTRO_2);
else
- DoScriptText(SAY_SYLVANAS_OUTRO_2, jainaOrSylvanas);
+ jainaOrSylvanas->AI()->Talk(SAY_SYLVANAS_OUTRO_2);
}
_events.ScheduleEvent(EVENT_OUTRO_3, 5000);
break;
case EVENT_OUTRO_3:
- DoScriptText(SAY_KRICK_OUTRO_3, me);
+ Talk(SAY_KRICK_OUTRO_3);
_events.ScheduleEvent(EVENT_OUTRO_4, 18000);
break;
case EVENT_OUTRO_4:
if (Creature* jainaOrSylvanas = ObjectAccessor::GetCreature(*me, _outroNpcGUID))
{
if (_instanceScript->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
- DoScriptText(SAY_JAYNA_OUTRO_4, jainaOrSylvanas);
+ jainaOrSylvanas->AI()->Talk(SAY_JAYNA_OUTRO_4);
else
- DoScriptText(SAY_SYLVANAS_OUTRO_4, jainaOrSylvanas);
+ jainaOrSylvanas->AI()->Talk(SAY_SYLVANAS_OUTRO_4);
}
_events.ScheduleEvent(EVENT_OUTRO_5, 5000);
break;
case EVENT_OUTRO_5:
- DoScriptText(SAY_KRICK_OUTRO_5, me);
+ Talk(SAY_KRICK_OUTRO_5);
_events.ScheduleEvent(EVENT_OUTRO_6, 1000);
break;
case EVENT_OUTRO_6:
@@ -439,7 +436,7 @@ class boss_krick : public CreatureScript
break;
case EVENT_OUTRO_7:
if (Creature* tyrannus = ObjectAccessor::GetCreature(*me, _tyrannusGUID))
- DoScriptText(SAY_TYRANNUS_OUTRO_7, tyrannus);
+ tyrannus->AI()->Talk(SAY_TYRANNUS_OUTRO_7);
_events.ScheduleEvent(EVENT_OUTRO_8, 5000);
break;
case EVENT_OUTRO_8:
@@ -450,7 +447,7 @@ class boss_krick : public CreatureScript
_events.ScheduleEvent(EVENT_OUTRO_9, 2000);
break;
case EVENT_OUTRO_9:
- DoScriptText(SAY_KRICK_OUTRO_8, me);
+ Talk(SAY_KRICK_OUTRO_8);
// TODO: Tyrannus starts killing Krick.
// there shall be some visual spell effect
if (Creature* tyrannus = ObjectAccessor::GetCreature(*me, _tyrannusGUID))
@@ -472,16 +469,16 @@ class boss_krick : public CreatureScript
break;
case EVENT_OUTRO_12:
if (Creature* tyrannus = ObjectAccessor::GetCreature(*me, _tyrannusGUID))
- DoScriptText(SAY_TYRANNUS_OUTRO_9, tyrannus);
+ tyrannus->AI()->Talk(SAY_TYRANNUS_OUTRO_9);
_events.ScheduleEvent(EVENT_OUTRO_13, 2000);
break;
case EVENT_OUTRO_13:
if (Creature* jainaOrSylvanas = ObjectAccessor::GetCreature(*me, _outroNpcGUID))
{
if (_instanceScript->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
- DoScriptText(SAY_JAYNA_OUTRO_10, jainaOrSylvanas);
+ jainaOrSylvanas->AI()->Talk(SAY_JAYNA_OUTRO_10);
else
- DoScriptText(SAY_SYLVANAS_OUTRO_10, jainaOrSylvanas);
+ jainaOrSylvanas->AI()->Talk(SAY_SYLVANAS_OUTRO_10);
}
// End of OUTRO. for now...
_events.ScheduleEvent(EVENT_OUTRO_END, 3000);
@@ -636,19 +633,18 @@ class spell_krick_pursuit : public SpellScriptLoader
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
{
- if (GetCaster()->GetTypeId() != TYPEID_UNIT)
- return;
-
- Unit* caster = GetCaster();
- CreatureAI* ickAI = caster->ToCreature()->AI();
- if (Unit* target = ickAI->SelectTarget(SELECT_TARGET_RANDOM, 0, 200.0f, true))
- {
- DoScriptText(SAY_ICK_CHASE_1, caster, target);
- caster->AddAura(GetSpellInfo()->Id, target);
- CAST_AI(boss_ick::boss_ickAI, ickAI)->SetTempThreat(caster->getThreatManager().getThreat(target));
- caster->AddThreat(target, float(GetEffectValue()));
- target->AddThreat(caster, float(GetEffectValue()));
- }
+ if (GetCaster())
+ if (Creature* ick = GetCaster()->ToCreature())
+ {
+ if (Unit* target = ick->AI()->SelectTarget(SELECT_TARGET_RANDOM, 0, 200.0f, true))
+ {
+ ick->AI()->Talk(SAY_ICK_CHASE_1, target->GetGUID());
+ ick->AddAura(GetSpellInfo()->Id, target);
+ CAST_AI(boss_ick::boss_ickAI, ick->AI())->SetTempThreat(ick->getThreatManager().getThreat(target));
+ ick->AddThreat(target, float(GetEffectValue()));
+ target->AddThreat(ick, float(GetEffectValue()));
+ }
+ }
}
void Register()
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 44d9230a8d2..51eca327810 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp
@@ -25,32 +25,36 @@
enum Yells
{
- SAY_AMBUSH_1 = -1658050,
- SAY_AMBUSH_2 = -1658051,
- SAY_GAUNTLET_START = -1658052,
- SAY_TYRANNUS_INTRO_1 = -1658053,
- SAY_GORKUN_INTRO_2 = -1658054,
- SAY_TYRANNUS_INTRO_3 = -1658055,
-
- SAY_AGGRO = -1658056,
- SAY_SLAY_1 = -1658057,
- SAY_SLAY_2 = -1658058,
- SAY_DEATH = -1658059,
- SAY_MARK_RIMEFANG_1 = -1658060,
- SAY_MARK_RIMEFANG_2 = -1658061,
- SAY_DARK_MIGHT_1 = -1658062,
- SAY_DARK_MIGHT_2 = -1658063,
-
- SAY_GORKUN_OUTRO_1 = -1658064,
- SAY_GORKUN_OUTRO_2 = -1658065,
- SAY_JAYNA_OUTRO_3 = -1658066,
- SAY_SYLVANAS_OUTRO_3 = -1658067,
- SAY_JAYNA_OUTRO_4 = -1658068,
- SAY_SYLVANAS_OUTRO_4 = -1658069,
- SAY_JAYNA_OUTRO_5 = -1658070,
+ //Gorkun
+ SAY_GORKUN_INTRO_2 = 0,
+ SAY_GORKUN_OUTRO_1 = 1,
+ SAY_GORKUN_OUTRO_2 = 2,
+
+ //Tyrannus
+ SAY_AMBUSH_1 = 3,
+ SAY_AMBUSH_2 = 4,
+ SAY_GAUNTLET_START = 5,
+ SAY_TYRANNUS_INTRO_1 = 6,
+ SAY_TYRANNUS_INTRO_3 = 7,
+ SAY_AGGRO = 8,
+ SAY_SLAY = 9,
+ SAY_DEATH = 10,
+ SAY_MARK_RIMEFANG_1 = 11,
+ SAY_MARK_RIMEFANG_2 = 12,
+ SAY_DARK_MIGHT_1 = 13,
+ SAY_DARK_MIGHT_2 = 14,
+
+ //Jaina
+ SAY_JAYNA_OUTRO_3 = 3,
+ SAY_JAYNA_OUTRO_4 = 4,
+ SAY_JAYNA_OUTRO_5 = 5,
+
+ //Sylvanas
+ SAY_SYLVANAS_OUTRO_3 = 3,
+ SAY_SYLVANAS_OUTRO_4 = 4
};
-enum Spells
+enum Spelsl
{
SPELL_OVERLORD_BRAND = 69172,
SPELL_OVERLORD_BRAND_HEAL = 69190,
@@ -156,7 +160,7 @@ class boss_tyrannus : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void AttackStart(Unit* victim)
@@ -180,12 +184,12 @@ class boss_tyrannus : public CreatureScript
void KilledUnit(Unit* victim)
{
if (victim->GetTypeId() == TYPEID_PLAYER)
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
instance->SetBossState(DATA_TYRANNUS, DONE);
// Prevent corpse despawning
@@ -201,7 +205,7 @@ class boss_tyrannus : public CreatureScript
{
if (actionId == ACTION_START_INTRO)
{
- DoScriptText(SAY_TYRANNUS_INTRO_1, me);
+ Talk(SAY_TYRANNUS_INTRO_1);
events.SetPhase(PHASE_INTRO);
events.ScheduleEvent(EVENT_INTRO_1, 14000, 0, PHASE_INTRO);
events.ScheduleEvent(EVENT_INTRO_2, 22000, 0, PHASE_INTRO);
@@ -223,10 +227,10 @@ class boss_tyrannus : public CreatureScript
switch (eventId)
{
case EVENT_INTRO_1:
- //DoScriptText(SAY_GORKUN_INTRO_2, pGorkunOrVictus);
+ //Talk(SAY_GORKUN_INTRO_2, pGorkunOrVictus);
break;
case EVENT_INTRO_2:
- DoScriptText(SAY_TYRANNUS_INTRO_3, me);
+ Talk(SAY_TYRANNUS_INTRO_3);
break;
case EVENT_INTRO_3:
me->ExitVehicle();
@@ -254,16 +258,16 @@ class boss_tyrannus : public CreatureScript
events.ScheduleEvent(EVENT_UNHOLY_POWER, 1000);
break;
case EVENT_UNHOLY_POWER:
- DoScriptText(SAY_DARK_MIGHT_1, me);
- DoScriptText(SAY_DARK_MIGHT_2, me);
+ Talk(SAY_DARK_MIGHT_1);
+ Talk(SAY_DARK_MIGHT_2);
DoCast(me, SPELL_UNHOLY_POWER);
events.ScheduleEvent(EVENT_FORCEFUL_SMASH, urand(40000, 48000));
break;
case EVENT_MARK_OF_RIMEFANG:
- DoScriptText(SAY_MARK_RIMEFANG_1, me);
+ Talk(SAY_MARK_RIMEFANG_1);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true))
{
- DoScriptText(SAY_MARK_RIMEFANG_2, me, target);
+ Talk(SAY_MARK_RIMEFANG_2, target->GetGUID());
DoCast(target, SPELL_MARK_OF_RIMEFANG);
}
events.ScheduleEvent(EVENT_MARK_OF_RIMEFANG, urand(24000, 26000));
diff --git a/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp b/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp
index 595331d99d7..a7933fed046 100644
--- a/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp
+++ b/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp
@@ -38,16 +38,12 @@ enum Spells
//Yells
enum Yells
{
- SAY_AGGRO = -1604000,
- SAY_SLAY_1 = -1604001,
- SAY_SLAY_2 = -1604002,
- SAY_SLAY_3 = -1604003,
- SAY_DEATH = -1604004,
- SAY_SUMMON_RHINO_1 = -1604005,
- SAY_SUMMON_RHINO_2 = -1604006,
- SAY_SUMMON_RHINO_3 = -1604007,
- SAY_TRANSFORM_1 = -1604008, //Phase change
- SAY_TRANSFORM_2 = -1604009
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_SUMMON_RHINO = 3,
+ SAY_TRANSFORM_1 = 4,
+ SAY_TRANSFORM_2 = 5
};
enum Displays
@@ -125,7 +121,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_GAL_DARAH_EVENT, IN_PROGRESS);
@@ -146,7 +142,7 @@ public:
me->SetDisplayId(DISPLAY_RHINO);
Phase = RHINO;
uiPhaseCounter = 0;
- DoScriptText(SAY_TRANSFORM_1, me);
+ Talk(SAY_TRANSFORM_1);
uiTransformationTimer = 5*IN_MILLISECONDS;
bStartOfTransformation = true;
me->ClearUnitState(UNIT_STATE_STUNNED|UNIT_STATE_ROOT);
@@ -169,7 +165,7 @@ public:
if (uiStampedeTimer <= diff)
{
DoCast(me, SPELL_STAMPEDE);
- DoScriptText(RAND(SAY_SUMMON_RHINO_1, SAY_SUMMON_RHINO_2, SAY_SUMMON_RHINO_3), me);
+ Talk(SAY_SUMMON_RHINO);
uiStampedeTimer = 15*IN_MILLISECONDS;
} else uiStampedeTimer -= diff;
@@ -189,7 +185,7 @@ public:
me->SetDisplayId(DISPLAY_TROLL);
Phase = TROLL;
uiPhaseCounter = 0;
- DoScriptText(SAY_TRANSFORM_2, me);
+ Talk(SAY_TRANSFORM_2);
uiTransformationTimer = 9*IN_MILLISECONDS;
bStartOfTransformation = true;
me->ClearUnitState(UNIT_STATE_STUNNED|UNIT_STATE_ROOT);
@@ -268,7 +264,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_GAL_DARAH_EVENT, DONE);
@@ -279,7 +275,7 @@ public:
if (victim == me)
return;
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me);
+ Talk(SAY_SLAY);
}
};
diff --git a/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp b/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp
index 45c55f7ec9b..d5e10aedd70 100644
--- a/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp
+++ b/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp
@@ -34,14 +34,12 @@ enum eSpells
enum eSays
{
- SAY_AGGRO = -1604010,
- //SAY_SLAY_1 = -1604011, // not in db
- SAY_SLAY_2 = -1604012,
- SAY_SLAY_3 = -1604013,
- SAY_DEATH = -1604014,
- SAY_TRANSFORM = -1604015,
- SAY_QUAKE = -1604016,
- EMOTE_TRANSFORM = -1604017
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_TRANSFORM = 3,
+ SAY_QUAKE = 4,
+ EMOTE_TRANSFORM = 5
};
#define DATA_LESS_RABI 1
@@ -86,7 +84,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
DoCast(me, SPELL_MOJO_FRENZY, true);
if (instance)
@@ -107,7 +105,7 @@ public:
if (uiGroundTremorTimer <= uiDiff)
{
- DoScriptText(SAY_QUAKE, me);
+ Talk(SAY_QUAKE);
if (bPhase)
DoCast(me->getVictim(), SPELL_QUAKE, true);
else
@@ -135,8 +133,8 @@ public:
if (!bPhase && uiTransformationTImer <= uiDiff)
{
- DoScriptText(EMOTE_TRANSFORM, me);
- DoScriptText(SAY_TRANSFORM, me);
+ Talk(EMOTE_TRANSFORM);
+ Talk(SAY_TRANSFORM);
DoCast(me, SPELL_TRANSFORMATION, false);
uiTransformationTImer = 10*IN_MILLISECONDS;
} else uiTransformationTImer -= uiDiff;
@@ -154,7 +152,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_MOORABI_EVENT, DONE);
@@ -165,7 +163,7 @@ public:
if (victim == me)
return;
- DoScriptText(RAND(SAY_SLAY_2, SAY_SLAY_3), me);
+ Talk(SAY_SLAY);
}
};
diff --git a/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp b/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp
index f35228d44d9..cdbce68e337 100644
--- a/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp
+++ b/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp
@@ -35,13 +35,12 @@ enum Spells
//Yell
enum Yells
{
- SAY_AGGRO = -1604017,
- SAY_SLAY_1 = -1604018,
- SAY_SLAY_2 = -1604019,
- SAY_SLAY_3 = -1604020,
- SAY_DEATH = -1604021,
- SAY_SUMMON_SNAKES = -1604022,
- SAY_SUMMON_CONSTRICTORS = -1604023
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_SUMMON_SNAKES = 3,
+ SAY_SUMMON_CONSTRICTORS = 4,
+ EMOTE_NOVA = 5
};
//Creatures
@@ -117,7 +116,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_SLAD_RAN_EVENT, IN_PROGRESS);
@@ -132,6 +131,7 @@ public:
if (uiPoisonNovaTimer <= diff)
{
DoCast(me->getVictim(), SPELL_POISON_NOVA);
+ Talk(EMOTE_NOVA);
uiPoisonNovaTimer = 15*IN_MILLISECONDS;
} else uiPoisonNovaTimer -= diff;
@@ -163,13 +163,13 @@ public:
if (uiPhase == 0 && HealthBelowPct(30))
{
- DoScriptText(SAY_SUMMON_SNAKES, me);
+ Talk(SAY_SUMMON_SNAKES);
uiPhase = 1;
}
if (uiPhase == 1 && HealthBelowPct(25))
{
- DoScriptText(SAY_SUMMON_CONSTRICTORS, me);
+ Talk(SAY_SUMMON_CONSTRICTORS);
uiPhase = 2;
}
@@ -178,7 +178,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
lSummons.DespawnAll();
if (instance)
@@ -187,7 +187,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me);
+ Talk(SAY_SLAY);
}
void JustSummoned(Creature* summoned)
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 0d092ec86b2..2b240bc93d8 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
@@ -37,6 +37,7 @@ enum Texts
SAY_WIPE = 9,
SAY_BERSERK = 10,
SAY_DEATH = 11,
+ EMOTE_BERSERK_RAID = 12
};
enum Spells
@@ -336,7 +337,7 @@ class boss_blood_queen_lana_thel : public CreatureScript
switch (eventId)
{
case EVENT_BERSERK:
- DoScriptText(EMOTE_GENERIC_BERSERK_RAID, me);
+ Talk(EMOTE_BERSERK_RAID);
Talk(SAY_BERSERK);
DoCast(me, SPELL_BERSERK);
break;
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
index 9ee4bcea4d9..9ee4bcea4d9 100755..100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp
index 9c0f2139b1b..9c0f2139b1b 100755..100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
index 8e7f891663e..8e7f891663e 100755..100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
index 263d70c6a50..263d70c6a50 100755..100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
index 4727504a4bd..4727504a4bd 100755..100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
index a12a38b2f62..96cabfed918 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
@@ -36,6 +36,7 @@ enum Texts
// A flaw of mortality...
SAY_BERSERK = 9, // Enough! I tire of these games!
SAY_DEATH = 10, // Free...at last...
+ EMOTE_BERSERK_RAID = 11
};
enum Spells
@@ -440,7 +441,7 @@ class boss_sindragosa : public CreatureScript
switch (eventId)
{
case EVENT_BERSERK:
- DoScriptText(EMOTE_GENERIC_BERSERK_RAID, me);
+ Talk(EMOTE_BERSERK_RAID);
Talk(SAY_BERSERK);
DoCast(me, SPELL_BERSERK);
break;
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h
index 4e117d9f3e3..4e117d9f3e3 100755..100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h
+++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp
index 7ff995d4bcf..7ff995d4bcf 100755..100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
index 89d7b0f764d..89d7b0f764d 100755..100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp b/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp
index 8901a61e79d..61ce8817b17 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp
@@ -19,11 +19,14 @@
#include "ScriptedCreature.h"
#include "naxxramas.h"
-#define SAY_GREET RAND(-1533000, -1533004, -1533005, -1533006, -1533007)
-#define SAY_AGGRO RAND(-1533001, -1533002, -1533003)
-#define SAY_SLAY -1533008
+enum Anubrekhan
+{
+ SAY_AGGRO = 0,
+ SAY_GREET = 1,
+ SAY_SLAY = 2,
-#define MOB_CRYPT_GUARD 16573
+ MOB_CRYPT_GUARD = 16573
+};
const Position GuardSummonPos = {3333.72f, -3476.30f, 287.1f, 6.2801f};
@@ -97,7 +100,7 @@ public:
if (victim->GetTypeId() == TYPEID_PLAYER)
victim->CastSpell(victim, SPELL_SUMMON_CORPSE_SCARABS_PLR, true, NULL, NULL, me->GetGUID());
- DoScriptText(SAY_SLAY, me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
@@ -111,7 +114,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
events.ScheduleEvent(EVENT_IMPALE, urand(10000, 20000));
events.ScheduleEvent(EVENT_LOCUST, 90000);
events.ScheduleEvent(EVENT_BERSERK, 600000);
@@ -124,7 +127,7 @@ public:
{
if (!hasTaunted && me->IsWithinDistInMap(who, 60.0f) && who->GetTypeId() == TYPEID_PLAYER)
{
- DoScriptText(SAY_GREET, me);
+ Talk(SAY_GREET);
hasTaunted = true;
}
ScriptedAI::MoveInLineOfSight(who);
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp b/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp
index a75f87e91af..58db1d9caea 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp
@@ -22,14 +22,10 @@
enum Yells
{
- SAY_GREET = -1533009,
- SAY_AGGRO_1 = -1533010,
- SAY_AGGRO_2 = -1533011,
- SAY_AGGRO_3 = -1533012,
- SAY_AGGRO_4 = -1533013,
- SAY_SLAY_1 = -1533014,
- SAY_SLAY_2 = -1533015,
- SAY_DEATH = -1533016
+ SAY_GREET = 0,
+ SAY_AGGRO = 1,
+ SAY_SLAY = 2,
+ SAY_DEATH = 3
};
enum Spells
@@ -71,7 +67,7 @@ class boss_faerlina : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3, SAY_AGGRO_4), me);
+ Talk(SAY_AGGRO);
events.ScheduleEvent(EVENT_POISON, urand(10000, 15000));
events.ScheduleEvent(EVENT_FIRE, urand(6000, 18000));
events.ScheduleEvent(EVENT_FRENZY, urand(60000, 80000));
@@ -88,7 +84,7 @@ class boss_faerlina : public CreatureScript
{
if (!_introDone && who->GetTypeId() == TYPEID_PLAYER)
{
- DoScriptText(SAY_GREET, me);
+ Talk(SAY_GREET);
_introDone = true;
}
@@ -98,13 +94,13 @@ class boss_faerlina : public CreatureScript
void KilledUnit(Unit* /*victim*/)
{
if (!urand(0, 2))
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
_JustDied();
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void SpellHit(Unit* caster, SpellInfo const* spell)
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp
index 29a0a11af9b..7785044e7d1 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp
@@ -73,17 +73,14 @@ const uint32 SPELL_SECONDARY_H[]= {0, 57464, 0, 57465};
const uint32 SPELL_PUNISH[] = {0, 57381, 0, 57377};
#define SPELL_BERSERK 26662
-// used by 16063, 16064, 16065, 30549, but signed for 16063
-const int32 SAY_AGGRO[] = {-1533051, -1533044, -1533065, -1533058};
-const int32 SAY_TAUNT[3][4] ={ {-1533052, -1533045, -1533071, -1533059},
- {-1533053, -1533046, -1533072, -1533060},
- {-1533054, -1533047, -1533073, -1533061}, };
-const int32 SAY_SPECIAL[] = {-1533055, -1533048, -1533070, -1533062};
-const int32 SAY_SLAY[] = {-1533056, -1533049, -1533068, -1533063};
-const int32 SAY_DEATH[] = {-1533057, -1533050, -1533074, -1533064};
-
-#define SAY_BARON_AGGRO RAND(-1533065, -1533066, -1533067)
-#define SAY_BARON_SLAY RAND(-1533068, -1533069)
+enum FourHorsemen
+{
+ SAY_AGGRO = 0,
+ SAY_TAUNT = 1,
+ SAY_SPECIAL = 2,
+ SAY_SLAY = 3,
+ SAY_DEATH = 4
+};
class boss_four_horsemen : public CreatureScript
{
@@ -295,12 +292,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
if (!(rand()%5))
- {
- if (id == HORSEMEN_BARON)
- DoScriptText(SAY_BARON_SLAY, me);
- else
- DoScriptText(SAY_SLAY[id], me);
- }
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
@@ -321,17 +313,13 @@ public:
instance->DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, 59450);
}
- DoScriptText(SAY_DEATH[id], me);
+ Talk(SAY_DEATH);
}
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
-
- if (id == HORSEMEN_BARON)
- DoScriptText(SAY_BARON_AGGRO, me);
- else
- DoScriptText(SAY_AGGRO[id], me);
+ Talk(SAY_AGGRO);
events.ScheduleEvent(EVENT_MARK, 15000);
events.ScheduleEvent(EVENT_CAST, 20000+rand()%5000);
@@ -360,13 +348,13 @@ public:
{
case EVENT_MARK:
if (!(rand()%5))
- DoScriptText(SAY_SPECIAL[id], me);
+ Talk(SAY_SPECIAL);
DoCastAOE(SPELL_MARK[id]);
events.ScheduleEvent(EVENT_MARK, 15000);
break;
case EVENT_CAST:
if (!(rand()%5))
- DoScriptText(SAY_TAUNT[rand()%3][id], me);
+ Talk(SAY_TAUNT);
if (caster)
{
@@ -379,7 +367,7 @@ public:
events.ScheduleEvent(EVENT_CAST, 15000);
break;
case EVENT_BERSERK:
- DoScriptText(SAY_SPECIAL[id], me);
+ Talk(SAY_SPECIAL);
DoCast(me, EVENT_BERSERK);
break;
}
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp
index d335d36e112..14043f00939 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp
@@ -24,10 +24,10 @@
enum Yells
{
- SAY_SPEECH = -1533040,
- SAY_KILL = -1533041,
- SAY_DEATH = -1533042,
- SAY_TELEPORT = -1533043
+ SAY_SPEECH = 0,
+ SAY_KILL = 1,
+ SAY_DEATH = 2,
+ SAY_TELEPORT = 3
};
//Gothik
@@ -209,7 +209,7 @@ class boss_gothik : public CreatureScript
waveCount = 0;
events.ScheduleEvent(EVENT_SUMMON, 30000);
DoTeleportTo(PosPlatform);
- DoScriptText(SAY_SPEECH, me);
+ Talk(SAY_SPEECH);
if (instance)
instance->SetData(DATA_GOTHIK_GATE, GO_STATE_READY);
}
@@ -239,7 +239,7 @@ class boss_gothik : public CreatureScript
void KilledUnit(Unit* /*victim*/)
{
if (!(rand()%5))
- DoScriptText(SAY_KILL, me);
+ Talk(SAY_KILL);
}
void JustDied(Unit* /*killer*/)
@@ -247,7 +247,7 @@ class boss_gothik : public CreatureScript
LiveTriggerGUID.clear();
DeadTriggerGUID.clear();
_JustDied();
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_GOTHIK_GATE, GO_STATE_ACTIVE);
}
@@ -452,7 +452,7 @@ class boss_gothik : public CreatureScript
else
{
phaseTwo = true;
- DoScriptText(SAY_TELEPORT, me);
+ Talk(SAY_TELEPORT);
DoTeleportTo(PosGroundLiveSide);
me->SetReactState(REACT_AGGRESSIVE);
DummyEntryCheckPredicate pred;
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp
index e7126ba7e33..8be4ac6b8b6 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp
@@ -21,14 +21,17 @@
#include "naxxramas.h"
#include "Player.h"
-#define SAY_AGGRO RAND(-1533109, -1533110, -1533111)
-#define SAY_SLAY -1533112
-#define SAY_TAUNT RAND(-1533113, -1533114, -1533115, -1533116, -1533117)
-#define SAY_DEATH -1533118
-
-#define SPELL_SPELL_DISRUPTION 29310
-#define SPELL_DECREPIT_FEVER RAID_MODE(29998, 55011)
-#define SPELL_PLAGUE_CLOUD 29350
+enum Heigan
+{
+ SPELL_DECREPIT_FEVER = 29998, // 25-man: 55011
+ SPELL_SPELL_DISRUPTION = 29310,
+ SPELL_PLAGUE_CLOUD = 29350,
+
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_TAUNT = 2,
+ SAY_DEATH = 3
+};
enum Events
{
@@ -70,7 +73,7 @@ public:
void KilledUnit(Unit* who)
{
if (!(rand()%5))
- DoScriptText(SAY_SLAY, me);
+ Talk(SAY_SLAY);
if (who->GetTypeId() == TYPEID_PLAYER)
safetyDance = false;
}
@@ -92,13 +95,13 @@ public:
void JustDied(Unit* /*killer*/)
{
_JustDied();
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
EnterPhase(PHASE_FIGHT);
safetyDance = true;
}
@@ -114,12 +117,16 @@ public:
events.ScheduleEvent(EVENT_FEVER, urand(15000, 20000));
events.ScheduleEvent(EVENT_PHASE, 90000);
events.ScheduleEvent(EVENT_ERUPT, 15000);
+ me->GetMotionMaster()->MoveChase(me->getVictim());
}
else
{
float x, y, z, o;
me->GetHomePosition(x, y, z, o);
- me->NearTeleportTo(x, y, z, o);
+ me->NearTeleportTo(x, y, z, o - G3D::halfPi());
+ me->GetMotionMaster()->Clear();
+ me->GetMotionMaster()->MoveIdle();
+ me->SetTarget(0);
DoCastAOE(SPELL_PLAGUE_CLOUD);
events.ScheduleEvent(EVENT_PHASE, 45000);
events.ScheduleEvent(EVENT_ERUPT, 8000);
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp
index 9167db45d20..183fb40e5a0 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp
@@ -33,32 +33,23 @@ EndScriptData */
enum Yells
{
//when shappiron dies. dialog between kel and lich king (in this order)
- SAY_SAPP_DIALOG1 = -1533084, //not used
- SAY_SAPP_DIALOG2_LICH = -1533085, //not used
- SAY_SAPP_DIALOG3 = -1533086, //not used
- SAY_SAPP_DIALOG4_LICH = -1533087, //not used
- SAY_SAPP_DIALOG5 = -1533088, //not used
- SAY_CAT_DIED = -1533089, //when cat dies, not used
+ SAY_SAPP_DIALOG1 = 0, //not used
+ SAY_SAPP_DIALOG2_LICH = 1, //not used
+ SAY_SAPP_DIALOG3 = 2, //not used
+ SAY_SAPP_DIALOG4_LICH = 3, //not used
+ SAY_SAPP_DIALOG5 = 4, //not used
+ SAY_CAT_DIED = 5, //when cat dies, not used
//when each of the 4 wing bosses dies
- SAY_TAUNT1 = -1533090, //not used
- SAY_TAUNT2 = -1533091, //not used
- SAY_TAUNT3 = -1533092, //not used
- SAY_TAUNT4 = -1533093, //not used
- SAY_SUMMON_MINIONS = -1533105, //start of phase 1
- SAY_AGGRO_1 = -1533094, //start of phase 2
- SAY_AGGRO_2 = -1533095,
- SAY_AGGRO_3 = -1533096,
- SAY_SLAY_1 = -1533097,
- SAY_SLAY_2 = -1533098,
- SAY_DEATH = -1533099,
- SAY_CHAIN_1 = -1533100,
- SAY_CHAIN_2 = -1533101,
- SAY_FROST_BLAST = -1533102,
- SAY_SPECIAL_1 = -1533106,
- SAY_SPECIAL_2 = -1533107,
- SAY_SPECIAL_3 = -1533108,
- SAY_REQUEST_AID = -1533103, //start of phase 3
- SAY_ANSWER_REQUEST = -1533104 //lich king answer
+ SAY_TAUNT = 6,
+ SAY_AGGRO = 7,
+ SAY_SLAY = 8,
+ SAY_DEATH = 9,
+ SAY_CHAIN = 10,
+ SAY_FROST_BLAST = 11,
+ SAY_REQUEST_AID = 12, //start of phase 3
+ SAY_ANSWER_REQUEST = 13, //lich king answer
+ SAY_SUMMON_MINIONS = 14, //start of phase 1
+ SAY_SPECIAL = 15
};
enum Events
@@ -341,13 +332,13 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
_JustDied();
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
std::map<uint64, float>::const_iterator itr;
for (itr = chained.begin(); itr != chained.end(); ++itr)
@@ -370,7 +361,7 @@ public:
pPortal->ResetDoorOrButton();
}
DoCast(me, SPELL_KELTHUZAD_CHANNEL, false);
- DoScriptText(SAY_SUMMON_MINIONS, me);
+ Talk(SAY_SUMMON_MINIONS);
Phase = 1;
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_NOT_SELECTABLE);
me->SetFloatValue(UNIT_FIELD_COMBATREACH, 4);
@@ -435,7 +426,7 @@ public:
break;
case EVENT_PHASE:
events.Reset();
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me);
+ Talk(SAY_AGGRO);
spawns.DespawnAll();
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_NOT_SELECTABLE);
me->CastStop();
@@ -464,10 +455,10 @@ public:
if (HealthBelowPct(45))
{
Phase = 3;
- DoScriptText(SAY_REQUEST_AID, me);
+ Talk(SAY_REQUEST_AID);
//here Lich King should respond to KelThuzad but I don't know which Creature to make talk
//so for now just make Kelthuzad says it.
- DoScriptText(SAY_ANSWER_REQUEST, me);
+ Talk(SAY_ANSWER_REQUEST);
for (uint8 i = 0; i <= 3; ++i)
{
@@ -523,7 +514,7 @@ public:
}
}
if (!chained.empty())
- DoScriptText(RAND(SAY_CHAIN_1, SAY_CHAIN_2), me);
+ Talk(SAY_CHAIN);
events.RepeatEvent(urand(100000, 180000));
break;
}
@@ -627,7 +618,7 @@ public:
std::vector<Unit*>::const_iterator itr = unitList.begin();
advance(itr, rand()%unitList.size());
DoCast(*itr, SPELL_MANA_DETONATION);
- DoScriptText(RAND(SAY_SPECIAL_1, SAY_SPECIAL_2, SAY_SPECIAL_3), me);
+ Talk(SAY_SPECIAL);
}
events.RepeatEvent(urand(20000, 50000));
@@ -642,7 +633,7 @@ public:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, RAID_MODE(1, 0), 0, true))
DoCast(target, SPELL_FROST_BLAST);
if (rand()%2)
- DoScriptText(SAY_FROST_BLAST, me);
+ Talk(SAY_FROST_BLAST);
events.RepeatEvent(urand(30000, 90000));
break;
default:
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp b/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp
index d106b99ace0..b670e36fa96 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp
@@ -19,21 +19,25 @@
#include "ScriptedCreature.h"
#include "naxxramas.h"
-#define SAY_AGGRO RAND(-1533075, -1533076, -1533077)
-#define SAY_SUMMON -1533078
-#define SAY_SLAY RAND(-1533079, -1533080)
-#define SAY_DEATH -1533081
+enum Noth
+{
+ SAY_AGGRO = 0,
+ SAY_SUMMON = 1,
+ SAY_SLAY = 2,
+ SAY_DEATH = 3,
-#define SOUND_DEATH 8848
+ SOUND_DEATH = 8848,
-#define SPELL_CURSE_PLAGUEBRINGER RAID_MODE(29213, 54835)
-#define SPELL_BLINK RAND(29208, 29209, 29210, 29211)
-#define SPELL_CRIPPLE RAID_MODE(29212, 54814)
-#define SPELL_TELEPORT 29216
+ SPELL_CURSE_PLAGUEBRINGER = 29213, // 25-man: 54835
+ SPELL_CRIPPLE = 29212, // 25-man: 54814
+ SPELL_TELEPORT = 29216,
-#define MOB_WARRIOR 16984
-#define MOB_CHAMPION 16983
-#define MOB_GUARDIAN 16981
+ MOB_WARRIOR = 16984,
+ MOB_CHAMPION = 16983,
+ MOB_GUARDIAN = 16981
+};
+
+#define SPELL_BLINK RAND(29208, 29209, 29210, 29211)
// Teleport position of Noth on his balcony
#define TELE_X 2631.370f
@@ -90,7 +94,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
balconyCount = 0;
EnterPhaseGround();
}
@@ -115,7 +119,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
if (!(rand()%5))
- DoScriptText(SAY_SLAY, me);
+ Talk(SAY_SLAY);
}
void JustSummoned(Creature* summon)
@@ -128,7 +132,7 @@ public:
void JustDied(Unit* /*killer*/)
{
_JustDied();
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void SummonUndead(uint32 entry, uint32 num)
@@ -157,7 +161,7 @@ public:
events.ScheduleEvent(EVENT_CURSE, urand(50000, 60000));
return;
case EVENT_WARRIOR:
- DoScriptText(SAY_SUMMON, me);
+ Talk(SAY_SUMMON);
SummonUndead(MOB_WARRIOR, RAID_MODE(2, 3));
events.ScheduleEvent(EVENT_WARRIOR, 30000);
return;
@@ -178,7 +182,7 @@ public:
waveCount = 0;
return;
case EVENT_WAVE:
- DoScriptText(SAY_SUMMON, me);
+ Talk(SAY_SUMMON);
switch (balconyCount)
{
case 0: SummonUndead(MOB_CHAMPION, RAID_MODE(2, 4)); break;
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp b/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp
index b1b57836a89..d4b3f5ddce0 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp
@@ -30,12 +30,11 @@ enum Spells
enum Yells
{
- SAY_AGGRO_1 = -1533017,
- SAY_AGGRO_2 = -1533018,
- SAY_SLAY = -1533019,
- SAY_DEATH = -1533020,
- EMOTE_BERSERK = -1533021,
- EMOTE_ENRAGE = -1533022,
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ EMOTE_BERSERK = 3,
+ EMOTE_ENRAGE = 4
};
enum Events
@@ -78,20 +77,20 @@ public:
void KilledUnit(Unit* /*Victim*/)
{
if (!(rand()%5))
- DoScriptText(SAY_SLAY, me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
_JustDied();
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
Enraged = false;
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2), me);
+ Talk(SAY_AGGRO);
events.ScheduleEvent(EVENT_HATEFUL, 1000);
events.ScheduleEvent(EVENT_BERSERK, 360000);
@@ -137,7 +136,7 @@ public:
}
case EVENT_BERSERK:
DoCast(me, SPELL_BERSERK, true);
- DoScriptText(EMOTE_BERSERK, me);
+ Talk(EMOTE_BERSERK);
events.ScheduleEvent(EVENT_SLIME, 2000);
break;
case EVENT_SLIME:
@@ -150,7 +149,7 @@ public:
if (!Enraged && HealthBelowPct(5))
{
DoCast(me, SPELL_FRENZY, true);
- DoScriptText(EMOTE_ENRAGE, me);
+ Talk(EMOTE_ENRAGE);
Enraged = true;
}
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp
index 5a8f004788d..aebd7fdc19c 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp
@@ -17,45 +17,45 @@
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
-#include "naxxramas.h"
#include "Player.h"
#include "SpellInfo.h"
+#include "naxxramas.h"
-#define EMOTE_BREATH -1533082
-#define EMOTE_ENRAGE -1533083
-
-#define SPELL_FROST_AURA RAID_MODE(28531, 55799)
-#define SPELL_CLEAVE 19983
-#define SPELL_TAIL_SWEEP RAID_MODE(55697, 55696)
-#define SPELL_SUMMON_BLIZZARD 28560
-#define SPELL_LIFE_DRAIN RAID_MODE(28542, 55665)
-#define SPELL_ICEBOLT 28522
-#define SPELL_FROST_BREATH 29318
-#define SPELL_FROST_EXPLOSION 28524
-#define SPELL_FROST_MISSILE 30101
-#define SPELL_BERSERK 26662
-#define SPELL_DIES 29357
-
-#define SPELL_CHILL RAID_MODE(28547, 55699)
-
-#define MOB_BLIZZARD 16474
-#define GO_ICEBLOCK 181247
+enum Yells
+{
+ EMOTE_AIR_PHASE = 0,
+ EMOTE_GROUND_PHASE = 1,
+ EMOTE_BREATH = 2,
+ EMOTE_ENRAGE = 3
+};
-#define ACHIEVEMENT_THE_HUNDRED_CLUB RAID_MODE(2146, 2147)
-#define MAX_FROST_RESISTANCE 100
+enum Spells
+{
+ SPELL_FROST_AURA = 28531,
+ SPELL_CLEAVE = 19983,
+ SPELL_TAIL_SWEEP = 55697,
+ SPELL_SUMMON_BLIZZARD = 28560,
+ SPELL_LIFE_DRAIN = 28542,
+ SPELL_ICEBOLT = 28522,
+ SPELL_FROST_BREATH = 29318,
+ SPELL_FROST_EXPLOSION = 28524,
+ SPELL_FROST_MISSILE = 30101,
+ SPELL_BERSERK = 26662,
+ SPELL_DIES = 29357,
+ SPELL_CHILL = 28547,
+};
enum Phases
{
- PHASE_NULL = 0,
+ PHASE_NULL = 0,
PHASE_BIRTH,
PHASE_GROUND,
- PHASE_FLIGHT,
+ PHASE_FLIGHT
};
enum Events
{
- EVENT_NONE,
- EVENT_BERSERK,
+ EVENT_BERSERK = 1,
EVENT_CLEAVE,
EVENT_TAIL,
EVENT_DRAIN,
@@ -67,342 +67,362 @@ enum Events
EVENT_EXPLOSION,
EVENT_LAND,
EVENT_GROUND,
- EVENT_BIRTH,
+ EVENT_BIRTH
+};
+
+enum Misc
+{
+ NPC_BLIZZARD = 16474,
+ GO_ICEBLOCK = 181247,
+
+ // The Hundred Club
+ DATA_THE_HUNDRED_CLUB = 21462147,
+ MAX_FROST_RESISTANCE = 100
};
typedef std::map<uint64, uint64> IceBlockMap;
class boss_sapphiron : public CreatureScript
{
-public:
- boss_sapphiron() : CreatureScript("boss_sapphiron") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new boss_sapphironAI (creature);
- }
-
- struct boss_sapphironAI : public BossAI
- {
- boss_sapphironAI(Creature* creature) : BossAI(creature, BOSS_SAPPHIRON)
- , phase(PHASE_NULL)
+ public:
+ boss_sapphiron() : CreatureScript("boss_sapphiron") { }
+
+ struct boss_sapphironAI : public BossAI
{
- map = me->GetMap();
- }
+ boss_sapphironAI(Creature* creature) : BossAI(creature, BOSS_SAPPHIRON)
+ , _phase(PHASE_NULL)
+ {
+ _map = me->GetMap();
+ }
- Phases phase;
- uint32 iceboltCount;
- IceBlockMap iceblocks;
+ void InitializeAI()
+ {
+ float x, y, z;
+ me->GetPosition(x, y, z);
+ me->SummonGameObject(GO_BIRTH, x, y, z, 0, 0, 0, 0, 0, 0);
+ me->SetVisible(false);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->SetReactState(REACT_PASSIVE);
+
+ BossAI::InitializeAI();
+ }
- bool CanTheHundredClub; // needed for achievement: The Hundred Club(2146, 2147)
- uint32 CheckFrostResistTimer;
- Map* map;
+ void Reset()
+ {
+ _Reset();
- void InitializeAI()
- {
- float x, y, z;
- me->GetPosition(x, y, z);
- me->SummonGameObject(GO_BIRTH, x, y, z, 0, 0, 0, 0, 0, 0);
- me->SetVisible(false);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- me->SetReactState(REACT_PASSIVE);
-
- ScriptedAI::InitializeAI();
- }
+ if (_phase == PHASE_FLIGHT)
+ ClearIceBlock();
- void Reset()
- {
- _Reset();
+ _phase = PHASE_NULL;
- if (phase == PHASE_FLIGHT)
- ClearIceBlock();
+ _canTheHundredClub = true;
+ _checkFrostResistTimer = 5 * IN_MILLISECONDS;
+ }
- phase = PHASE_NULL;
+ void EnterCombat(Unit* /*who*/)
+ {
+ _EnterCombat();
- CanTheHundredClub = true;
- CheckFrostResistTimer = 5000;
- }
+ me->CastSpell(me, SPELL_FROST_AURA, true);
- void EnterCombat(Unit* /*who*/)
- {
- _EnterCombat();
+ events.ScheduleEvent(EVENT_BERSERK, 15 * MINUTE * IN_MILLISECONDS);
+ EnterPhaseGround();
- me->CastSpell(me, SPELL_FROST_AURA, true);
+ CheckPlayersFrostResist();
+ }
- events.ScheduleEvent(EVENT_BERSERK, 15*60000);
- EnterPhaseGround();
+ void SpellHitTarget(Unit* target, SpellInfo const* spell)
+ {
+ if (spell->Id == SPELL_ICEBOLT)
+ {
+ IceBlockMap::iterator itr = _iceblocks.find(target->GetGUID());
+ if (itr != _iceblocks.end() && !itr->second)
+ {
+ if (GameObject* iceblock = me->SummonGameObject(GO_ICEBLOCK, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, 0, 0, 0, 0, 25000))
+ itr->second = iceblock->GetGUID();
+ }
+ }
+ }
- CheckPlayersFrostResist();
- }
+ void JustDied(Unit* /*killer*/)
+ {
+ _JustDied();
+ me->CastSpell(me, SPELL_DIES, true);
- void SpellHitTarget(Unit* target, const SpellInfo* spell)
- {
- if (spell->Id == SPELL_ICEBOLT)
+ CheckPlayersFrostResist();
+ }
+
+ void MovementInform(uint32 /*type*/, uint32 id)
+ {
+ if (id == 1)
+ events.ScheduleEvent(EVENT_LIFTOFF, 0);
+ }
+
+ void DoAction(int32 const param)
{
- IceBlockMap::iterator itr = iceblocks.find(target->GetGUID());
- if (itr != iceblocks.end() && !itr->second)
+ if (param == DATA_SAPPHIRON_BIRTH)
{
- if (GameObject* iceblock = me->SummonGameObject(GO_ICEBLOCK, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, 0, 0, 0, 0, 25000))
- itr->second = iceblock->GetGUID();
+ _phase = PHASE_BIRTH;
+ events.ScheduleEvent(EVENT_BIRTH, 23 * IN_MILLISECONDS);
}
}
- }
-
- void JustDied(Unit* /*killer*/)
- {
- _JustDied();
- me->CastSpell(me, SPELL_DIES, true);
- CheckPlayersFrostResist();
- if (CanTheHundredClub)
+ void CheckPlayersFrostResist()
{
- AchievementEntry const* AchievTheHundredClub = sAchievementStore.LookupEntry(ACHIEVEMENT_THE_HUNDRED_CLUB);
- if (AchievTheHundredClub)
+ if (_canTheHundredClub && _map && _map->IsRaid())
{
- if (map && map->IsDungeon())
+ Map::PlayerList const &players = _map->GetPlayers();
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
{
- Map::PlayerList const &players = map->GetPlayers();
- for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
- itr->getSource()->CompletedAchievement(AchievTheHundredClub);
+ if (itr->getSource()->GetResistance(SPELL_SCHOOL_FROST) > MAX_FROST_RESISTANCE)
+ {
+ _canTheHundredClub = false;
+ break;
+ }
}
}
}
- }
-
- void MovementInform(uint32, uint32 id)
- {
- if (id == 1)
- events.ScheduleEvent(EVENT_LIFTOFF, 0);
- }
- void DoAction(const int32 param)
- {
- if (param == DATA_SAPPHIRON_BIRTH)
+ void EnterPhaseGround()
{
- phase = PHASE_BIRTH;
- events.ScheduleEvent(EVENT_BIRTH, 23000);
+ _phase = PHASE_GROUND;
+ me->SetReactState(REACT_AGGRESSIVE);
+ events.SetPhase(PHASE_GROUND);
+ events.ScheduleEvent(EVENT_CLEAVE, urand(5, 15) * IN_MILLISECONDS, 0, PHASE_GROUND);
+ events.ScheduleEvent(EVENT_TAIL, urand(5, 15) * IN_MILLISECONDS, 0, PHASE_GROUND);
+ events.ScheduleEvent(EVENT_DRAIN, 24 * IN_MILLISECONDS, 0, PHASE_GROUND);
+ events.ScheduleEvent(EVENT_BLIZZARD, urand(5, 10) * IN_MILLISECONDS, 0, PHASE_GROUND);
+ events.ScheduleEvent(EVENT_FLIGHT, 45 * IN_MILLISECONDS);
}
- }
- void CheckPlayersFrostResist()
- {
- if (CanTheHundredClub && map && map->IsDungeon())
+ void ClearIceBlock()
{
- Map::PlayerList const &players = map->GetPlayers();
- for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ for (IceBlockMap::const_iterator itr = _iceblocks.begin(); itr != _iceblocks.end(); ++itr)
{
- if (itr->getSource()->GetResistance(SPELL_SCHOOL_FROST) > MAX_FROST_RESISTANCE)
- {
- CanTheHundredClub = false;
- break;
- }
+ if (Player* player = ObjectAccessor::GetPlayer(*me, itr->first))
+ player->RemoveAura(SPELL_ICEBOLT);
+
+ if (GameObject* go = ObjectAccessor::GetGameObject(*me, itr->second))
+ go->Delete();
}
+ _iceblocks.clear();
}
- }
- void EnterPhaseGround()
- {
- phase = PHASE_GROUND;
- me->SetReactState(REACT_AGGRESSIVE);
- events.SetPhase(PHASE_GROUND);
- events.ScheduleEvent(EVENT_CLEAVE, 5000+rand()%10000, 0, PHASE_GROUND);
- events.ScheduleEvent(EVENT_TAIL, 5000+rand()%10000, 0, PHASE_GROUND);
- events.ScheduleEvent(EVENT_DRAIN, 24000, 0, PHASE_GROUND);
- events.ScheduleEvent(EVENT_BLIZZARD, 5000+rand()%5000, 0, PHASE_GROUND);
- events.ScheduleEvent(EVENT_FLIGHT, 45000);
- }
-
- void ClearIceBlock()
- {
- for (IceBlockMap::const_iterator itr = iceblocks.begin(); itr != iceblocks.end(); ++itr)
+ uint32 GetData(uint32 data) const
{
- if (Player* player = Unit::GetPlayer(*me, itr->first))
- player->RemoveAura(SPELL_ICEBOLT);
- if (GameObject* go = GameObject::GetGameObject(*me, itr->second))
- go->Delete();
+ if (data == DATA_THE_HUNDRED_CLUB)
+ return _canTheHundredClub;
+
+ return 0;
}
- iceblocks.clear();
- }
- void UpdateAI(const uint32 diff)
- {
- if (!phase)
- return;
+ void UpdateAI(uint32 const diff)
+ {
+ if (!_phase)
+ return;
- events.Update(diff);
+ events.Update(diff);
- if ((phase != PHASE_BIRTH && !UpdateVictim()) || !CheckInRoom())
- return;
+ if ((_phase != PHASE_BIRTH && !UpdateVictim()) || !CheckInRoom())
+ return;
- if (CanTheHundredClub)
- {
- if (CheckFrostResistTimer <= diff)
+ if (_canTheHundredClub)
{
- CheckPlayersFrostResist();
- CheckFrostResistTimer = (rand() % 5 + 5) * 1000;
- } else CheckFrostResistTimer -= diff;
- }
+ if (_checkFrostResistTimer <= diff)
+ {
+ CheckPlayersFrostResist();
+ _checkFrostResistTimer = 5 * IN_MILLISECONDS;
+ }
+ else
+ _checkFrostResistTimer -= diff;
+ }
- if (phase == PHASE_GROUND)
- {
- while (uint32 eventId = events.ExecuteEvent())
+ if (_phase == PHASE_GROUND)
{
- switch (eventId)
+ while (uint32 eventId = events.ExecuteEvent())
{
- case EVENT_BERSERK:
- DoScriptText(EMOTE_ENRAGE, me);
- DoCast(me, SPELL_BERSERK);
- return;
- case EVENT_CLEAVE:
- DoCast(me->getVictim(), SPELL_CLEAVE);
- events.ScheduleEvent(EVENT_CLEAVE, 5000+rand()%10000, 0, PHASE_GROUND);
- return;
- case EVENT_TAIL:
- DoCastAOE(SPELL_TAIL_SWEEP);
- events.ScheduleEvent(EVENT_TAIL, 5000+rand()%10000, 0, PHASE_GROUND);
- return;
- case EVENT_DRAIN:
- DoCastAOE(SPELL_LIFE_DRAIN);
- events.ScheduleEvent(EVENT_DRAIN, 24000, 0, PHASE_GROUND);
- return;
- case EVENT_BLIZZARD:
+ switch (eventId)
{
- //DoCastAOE(SPELL_SUMMON_BLIZZARD);
- if (Creature* summon = DoSummon(MOB_BLIZZARD, me, 0.0f, urand(25000, 30000), TEMPSUMMON_TIMED_DESPAWN))
- summon->GetMotionMaster()->MoveRandom(40);
- events.ScheduleEvent(EVENT_BLIZZARD, RAID_MODE(20000, 7000), 0, PHASE_GROUND);
- break;
- }
- case EVENT_FLIGHT:
- if (HealthAbovePct(10))
- {
- phase = PHASE_FLIGHT;
- events.SetPhase(PHASE_FLIGHT);
- me->SetReactState(REACT_PASSIVE);
- me->AttackStop();
- float x, y, z, o;
- me->GetHomePosition(x, y, z, o);
- me->GetMotionMaster()->MovePoint(1, x, y, z);
+ case EVENT_BERSERK:
+ Talk(EMOTE_ENRAGE);
+ DoCast(me, SPELL_BERSERK);
+ return;
+ case EVENT_CLEAVE:
+ DoCastVictim(SPELL_CLEAVE);
+ events.ScheduleEvent(EVENT_CLEAVE, urand(5, 15) * IN_MILLISECONDS, 0, PHASE_GROUND);
+ return;
+ case EVENT_TAIL:
+ DoCastAOE(SPELL_TAIL_SWEEP);
+ events.ScheduleEvent(EVENT_TAIL, urand(5, 15) * IN_MILLISECONDS, 0, PHASE_GROUND);
+ return;
+ case EVENT_DRAIN:
+ DoCastAOE(SPELL_LIFE_DRAIN);
+ events.ScheduleEvent(EVENT_DRAIN, 24 * IN_MILLISECONDS, 0, PHASE_GROUND);
return;
+ case EVENT_BLIZZARD:
+ {
+ //DoCastAOE(SPELL_SUMMON_BLIZZARD);
+ if (Creature* summon = DoSummon(NPC_BLIZZARD, me, 0.0f, urand(25, 30) * IN_MILLISECONDS, TEMPSUMMON_TIMED_DESPAWN))
+ summon->GetMotionMaster()->MoveRandom(40);
+ events.ScheduleEvent(EVENT_BLIZZARD, RAID_MODE(20, 7) * IN_MILLISECONDS, 0, PHASE_GROUND);
+ break;
}
- break;
+ case EVENT_FLIGHT:
+ if (HealthAbovePct(10))
+ {
+ _phase = PHASE_FLIGHT;
+ events.SetPhase(PHASE_FLIGHT);
+ me->SetReactState(REACT_PASSIVE);
+ me->AttackStop();
+ float x, y, z, o;
+ me->GetHomePosition(x, y, z, o);
+ me->GetMotionMaster()->MovePoint(1, x, y, z);
+ return;
+ }
+ break;
+ }
}
- }
- DoMeleeAttackIfReady();
- }
- else
- {
- if (uint32 eventId = events.ExecuteEvent())
+ DoMeleeAttackIfReady();
+ }
+ else
{
- switch (eventId)
+ if (uint32 eventId = events.ExecuteEvent())
{
- case EVENT_LIFTOFF:
- me->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
- me->SetDisableGravity(true);
- me->SendMovementFlagUpdate();
- events.ScheduleEvent(EVENT_ICEBOLT, 1500);
- iceboltCount = RAID_MODE(2, 3);
- return;
- case EVENT_ICEBOLT:
+ switch (eventId)
{
- std::vector<Unit*> targets;
- std::list<HostileReference*>::const_iterator i = me->getThreatManager().getThreatList().begin();
- for (; i != me->getThreatManager().getThreatList().end(); ++i)
- if ((*i)->getTarget()->GetTypeId() == TYPEID_PLAYER && !(*i)->getTarget()->HasAura(SPELL_ICEBOLT))
- targets.push_back((*i)->getTarget());
-
- if (targets.empty())
- iceboltCount = 0;
- else
+ case EVENT_LIFTOFF:
+ Talk(EMOTE_AIR_PHASE);
+ me->SetDisableGravity(true);
+ me->SendMovementFlagUpdate();
+ events.ScheduleEvent(EVENT_ICEBOLT, 1500);
+ _iceboltCount = RAID_MODE(2, 3);
+ return;
+ case EVENT_ICEBOLT:
{
- std::vector<Unit*>::const_iterator itr = targets.begin();
- advance(itr, rand()%targets.size());
- iceblocks.insert(std::make_pair((*itr)->GetGUID(), 0));
- DoCast(*itr, SPELL_ICEBOLT);
- --iceboltCount;
+ std::vector<Unit*> targets;
+ std::list<HostileReference*>::const_iterator i = me->getThreatManager().getThreatList().begin();
+ for (; i != me->getThreatManager().getThreatList().end(); ++i)
+ if ((*i)->getTarget()->GetTypeId() == TYPEID_PLAYER && !(*i)->getTarget()->HasAura(SPELL_ICEBOLT))
+ targets.push_back((*i)->getTarget());
+
+ if (targets.empty())
+ _iceboltCount = 0;
+ else
+ {
+ std::vector<Unit*>::const_iterator itr = targets.begin();
+ advance(itr, rand()%targets.size());
+ _iceblocks.insert(std::make_pair((*itr)->GetGUID(), 0));
+ DoCast(*itr, SPELL_ICEBOLT);
+ --_iceboltCount;
+ }
+
+ if (_iceboltCount)
+ events.ScheduleEvent(EVENT_ICEBOLT, 1 * IN_MILLISECONDS);
+ else
+ events.ScheduleEvent(EVENT_BREATH, 1 * IN_MILLISECONDS);
+ return;
}
-
- if (iceboltCount)
- events.ScheduleEvent(EVENT_ICEBOLT, 1000);
- else
- events.ScheduleEvent(EVENT_BREATH, 1000);
- return;
- }
- case EVENT_BREATH:
- {
- DoScriptText(EMOTE_BREATH, me);
- DoCastAOE(SPELL_FROST_MISSILE);
- events.ScheduleEvent(EVENT_EXPLOSION, 8000);
- return;
+ case EVENT_BREATH:
+ {
+ Talk(EMOTE_BREATH);
+ DoCastAOE(SPELL_FROST_MISSILE);
+ events.ScheduleEvent(EVENT_EXPLOSION, 8 * IN_MILLISECONDS);
+ return;
+ }
+ case EVENT_EXPLOSION:
+ CastExplosion();
+ ClearIceBlock();
+ events.ScheduleEvent(EVENT_LAND, 3 * IN_MILLISECONDS);
+ return;
+ case EVENT_LAND:
+ me->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
+ Talk(EMOTE_GROUND_PHASE);
+ me->SetDisableGravity(false);
+ me->SendMovementFlagUpdate();
+ events.ScheduleEvent(EVENT_GROUND, 1500);
+ return;
+ case EVENT_GROUND:
+ EnterPhaseGround();
+ return;
+ case EVENT_BIRTH:
+ me->SetVisible(true);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->SetReactState(REACT_AGGRESSIVE);
+ return;
}
- case EVENT_EXPLOSION:
- CastExplosion();
- ClearIceBlock();
- events.ScheduleEvent(EVENT_LAND, 3000);
- return;
- case EVENT_LAND:
- me->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
- me->SetDisableGravity(false);
- me->SendMovementFlagUpdate();
- events.ScheduleEvent(EVENT_GROUND, 1500);
- return;
- case EVENT_GROUND:
- EnterPhaseGround();
- return;
- case EVENT_BIRTH:
- me->SetVisible(true);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- me->SetReactState(REACT_AGGRESSIVE);
- return;
}
- }//if (uint32 eventId = events.ExecuteEvent())
- }//if (phase == PHASE_GROUND)
- }
+ }
+ }
- void CastExplosion()
- {
- DoZoneInCombat(); // make sure everyone is in threatlist
- std::vector<Unit*> targets;
- std::list<HostileReference*>::const_iterator i = me->getThreatManager().getThreatList().begin();
- for (; i != me->getThreatManager().getThreatList().end(); ++i)
+ void CastExplosion()
{
- Unit* target = (*i)->getTarget();
- if (target->GetTypeId() != TYPEID_PLAYER)
- continue;
-
- if (target->HasAura(SPELL_ICEBOLT))
+ DoZoneInCombat(); // make sure everyone is in threatlist
+ std::vector<Unit*> targets;
+ std::list<HostileReference*>::const_iterator i = me->getThreatManager().getThreatList().begin();
+ for (; i != me->getThreatManager().getThreatList().end(); ++i)
{
- target->ApplySpellImmune(0, IMMUNITY_ID, SPELL_FROST_EXPLOSION, true);
- targets.push_back(target);
- continue;
- }
+ Unit* target = (*i)->getTarget();
+ if (target->GetTypeId() != TYPEID_PLAYER)
+ continue;
- for (IceBlockMap::const_iterator itr = iceblocks.begin(); itr != iceblocks.end(); ++itr)
- {
- if (GameObject* go = GameObject::GetGameObject(*me, itr->second))
+ if (target->HasAura(SPELL_ICEBOLT))
{
- if (go->IsInBetween(me, target, 2.0f)
- && me->GetExactDist2d(target->GetPositionX(), target->GetPositionY()) - me->GetExactDist2d(go->GetPositionX(), go->GetPositionY()) < 5.0f)
+ target->ApplySpellImmune(0, IMMUNITY_ID, SPELL_FROST_EXPLOSION, true);
+ targets.push_back(target);
+ continue;
+ }
+
+ for (IceBlockMap::const_iterator itr = _iceblocks.begin(); itr != _iceblocks.end(); ++itr)
+ {
+ if (GameObject* go = GameObject::GetGameObject(*me, itr->second))
{
- target->ApplySpellImmune(0, IMMUNITY_ID, SPELL_FROST_EXPLOSION, true);
- targets.push_back(target);
- break;
+ if (go->IsInBetween(me, target, 2.0f)
+ && me->GetExactDist2d(target->GetPositionX(), target->GetPositionY()) - me->GetExactDist2d(go->GetPositionX(), go->GetPositionY()) < 5.0f)
+ {
+ target->ApplySpellImmune(0, IMMUNITY_ID, SPELL_FROST_EXPLOSION, true);
+ targets.push_back(target);
+ break;
+ }
}
}
}
+
+ me->CastSpell(me, SPELL_FROST_EXPLOSION, true);
+
+ for (std::vector<Unit*>::const_iterator itr = targets.begin(); itr != targets.end(); ++itr)
+ (*itr)->ApplySpellImmune(0, IMMUNITY_ID, SPELL_FROST_EXPLOSION, false);
}
- me->CastSpell(me, SPELL_FROST_EXPLOSION, true);
+ private:
+ Phases _phase;
+ uint32 _iceboltCount;
+ IceBlockMap _iceblocks;
+ bool _canTheHundredClub;
+ uint32 _checkFrostResistTimer;
+ Map* _map;
+ };
- for (std::vector<Unit*>::const_iterator itr = targets.begin(); itr != targets.end(); ++itr)
- (*itr)->ApplySpellImmune(0, IMMUNITY_ID, SPELL_FROST_EXPLOSION, false);
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new boss_sapphironAI (creature);
}
- };
+};
+class achievement_the_hundred_club : public AchievementCriteriaScript
+{
+ public:
+ achievement_the_hundred_club() : AchievementCriteriaScript("achievement_the_hundred_club") { }
+
+ bool OnCheck(Player* /*source*/, Unit* target)
+ {
+ return target && target->GetAI()->GetData(DATA_THE_HUNDRED_CLUB);
+ }
};
void AddSC_boss_sapphiron()
{
new boss_sapphiron();
+ new achievement_the_hundred_club();
}
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp
index 482f8a1200d..c86cf1e9f28 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp
@@ -24,9 +24,9 @@
//Stalagg
enum StalaggYells
{
- SAY_STAL_AGGRO = -1533023, //not used
- SAY_STAL_SLAY = -1533024, //not used
- SAY_STAL_DEATH = -1533025 //not used
+ SAY_STAL_AGGRO = 0,
+ SAY_STAL_SLAY = 1,
+ SAY_STAL_DEATH = 2
};
enum StalagSpells
@@ -40,9 +40,9 @@ enum StalagSpells
//Feugen
enum FeugenYells
{
- SAY_FEUG_AGGRO = -1533026, //not used
- SAY_FEUG_SLAY = -1533027, //not used
- SAY_FEUG_DEATH = -1533028 //not used
+ SAY_FEUG_AGGRO = 0,
+ SAY_FEUG_SLAY = 1,
+ SAY_FEUG_DEATH = 2
};
enum FeugenSpells
@@ -67,17 +67,12 @@ enum ThaddiusActions
//Thaddius
enum ThaddiusYells
{
- SAY_GREET = -1533029, //not used
- SAY_AGGRO_1 = -1533030,
- SAY_AGGRO_2 = -1533031,
- SAY_AGGRO_3 = -1533032,
- SAY_SLAY = -1533033,
- SAY_ELECT = -1533034, //not used
- SAY_DEATH = -1533035,
- SAY_SCREAM1 = -1533036, //not used
- SAY_SCREAM2 = -1533037, //not used
- SAY_SCREAM3 = -1533038, //not used
- SAY_SCREAM4 = -1533039 //not used
+ SAY_GREET = 0,
+ SAY_AGGRO = 1,
+ SAY_SLAY = 2,
+ SAY_ELECT = 3,
+ SAY_DEATH = 4,
+ SAY_SCREAM = 5
};
enum ThaddiusSpells
@@ -155,13 +150,13 @@ public:
void KilledUnit(Unit* /*victim*/)
{
if (!(rand()%5))
- DoScriptText(SAY_SLAY, me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
_JustDied();
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void DoAction(const int32 action)
@@ -198,7 +193,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me);
+ Talk(SAY_AGGRO);
events.ScheduleEvent(EVENT_SHIFT, 30000);
events.ScheduleEvent(EVENT_CHAIN, urand(10000, 20000));
events.ScheduleEvent(EVENT_BERSERK, 360000);
@@ -315,13 +310,21 @@ public:
magneticPullTimer = 20000;
}
+ void KilledUnit(Unit* /*victim*/)
+ {
+ if (!(rand()%5))
+ Talk(SAY_STAL_SLAY);
+ }
+
void EnterCombat(Unit* /*who*/)
{
+ Talk(SAY_STAL_AGGRO);
DoCast(SPELL_STALAGG_TESLA);
}
void JustDied(Unit* /*killer*/)
{
+ Talk(SAY_STAL_DEATH);
if (instance)
if (Creature* pThaddius = me->GetCreature(*me, instance->GetData64(DATA_THADDIUS)))
if (pThaddius->AI())
@@ -399,13 +402,21 @@ public:
staticFieldTimer = 5000;
}
+ void KilledUnit(Unit* /*victim*/)
+ {
+ if (!(rand()%5))
+ Talk(SAY_FEUG_SLAY);
+ }
+
void EnterCombat(Unit* /*who*/)
{
+ Talk(SAY_FEUG_AGGRO);
DoCast(SPELL_FEUGEN_TESLA);
}
void JustDied(Unit* /*killer*/)
{
+ Talk(SAY_FEUG_DEATH);
if (instance)
if (Creature* pThaddius = me->GetCreature(*me, instance->GetData64(DATA_THADDIUS)))
if (pThaddius->AI())
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp
index 80a5336a30c..2d89e5db0f0 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp
@@ -38,10 +38,10 @@ enum Adds
enum Yells
{
- SAY_AGGRO = -1576010,
- SAY_DEATH = -1576011,
- SAY_RIFT = -1576012,
- SAY_SHIELD = -1576013
+ SAY_AGGRO = 0,
+ SAY_DEATH = 1,
+ SAY_RIFT = 2,
+ SAY_SHIELD = 3
};
enum RiftSpells
@@ -96,7 +96,7 @@ class boss_anomalus : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_ANOMALUS_EVENT, IN_PROGRESS);
@@ -104,7 +104,7 @@ class boss_anomalus : public CreatureScript
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_ANOMALUS_EVENT, DONE);
@@ -155,7 +155,7 @@ class boss_anomalus : public CreatureScript
if ((Phase == 0) && HealthBelowPct(50))
{
Phase = 1;
- DoScriptText(SAY_SHIELD, me);
+ Talk(SAY_SHIELD);
DoCast(me, SPELL_RIFT_SHIELD);
if (Creature* Rift = me->SummonCreature(MOB_CHAOTIC_RIFT, RiftLocation[urand(0, 5)], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000))
{
@@ -163,7 +163,7 @@ class boss_anomalus : public CreatureScript
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
Rift->AI()->AttackStart(target);
uiChaoticRiftGUID = Rift->GetGUID();
- DoScriptText(SAY_RIFT, me);
+ Talk(SAY_RIFT);
}
}
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp
index bbd86ec6a9f..c110a4a3e85 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp
@@ -40,11 +40,11 @@ enum Spells
enum Yells
{
//Yell
- SAY_AGGRO = -1576040,
- SAY_SLAY = -1576041,
- SAY_ENRAGE = -1576042,
- SAY_DEATH = -1576043,
- SAY_CRYSTAL_NOVA = -1576044
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_ENRAGE = 2,
+ SAY_DEATH = 3,
+ SAY_CRYSTAL_NOVA = 4
};
enum Misc
@@ -100,7 +100,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
DoCastAOE(SPELL_INTENSE_COLD);
if (instance)
@@ -109,7 +109,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_KERISTRASZA_EVENT, DONE);
@@ -117,7 +117,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(SAY_SLAY, me);
+ Talk(SAY_SLAY);
}
bool CheckContainmentSpheres(bool remove_prison = false)
@@ -174,7 +174,7 @@ public:
if (!bEnrage && HealthBelowPct(25))
{
- DoScriptText(SAY_ENRAGE, me);
+ Talk(SAY_ENRAGE);
DoCast(me, SPELL_ENRAGE);
bEnrage = true;
}
@@ -193,7 +193,7 @@ public:
if (uiCrystalChainsCrystalizeTimer <= diff)
{
- DoScriptText(SAY_CRYSTAL_NOVA, me);
+ Talk(SAY_CRYSTAL_NOVA);
if (IsHeroic())
DoCast(me, SPELL_CRYSTALIZE);
else if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp
index 317a9845e87..c8d3cc6416c 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp
@@ -43,12 +43,11 @@ enum Creatures
enum Yells
{
- SAY_AGGRO = -1576000,
- SAY_KILL = -1576001,
- SAY_DEATH = -1576002,
- SAY_MERGE = -1576003,
- SAY_SPLIT_1 = -1576004,
- SAY_SPLIT_2 = -1576005,
+ SAY_AGGRO = 0,
+ SAY_KILL = 1,
+ SAY_DEATH = 2,
+ SAY_MERGE = 3,
+ SAY_SPLIT = 4
};
#define ACTION_MAGUS_DEAD 1
@@ -122,7 +121,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_MAGUS_TELESTRA_EVENT, IN_PROGRESS);
@@ -130,7 +129,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_MAGUS_TELESTRA_EVENT, DONE);
@@ -138,7 +137,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(SAY_KILL, me);
+ Talk(SAY_KILL);
}
void DoAction(int32 const action)
@@ -251,7 +250,7 @@ public:
uiArcaneMagusGUID = 0;
bIsWaitingToAppear = true;
uiIsWaitingToAppearTimer = 4*IN_MILLISECONDS;
- DoScriptText(SAY_MERGE, me);
+ Talk(SAY_MERGE);
}
else
return;
@@ -270,7 +269,7 @@ public:
bFireMagusDead = false;
bFrostMagusDead = false;
bArcaneMagusDead = false;
- DoScriptText(RAND(SAY_SPLIT_1, SAY_SPLIT_2), me);
+ Talk(SAY_SPLIT);
return;
}
@@ -287,7 +286,7 @@ public:
bFireMagusDead = false;
bFrostMagusDead = false;
bArcaneMagusDead = false;
- DoScriptText(RAND(SAY_SPLIT_1, SAY_SPLIT_2), me);
+ Talk(SAY_SPLIT);
return;
}
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp b/src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp
index 38808bc718d..1af1edcdf71 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp
@@ -26,17 +26,15 @@ Script Data End */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
-#define SPELL_BATTLE_SHOUT 31403
-#define SPELL_CHARGE 60067
-#define SPELL_FRIGHTENING_SHOUT 19134
-#define SPELL_WHIRLWIND_1 38619
-#define SPELL_WHIRLWIND_2 38618
+enum CommanderStoutbeard
+{
+ SPELL_BATTLE_SHOUT = 31403,
+ SPELL_CHARGE = 60067,
+ SPELL_FRIGHTENING_SHOUT = 19134,
+ SPELL_WHIRLWIND_1 = 38619,
+ SPELL_WHIRLWIND_2 = 38618
+};
-//not used
-//Yell
-#define SAY_AGGRO -1576021
-#define SAY_KILL -1576022
-#define SAY_DEATH -1576023
class boss_commander_stoutbeard : public CreatureScript
{
@@ -53,10 +51,6 @@ public:
boss_commander_stoutbeardAI(Creature* creature) : ScriptedAI(creature) {}
void Reset() {}
- void EnterCombat(Unit* /*who*/)
- {
- DoScriptText(SAY_AGGRO, me);
- }
void AttackStart(Unit* /*who*/) {}
void MoveInLineOfSight(Unit* /*who*/) {}
void UpdateAI(const uint32 /*diff*/)
@@ -67,10 +61,6 @@ public:
DoMeleeAttackIfReady();
}
- void JustDied(Unit* /*killer*/)
- {
- DoScriptText(SAY_DEATH, me);
- }
};
};
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp
index 035e1a9a6df..60f9a3ddc9a 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp
@@ -31,18 +31,11 @@ enum Spells
enum Yells
{
- SAY_AGGRO = -1578005,
- SAY_KILL_1 = -1578006,
- SAY_KILL_2 = -1578007,
- SAY_KILL_3 = -1578008,
- SAY_DEATH = -1578009,
- SAY_PULL_1 = -1578010,
- SAY_PULL_2 = -1578011,
- SAY_PULL_3 = -1578012,
- SAY_PULL_4 = -1578013,
- SAY_STOMP_1 = -1578014,
- SAY_STOMP_2 = -1578015,
- SAY_STOMP_3 = -1578016
+ SAY_AGGRO = 0,
+ SAY_KILL = 1,
+ SAY_DEATH = 2,
+ SAY_PULL = 3,
+ SAY_STOMP = 4
};
enum DrakosAchievement
@@ -85,7 +78,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void UpdateAI(const uint32 diff)
@@ -122,7 +115,7 @@ public:
events.ScheduleEvent(EVENT_MAGIC_PULL, 15000);
break;
case EVENT_STOMP:
- DoScriptText(RAND(SAY_STOMP_1, SAY_STOMP_2, SAY_STOMP_3), me);
+ Talk(SAY_STOMP);
DoCast(SPELL_THUNDERING_STOMP);
events.ScheduleEvent(EVENT_STOMP, 17000);
break;
@@ -136,7 +129,7 @@ public:
{
_JustDied();
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
// start achievement timer (kill Eregos within 20 min)
instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
@@ -144,7 +137,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2, SAY_KILL_3), me);
+ Talk(SAY_KILL);
}
private:
bool postPull;
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp
index 4bbb4c1a5ed..b17c471c81b 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp
@@ -34,9 +34,12 @@ enum Events
enum Says
{
- SAY_AGGRO = 0,
- SAY_ENRAGE = 1,
- SAY_DEATH = 2
+ SAY_SPAWN = 0,
+ SAY_AGGRO = 1,
+ SAY_ENRAGE = 2,
+ SAY_KILL = 3,
+ SAY_DEATH = 4,
+ SAY_SHIELD = 5,
};
enum Spells
@@ -101,6 +104,11 @@ public:
DoAction(ACTION_SET_NORMAL_EVENTS);
}
+ void KilledUnit(Unit* /*victim*/)
+ {
+ Talk(SAY_KILL);
+ }
+
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
@@ -176,6 +184,7 @@ public:
events.Reset();
_phase = (me->GetHealthPct() < 60.0f && me->GetHealthPct() > 20.0f) ? PHASE_FIRST_PLANAR : PHASE_SECOND_PLANAR;
+ Talk(SAY_SHIELD);
DoCast(SPELL_PLANAR_SHIFT);
// not sure about the amount, and if we should despawn previous spawns (dragon trashs)
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp
index 51e476785ff..ffd5e53e787 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp
@@ -45,11 +45,14 @@ enum Spells
enum Yells
{
- SAY_AGGRO_1 = -1578000,
- SAY_AGGRO_2 = -1578001,
- SAY_AGGRO_3 = -1578002,
- SAY_AGGRO_4 = -1578003,
- SAY_TELEPORT = -1578004,
+ SAY_SUMMON_1 = 0,
+ SAY_SUMMON_2 = 1,
+ SAY_SUMMON_3 = 2,
+ SAY_AGGRO = 3,
+ EMOTE_ARCANE_EXPLOSION = 4,
+ SAY_ARCANE_EXPLOSION = 5,
+ SAY_DEATH = 6,
+ SAY_PLAYER_KILL = 7
};
enum eCreature
@@ -84,11 +87,6 @@ static uint32 TeleportSpells[]=
SPELL_SUMMON_MENAGERIE, SPELL_SUMMON_MENAGERIE_2, SPELL_SUMMON_MENAGERIE_3
};
-static int32 SayAggro[]=
-{
- SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3, SAY_AGGRO_4
-};
-
class boss_urom : public CreatureScript
{
public:
@@ -153,7 +151,7 @@ public:
{
if (me->Attack(who, true))
{
- DoScriptText(SayAggro[3], me);
+ Talk(SAY_AGGRO);
me->SetInCombatWith(who);
who->SetInCombatWith(me);
@@ -209,6 +207,22 @@ public:
{
SetPosition(i);
me->SummonCreature(Group[group[instance->GetData(DATA_UROM_PLATAFORM)]].entry[i], x, y, me->GetPositionZ(), me->GetOrientation());
+
+ // teleport to next platform and spawn adds
+ switch (instance->GetData(DATA_UROM_PLATAFORM))
+ {
+ case 1:
+ Talk(SAY_SUMMON_1);
+ break;
+ case 2:
+ Talk(SAY_SUMMON_2);
+ break;
+ case 3:
+ Talk(SAY_SUMMON_3);
+ break;
+ default:
+ break;
+ }
}
}
@@ -217,13 +231,17 @@ public:
if (!instance || instance->GetData(DATA_UROM_PLATAFORM) > 2)
return;
- DoScriptText(SayAggro[instance->GetData(DATA_UROM_PLATAFORM)], me);
+ Talk(instance->GetData(DATA_UROM_PLATAFORM) < 5 ? instance->GetData(DATA_UROM_PLATAFORM) : 0);
DoCast(TeleportSpells[instance->GetData(DATA_UROM_PLATAFORM)]);
}
+ void KilledUnit(Unit* /*victim*/)
+ {
+ Talk(SAY_PLAYER_KILL);
+ }
+
void UpdateAI(const uint32 uiDiff)
{
- //Return since we have no target
if (!UpdateVictim())
return;
@@ -233,7 +251,6 @@ public:
if (teleportTimer <= uiDiff)
{
me->InterruptNonMeleeSpells(false);
- DoScriptText(SAY_TELEPORT, me);
me->GetMotionMaster()->MoveIdle();
DoCast(SPELL_TELEPORT);
teleportTimer = urand(30000, 35000);
@@ -262,6 +279,9 @@ public:
me->GetMotionMaster()->MoveChase(me->getVictim(), 0, 0);
me->SetUnitMovementFlags(MOVEMENTFLAG_WALKING);
+ Talk(EMOTE_ARCANE_EXPLOSION);
+ Talk(SAY_ARCANE_EXPLOSION);
+
canCast = false;
canGoBack = false;
arcaneExplosionTimer = 9000;
@@ -291,6 +311,7 @@ public:
void JustDied(Unit* /*killer*/)
{
_JustDied();
+ Talk(SAY_DEATH);
DoCast(me, SPELL_DEATH_SPELL, true); // we cast the spell as triggered or the summon effect does not occur
}
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp
index 33e6e2846e4..a7dae9aba78 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp
@@ -29,7 +29,7 @@ EndScriptData */
#include "Player.h"
#include "SpellInfo.h"
-enum eEnums
+enum Enums
{
SAY_AGGRO = 0,
SAY_FORGE = 1,
@@ -62,7 +62,7 @@ enum eEnums
MAX_GOLEM = 2,
- ACHIEVEMENT_SHATTER_RESISTANT = 2042
+ DATA_SHATTER_RESISTANT = 2042
};
/*######
@@ -152,21 +152,6 @@ public:
if (instance)
instance->SetData(TYPE_VOLKHAN, DONE);
-
- if (IsHeroic() && GolemsShattered < 5)
- {
- AchievementEntry const* AchievShatterResistant = sAchievementStore.LookupEntry(ACHIEVEMENT_SHATTER_RESISTANT);
- if (AchievShatterResistant)
- {
- Map* map = me->GetMap();
- if (map && map->IsDungeon())
- {
- Map::PlayerList const &players = map->GetPlayers();
- for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
- itr->getSource()->CompletedAchievement(AchievShatterResistant);
- }
- }
- }
}
void KilledUnit(Unit* /*victim*/)
@@ -233,6 +218,14 @@ public:
}
}
+ uint32 GetData(uint32 data) const
+ {
+ if (data == DATA_SHATTER_RESISTANT)
+ return GolemsShattered;
+
+ return 0;
+ }
+
void UpdateAI(const uint32 uiDiff)
{
if (!UpdateVictim())
@@ -461,8 +454,20 @@ public:
};
};
+class achievement_shatter_resistant : public AchievementCriteriaScript
+{
+ public:
+ achievement_shatter_resistant() : AchievementCriteriaScript("achievement_shatter_resistant") { }
+
+ bool OnCheck(Player* /*source*/, Unit* target)
+ {
+ return target && target->GetAI()->GetData(DATA_SHATTER_RESISTANT) < 5;
+ }
+};
+
void AddSC_boss_volkhan()
{
new boss_volkhan();
new mob_molten_golem();
+ new achievement_shatter_resistant();
}
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp
index 93bea92503c..747bd699c81 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp
@@ -45,10 +45,10 @@ enum Spells
enum Yells
{
- SAY_AGGRO = -1599007,
- SAY_KILL = -1599008,
- SAY_DEATH = -1599009,
- SAY_SHATTER = -1599010
+ SAY_AGGRO = 0,
+ SAY_KILL = 1,
+ SAY_DEATH = 2,
+ SAY_SHATTER = 3
};
class boss_krystallus : public CreatureScript
@@ -93,7 +93,7 @@ public:
}
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_KRYSTALLUS_EVENT, IN_PROGRESS);
@@ -146,7 +146,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_KRYSTALLUS_EVENT, DONE);
@@ -156,7 +156,7 @@ public:
{
if (victim == me)
return;
- DoScriptText(SAY_KILL, me);
+ Talk(SAY_KILL);
}
void SpellHitTarget(Unit* /*target*/, const SpellInfo* pSpell)
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp
index 8d113bce226..4511b8b0f1e 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp
@@ -40,13 +40,10 @@ enum Spells
enum Yells
{
- SAY_AGGRO = -1599000,
- SAY_SLAY_1 = -1599001,
- SAY_SLAY_2 = -1599002,
- SAY_SLAY_3 = -1599003,
- SAY_SLAY_4 = -1599004,
- SAY_DEATH = -1599005,
- SAY_STUN = -1599006
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_STUN = 3
};
enum Achievements
@@ -94,7 +91,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
{
@@ -138,7 +135,7 @@ public:
if (ShockOfSorrowTimer <= diff)
{
DoResetThreat();
- DoScriptText(SAY_STUN, me);
+ Talk(SAY_STUN);
DoCast(me, SPELL_SHOCK_OF_SORROW_N);
ShockOfSorrowTimer = urand(20000, 30000);
} else ShockOfSorrowTimer -= diff;
@@ -160,7 +157,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_MAIDEN_OF_GRIEF_EVENT, DONE);
@@ -171,7 +168,7 @@ public:
if (victim == me)
return;
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3, SAY_SLAY_4), me);
+ Talk(SAY_SLAY);
}
};
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp
index c3e815f57dd..326779661cc 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp
@@ -44,11 +44,9 @@ enum Spells
enum Yells
{
- SAY_AGGRO = -1599011,
- SAY_SLAY_1 = -1599012,
- SAY_SLAY_2 = -1599013,
- SAY_SLAY_3 = -1599014,
- SAY_DEATH = -1599015
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2
};
#define EMOTE_GENERIC_FRENZY -1000002
@@ -132,7 +130,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
uiEncounterTimer = 0;
@@ -217,7 +215,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
lSummons.DespawnAll();
if (instance)
@@ -227,7 +225,7 @@ public:
{
if (victim == me)
return;
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me);
+ Talk(SAY_SLAY);
}
void DoAction(int32 const action)
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 3c03508a14c..6b51d923517 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp
@@ -24,68 +24,62 @@
enum Texts
{
- SAY_KILL_1 = -1599016,
- SAY_KILL_2 = -1599017,
- SAY_KILL_3 = -1599018,
- SAY_LOW_HEALTH = -1599019,
- SAY_DEATH = -1599020,
- SAY_PLAYER_DEATH_1 = -1599021,
- SAY_PLAYER_DEATH_2 = -1599022,
- SAY_PLAYER_DEATH_3 = -1599023,
- SAY_ESCORT_START = -1599024,
-
- SAY_SPAWN_DWARF = -1599025,
- SAY_SPAWN_TROGG = -1599026,
- SAY_SPAWN_OOZE = -1599027,
- SAY_SPAWN_EARTHEN = -1599028,
-
- SAY_EVENT_INTRO_1 = -1599029,
- SAY_EVENT_INTRO_2 = -1599030,
- SAY_EVENT_INTRO_3_ABED = -1599031,
-
- SAY_EVENT_A_1 = -1599032,
- SAY_EVENT_A_2_KADD = -1599033,
- SAY_EVENT_A_3 = -1599034,
-
- SAY_EVENT_B_1 = -1599035,
- SAY_EVENT_B_2_MARN = -1599036,
- SAY_EVENT_B_3 = -1599037,
-
- SAY_EVENT_C_1 = -1599038,
- SAY_EVENT_C_2_ABED = -1599039,
- SAY_EVENT_C_3 = -1599040,
-
- SAY_EVENT_D_1 = -1599041,
- SAY_EVENT_D_2_ABED = -1599042,
- SAY_EVENT_D_3 = -1599043,
- SAY_EVENT_D_4_ABED = -1599044,
-
- SAY_EVENT_END_01 = -1599045,
- SAY_EVENT_END_02 = -1599046,
- SAY_EVENT_END_03_ABED = -1599047,
- SAY_EVENT_END_04 = -1599048,
- SAY_EVENT_END_05_ABED = -1599049,
- SAY_EVENT_END_06 = -1599050,
- SAY_EVENT_END_07_ABED = -1599051,
- SAY_EVENT_END_08 = -1599052,
- SAY_EVENT_END_09_KADD = -1599053,
- SAY_EVENT_END_10 = -1599054,
- SAY_EVENT_END_11_KADD = -1599055,
- SAY_EVENT_END_12 = -1599056,
- SAY_EVENT_END_13_KADD = -1599057,
- SAY_EVENT_END_14 = -1599058,
- SAY_EVENT_END_15_MARN = -1599059,
- SAY_EVENT_END_16 = -1599060,
- SAY_EVENT_END_17_MARN = -1599061,
- SAY_EVENT_END_18 = -1599062,
- SAY_EVENT_END_19_MARN = -1599063,
- SAY_EVENT_END_20 = -1599064,
- SAY_EVENT_END_21_ABED = -1599065,
-
- SAY_VICTORY_SJONNIR_1 = -1599066,
- SAY_VICTORY_SJONNIR_2 = -1599067,
-
- SAY_ENTRANCE_MEET = -1599068,
+ SAY_KILL = 0,
+ SAY_LOW_HEALTH = 1,
+ SAY_DEATH = 2,
+ SAY_PLAYER_DEATH = 3,
+ SAY_ESCORT_START = 4,
+
+ SAY_SPAWN_DWARF = 5,
+ SAY_SPAWN_TROGG = 6,
+ SAY_SPAWN_OOZE = 7,
+ SAY_SPAWN_EARTHEN = 8,
+
+ SAY_EVENT_INTRO_1 = 9,
+ SAY_EVENT_INTRO_2 = 10,
+ SAY_EVENT_A_1 = 11,
+ SAY_EVENT_A_3 = 12,
+ SAY_EVENT_B_1 = 13,
+ SAY_EVENT_B_3 = 14,
+ SAY_EVENT_C_1 = 15,
+ SAY_EVENT_C_3 = 16,
+ SAY_EVENT_D_1 = 17,
+ SAY_EVENT_D_3 = 18,
+
+ SAY_EVENT_END_01 = 19,
+ SAY_EVENT_END_02 = 20,
+ SAY_EVENT_END_04 = 21,
+ SAY_EVENT_END_06 = 22,
+ SAY_EVENT_END_08 = 23,
+ SAY_EVENT_END_10 = 24,
+ SAY_EVENT_END_12 = 25,
+ SAY_EVENT_END_14 = 26,
+ SAY_EVENT_END_16 = 27,
+ SAY_EVENT_END_18 = 28,
+ SAY_EVENT_END_20 = 29,
+
+ SAY_VICTORY_SJONNIR_1 = 30,
+ SAY_VICTORY_SJONNIR_2 = 31,
+ SAY_ENTRANCE_MEET = 32,
+
+ SAY_EVENT_INTRO_3_ABED = 0,
+ SAY_EVENT_C_2_ABED = 1,
+ SAY_EVENT_D_2_ABED = 2,
+ SAY_EVENT_D_4_ABED = 3,
+ SAY_EVENT_END_03_ABED = 4,
+ SAY_EVENT_END_05_ABED = 5,
+ SAY_EVENT_END_07_ABED = 6,
+ SAY_EVENT_END_21_ABED = 7,
+
+ SAY_EVENT_A_2_KADD = 0,
+ SAY_EVENT_END_09_KADD = 1,
+ SAY_EVENT_END_11_KADD = 2,
+ SAY_EVENT_END_13_KADD = 3,
+
+ SAY_EVENT_B_2_MARN = 0,
+ SAY_EVENT_END_15_MARN = 1,
+ SAY_EVENT_END_17_MARN = 2,
+ SAY_EVENT_END_19_MARN = 3,
TEXT_ID_START = 13100,
TEXT_ID_PROGRESS = 13101
@@ -363,12 +357,12 @@ public:
}
break;
case 13:
- DoScriptText(SAY_EVENT_INTRO_1, me);
+ Talk(SAY_EVENT_INTRO_1);
SetEscortPaused(true);
JumpToNextStep(20000);
break;
case 17:
- DoScriptText(SAY_EVENT_INTRO_2, me);
+ Talk(SAY_EVENT_INTRO_2);
if (instance)
instance->HandleGameObject(instance->GetData64(DATA_GO_TRIBUNAL_CONSOLE), true);
me->SetStandState(UNIT_STAND_STATE_KNEEL);
@@ -452,7 +446,7 @@ public:
instance->SetData(DATA_BRANN_EVENT, IN_PROGRESS);
}
bIsBattle = false;
- DoScriptText(SAY_ESCORT_START, me);
+ Talk(SAY_ESCORT_START);
SetRun(true);
JumpToNextStep(0);
break;
@@ -463,21 +457,21 @@ public:
case 5:
if (instance)
if (Creature* temp = (Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM))))
- DoScriptText(SAY_EVENT_INTRO_3_ABED, temp);
+ temp->AI()->Talk(SAY_EVENT_INTRO_3_ABED);
JumpToNextStep(8500);
break;
case 6:
- DoScriptText(SAY_EVENT_A_1, me);
+ Talk(SAY_EVENT_A_1);
JumpToNextStep(6500);
break;
case 7:
if (instance)
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_KADDRAK)))
- DoScriptText(SAY_EVENT_A_2_KADD, temp);
+ temp->AI()->Talk(SAY_EVENT_A_2_KADD);
JumpToNextStep(12500);
break;
case 8:
- DoScriptText(SAY_EVENT_A_3, me);
+ Talk(SAY_EVENT_A_3);
if (instance)
instance->HandleGameObject(instance->GetData64(DATA_GO_KADDRAK), true);
if (Creature* temp = Unit::GetCreature(*me, uiControllerGUID))
@@ -490,18 +484,18 @@ public:
JumpToNextStep(20000);
break;
case 10:
- DoScriptText(SAY_EVENT_B_1, me);
+ Talk(SAY_EVENT_B_1);
JumpToNextStep(6000);
break;
case 11:
if (instance)
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_MARNAK)))
- DoScriptText(SAY_EVENT_B_2_MARN, temp);
+ temp->AI()->Talk(SAY_EVENT_B_2_MARN);
SpawnDwarf(1);
JumpToNextStep(20000);
break;
case 12:
- DoScriptText(SAY_EVENT_B_3, me);
+ Talk(SAY_EVENT_B_3);
if (instance)
instance->HandleGameObject(instance->GetData64(DATA_GO_MARNAK), true);
if (Creature* temp = Unit::GetCreature(*me, uiControllerGUID))
@@ -517,7 +511,7 @@ public:
JumpToNextStep(20000);
break;
case 15:
- DoScriptText(SAY_EVENT_C_1, me);
+ Talk(SAY_EVENT_C_1);
SpawnDwarf(1);
JumpToNextStep(10000);
break;
@@ -528,12 +522,12 @@ public:
case 17:
if (instance)
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM)))
- DoScriptText(SAY_EVENT_C_2_ABED, temp);
+ temp->AI()->Talk(SAY_EVENT_C_2_ABED);
SpawnDwarf(1);
JumpToNextStep(20000);
break;
case 18:
- DoScriptText(SAY_EVENT_C_3, me);
+ Talk(SAY_EVENT_C_3);
if (instance)
instance->HandleGameObject(instance->GetData64(DATA_GO_ABEDNEUM), true);
if (Creature* temp = Unit::GetCreature(*me, uiControllerGUID))
@@ -549,14 +543,14 @@ public:
JumpToNextStep(15000);
break;
case 21:
- DoScriptText(SAY_EVENT_D_1, me);
+ Talk(SAY_EVENT_D_1);
SpawnDwarf(3);
JumpToNextStep(20000);
break;
case 22:
if (instance)
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM)))
- DoScriptText(SAY_EVENT_D_2_ABED, temp);
+ temp->AI()->Talk(SAY_EVENT_D_2_ABED);
SpawnDwarf(1);
JumpToNextStep(5000);
break;
@@ -565,7 +559,7 @@ public:
JumpToNextStep(15000);
break;
case 24:
- DoScriptText(SAY_EVENT_D_3, me);
+ Talk(SAY_EVENT_D_3);
SpawnDwarf(3);
JumpToNextStep(5000);
break;
@@ -580,13 +574,13 @@ public:
case 27:
if (instance)
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM)))
- DoScriptText(SAY_EVENT_D_4_ABED, temp);
+ temp->AI()->Talk(SAY_EVENT_D_4_ABED);
SpawnDwarf(1);
JumpToNextStep(10000);
break;
case 28:
me->SetReactState(REACT_DEFENSIVE);
- DoScriptText(SAY_EVENT_END_01, me);
+ Talk(SAY_EVENT_END_01);
me->SetStandState(UNIT_STAND_STATE_STAND);
if (instance)
instance->HandleGameObject(instance->GetData64(DATA_GO_SKY_FLOOR), true);
@@ -597,7 +591,7 @@ public:
JumpToNextStep(6500);
break;
case 29:
- DoScriptText(SAY_EVENT_END_02, me);
+ Talk(SAY_EVENT_END_02);
if (instance)
instance->SetData(DATA_BRANN_EVENT, DONE);
me->CastSpell(me, SPELL_REWARD_ACHIEVEMENT, true);
@@ -606,97 +600,97 @@ public:
case 30:
if (instance)
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM)))
- DoScriptText(SAY_EVENT_END_03_ABED, temp);
+ temp->AI()->Talk(SAY_EVENT_END_03_ABED);
JumpToNextStep(8500);
break;
case 31:
- DoScriptText(SAY_EVENT_END_04, me);
+ Talk(SAY_EVENT_END_04);
JumpToNextStep(11500);
break;
case 32:
if (instance)
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM)))
- DoScriptText(SAY_EVENT_END_05_ABED, temp);
+ temp->AI()->Talk(SAY_EVENT_END_05_ABED);
JumpToNextStep(11500);
break;
case 33:
- DoScriptText(SAY_EVENT_END_06, me);
+ Talk(SAY_EVENT_END_06);
JumpToNextStep(4500);
break;
case 34:
if (instance)
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM)))
- DoScriptText(SAY_EVENT_END_07_ABED, temp);
+ temp->AI()->Talk(SAY_EVENT_END_07_ABED);
JumpToNextStep(22500);
break;
case 35:
- DoScriptText(SAY_EVENT_END_08, me);
+ Talk(SAY_EVENT_END_08);
JumpToNextStep(7500);
break;
case 36:
if (instance)
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_KADDRAK)))
- DoScriptText(SAY_EVENT_END_09_KADD, temp);
+ temp->AI()->Talk(SAY_EVENT_END_09_KADD);
JumpToNextStep(18500);
break;
case 37:
- DoScriptText(SAY_EVENT_END_10, me);
+ Talk(SAY_EVENT_END_10);
JumpToNextStep(5500);
break;
case 38:
if (instance)
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_KADDRAK)))
- DoScriptText(SAY_EVENT_END_11_KADD, temp);
+ temp->AI()->Talk(SAY_EVENT_END_11_KADD);
JumpToNextStep(20500);
break;
case 39:
- DoScriptText(SAY_EVENT_END_12, me);
+ Talk(SAY_EVENT_END_12);
JumpToNextStep(2500);
break;
case 40:
if (instance)
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_KADDRAK)))
- DoScriptText(SAY_EVENT_END_13_KADD, temp);
+ temp->AI()->Talk(SAY_EVENT_END_13_KADD);
JumpToNextStep(19500);
break;
case 41:
- DoScriptText(SAY_EVENT_END_14, me);
+ Talk(SAY_EVENT_END_14);
JumpToNextStep(10500);
break;
case 42:
if (instance)
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_MARNAK)))
- DoScriptText(SAY_EVENT_END_15_MARN, temp);
+ temp->AI()->Talk(SAY_EVENT_END_15_MARN);
JumpToNextStep(6500);
break;
case 43:
- DoScriptText(SAY_EVENT_END_16, me);
+ Talk(SAY_EVENT_END_16);
JumpToNextStep(6500);
break;
case 44:
if (instance)
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_MARNAK)))
- DoScriptText(SAY_EVENT_END_17_MARN, temp);
+ temp->AI()->Talk(SAY_EVENT_END_17_MARN);
JumpToNextStep(25500);
break;
case 45:
- DoScriptText(SAY_EVENT_END_18, me);
+ Talk(SAY_EVENT_END_18);
JumpToNextStep(23500);
break;
case 46:
if (instance)
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_MARNAK)))
- DoScriptText(SAY_EVENT_END_19_MARN, temp);
+ temp->AI()->Talk(SAY_EVENT_END_19_MARN);
JumpToNextStep(3500);
break;
case 47:
- DoScriptText(SAY_EVENT_END_20, me);
+ Talk(SAY_EVENT_END_20);
JumpToNextStep(8500);
break;
case 48:
if (instance)
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM)))
- DoScriptText(SAY_EVENT_END_21_ABED, temp);
+ temp->AI()->Talk(SAY_EVENT_END_21_ABED);
JumpToNextStep(5500);
break;
case 49:
@@ -723,7 +717,7 @@ public:
if (!bIsLowHP && HealthBelowPct(30))
{
- DoScriptText(SAY_LOW_HEALTH, me);
+ Talk(SAY_LOW_HEALTH);
bIsLowHP = true;
}
else if (bIsLowHP && !HealthBelowPct(30))
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 92e56d4dd9a..db8c7f38ef7 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
@@ -18,7 +18,7 @@
/* ScriptData
SDName: Assembly of Iron encounter
SD%Complete: 60%
-SDComment: Runes need DB support, chain lightning won't cast, supercharge won't cast (target error?) - it worked before during debugging.
+SDComment: chain lightning won't cast, supercharge don't work (auras don't stack from different casters)
SDCategory: Ulduar - Ulduar
EndScriptData */
@@ -33,6 +33,7 @@ enum AssemblySpells
// General
SPELL_SUPERCHARGE = 61920,
SPELL_BERSERK = 47008, // Hard enrage, don't know the correct ID.
+ SPELL_KILL_CREDIT = 65195, // spell_dbc
// Steelbreaker
SPELL_HIGH_VOLTAGE = 61890,
@@ -45,12 +46,9 @@ enum AssemblySpells
SPELL_SHIELD_OF_RUNES = 62274,
SPELL_SHIELD_OF_RUNES_BUFF = 62277,
SPELL_SUMMON_RUNE_OF_POWER = 63513,
- SPELL_RUNE_OF_POWER = 61974,
SPELL_RUNE_OF_DEATH = 62269,
SPELL_RUNE_OF_SUMMONING = 62273, // This is the spell that summons the rune
- SPELL_RUNE_OF_SUMMONING_VIS = 62019, // Visual
SPELL_RUNE_OF_SUMMONING_SUMMON = 62020, // Spell that summons
- SPELL_LIGHTNING_ELEMENTAL_PASSIVE = 62052,
// Stormcaller Brundir
SPELL_CHAIN_LIGHTNING = 61879,
@@ -59,7 +57,7 @@ enum AssemblySpells
SPELL_LIGHTNING_TENDRILS_10M = 61887,
SPELL_LIGHTNING_TENDRILS_25M = 63486,
SPELL_LIGHTNING_TENDRILS_VISUAL = 61883,
- SPELL_STORMSHIELD = 64187,
+ SPELL_STORMSHIELD = 64187
};
enum AssemblyEvents
@@ -88,115 +86,50 @@ enum AssemblyEvents
EVENT_ENDFLIGHT = 15,
EVENT_GROUND = 16,
EVENT_LAND = 17,
- EVENT_MOVE_POSITION = 18,
+ EVENT_MOVE_POSITION = 18
};
enum AssemblyActions
{
- ACTION_STEELBREAKER = 0,
- ACTION_MOLGEIM = 1,
- ACTION_BRUNDIR = 2,
- ACTION_ADD_CHARGE = 3,
+ ACTION_SUPERCHARGE = 1,
+ ACTION_ADD_CHARGE = 2
};
enum AssemblyYells
{
- SAY_STEELBREAKER_AGGRO = -1603020,
- SAY_STEELBREAKER_SLAY_1 = -1603021,
- SAY_STEELBREAKER_SLAY_2 = -1603022,
- SAY_STEELBREAKER_POWER = -1603023,
- SAY_STEELBREAKER_DEATH_1 = -1603024,
- SAY_STEELBREAKER_DEATH_2 = -1603025,
- SAY_STEELBREAKER_BERSERK = -1603026,
-
- SAY_MOLGEIM_AGGRO = -1603030,
- SAY_MOLGEIM_SLAY_1 = -1603031,
- SAY_MOLGEIM_SLAY_2 = -1603032,
- SAY_MOLGEIM_RUNE_DEATH = -1603033,
- SAY_MOLGEIM_SUMMON = -1603034,
- SAY_MOLGEIM_DEATH_1 = -1603035,
- SAY_MOLGEIM_DEATH_2 = -1603036,
- SAY_MOLGEIM_BERSERK = -1603037,
-
- SAY_BRUNDIR_AGGRO = -1603040,
- SAY_BRUNDIR_SLAY_1 = -1603041,
- SAY_BRUNDIR_SLAY_2 = -1603042,
- SAY_BRUNDIR_SPECIAL = -1603043,
- SAY_BRUNDIR_FLIGHT = -1603044,
- SAY_BRUNDIR_DEATH_1 = -1603045,
- SAY_BRUNDIR_DEATH_2 = -1603046,
- SAY_BRUNDIR_BERSERK = -1603047,
+ SAY_STEELBREAKER_AGGRO = 0,
+ SAY_STEELBREAKER_SLAY = 1,
+ SAY_STEELBREAKER_POWER = 2,
+ SAY_STEELBREAKER_DEATH = 3,
+ SAY_STEELBREAKER_ENCOUNTER_DEFEATED = 4,
+ SAY_STEELBREAKER_BERSERK = 5,
+
+ SAY_MOLGEIM_AGGRO = 0,
+ SAY_MOLGEIM_SLAY = 1,
+ SAY_MOLGEIM_RUNE_DEATH = 2,
+ SAY_MOLGEIM_SUMMON = 3,
+ SAY_MOLGEIM_DEATH = 4,
+ SAY_MOLGEIM_ENCOUNTER_DEFEATED = 5,
+ SAY_MOLGEIM_BERSERK = 6,
+
+ SAY_BRUNDIR_AGGRO = 0,
+ SAY_BRUNDIR_SLAY = 1,
+ SAY_BRUNDIR_SPECIAL = 2,
+ SAY_BRUNDIR_FLIGHT = 3,
+ SAY_BRUNDIR_DEATH = 4,
+ SAY_BRUNDIR_ENCOUNTER_DEFEATED = 5,
+ SAY_BRUNDIR_BERSERK = 6,
+ EMOTE_BRUNDIR_OVERLOAD = 7
};
enum AssemblyNPCs
{
- NPC_WORLD_TRIGGER = 22515,
+ NPC_WORLD_TRIGGER = 22515
};
-#define EMOTE_OVERLOAD "Stormcaller Brundir begins to Overload!" // Move it to DB
#define FLOOR_Z 427.28f
#define FINAL_FLIGHT_Z 435.0f
-bool IsEncounterComplete(InstanceScript* instance, Creature* me)
-{
- if (!instance || !me)
- return false;
-
- for (uint8 i = 0; i < 3; ++i)
- {
- uint64 guid = instance->GetData64(BOSS_STEELBREAKER + i);
- if (!guid)
- return false;
-
- if (Creature* boss = ObjectAccessor::GetCreature(*me, guid))
- {
- if (boss->isAlive())
- return false;
- }
- else
- return false;
- }
-
- return true;
-}
-
-void RespawnEncounter(InstanceScript* instance, Creature* me)
-{
- for (uint8 i = 0; i < 3; ++i)
- {
- uint64 guid = instance->GetData64(BOSS_STEELBREAKER + i);
- if (!guid)
- continue;
-
- if (Creature* boss = ObjectAccessor::GetCreature(*me, guid))
- {
- if (!boss->isAlive())
- {
- boss->Respawn();
- boss->GetMotionMaster()->MoveTargetedHome();
- }
- }
- }
-}
-
-void StartEncounter(InstanceScript* instance, Creature* me, Unit* /*target*/)
-{
- if (instance->GetBossState(BOSS_ASSEMBLY_OF_IRON) == IN_PROGRESS)
- return; // Prevent recursive calls
-
- instance->SetBossState(BOSS_ASSEMBLY_OF_IRON, IN_PROGRESS);
-
- for (uint8 i = 0; i < 3; ++i)
- {
- uint64 guid = instance->GetData64(BOSS_STEELBREAKER + i);
- if (!guid)
- continue;
-
- if (Creature* boss = ObjectAccessor::GetCreature(*me, guid))
- boss->SetInCombatWithZone();
- }
-}
-
class boss_steelbreaker : public CreatureScript
{
public:
@@ -204,12 +137,8 @@ class boss_steelbreaker : public CreatureScript
struct boss_steelbreakerAI : public BossAI
{
- boss_steelbreakerAI(Creature* creature) : BossAI(creature, BOSS_ASSEMBLY_OF_IRON)
- {
- instance = me->GetInstanceScript();
- }
+ boss_steelbreakerAI(Creature* creature) : BossAI(creature, BOSS_ASSEMBLY_OF_IRON) { }
- InstanceScript* instance;
uint32 phase;
void Reset()
@@ -217,14 +146,12 @@ class boss_steelbreaker : public CreatureScript
_Reset();
phase = 0;
me->RemoveAllAuras();
- RespawnEncounter(instance, me);
}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* /*who*/)
{
- StartEncounter(instance, me, who);
- DoScriptText(SAY_STEELBREAKER_AGGRO, me);
- DoZoneInCombat();
+ _EnterCombat();
+ Talk(SAY_STEELBREAKER_AGGRO);
DoCast(me, SPELL_HIGH_VOLTAGE);
events.SetPhase(++phase);
events.ScheduleEvent(EVENT_BERSERK, 900000);
@@ -235,8 +162,8 @@ class boss_steelbreaker : public CreatureScript
{
switch (action)
{
- case ACTION_STEELBREAKER:
- me->SetHealth(me->GetMaxHealth());
+ case ACTION_SUPERCHARGE:
+ me->SetFullHealth();
me->AddAura(SPELL_SUPERCHARGE, me);
events.SetPhase(++phase);
events.RescheduleEvent(EVENT_FUSION_PUNCH, 15000);
@@ -253,29 +180,33 @@ class boss_steelbreaker : public CreatureScript
void JustDied(Unit* /*killer*/)
{
- DoScriptText(RAND(SAY_STEELBREAKER_DEATH_1, SAY_STEELBREAKER_DEATH_2), me);
- if (IsEncounterComplete(instance, me))
+ _JustDied();
+
+ if (instance->GetBossState(BOSS_ASSEMBLY_OF_IRON) == DONE)
{
- instance->SetBossState(BOSS_ASSEMBLY_OF_IRON, DONE);
- instance->SetBossState(BOSS_STEELBREAKER, DONE);
- instance->SetBossState(BOSS_MOLGEIM, DONE);
- instance->SetBossState(BOSS_BRUNDIR, DONE);
+ DoCastAOE(SPELL_KILL_CREDIT);
+ Talk(SAY_STEELBREAKER_ENCOUNTER_DEFEATED);
}
else
+ {
me->SetLootRecipient(NULL);
+ Talk(SAY_STEELBREAKER_DEATH);
+ //DoCastAOE(SPELL_SUPERCHARGE, true);
- if (Creature* Brundir = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_BRUNDIR)))
- if (Brundir->isAlive())
- Brundir->AI()->DoAction(ACTION_BRUNDIR);
+ if (Creature* Brundir = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_BRUNDIR)))
+ if (Brundir->isAlive())
+ Brundir->AI()->DoAction(ACTION_SUPERCHARGE);
- if (Creature* Molgeim = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_MOLGEIM)))
- if (Molgeim->isAlive())
- Molgeim->AI()->DoAction(ACTION_MOLGEIM);
+ if (Creature* Molgeim = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_MOLGEIM)))
+ if (Molgeim->isAlive())
+ Molgeim->AI()->DoAction(ACTION_SUPERCHARGE);
+ }
}
- void KilledUnit(Unit* /*who*/)
+ void KilledUnit(Unit* who)
{
- DoScriptText(RAND(SAY_STEELBREAKER_SLAY_1, SAY_STEELBREAKER_SLAY_2), me);
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ Talk(SAY_STEELBREAKER_SLAY);
if (phase == 3)
DoCast(me, SPELL_ELECTRICAL_CHARGE);
@@ -296,7 +227,7 @@ class boss_steelbreaker : public CreatureScript
switch (eventId)
{
case EVENT_BERSERK:
- DoScriptText(SAY_STEELBREAKER_BERSERK, me);
+ Talk(SAY_STEELBREAKER_BERSERK);
DoCast(SPELL_BERSERK);
events.CancelEvent(EVENT_BERSERK);
break;
@@ -311,7 +242,7 @@ class boss_steelbreaker : public CreatureScript
events.ScheduleEvent(EVENT_STATIC_DISRUPTION, urand(20000, 40000));
break;
case EVENT_OVERWHELMING_POWER:
- DoScriptText(SAY_STEELBREAKER_POWER, me);
+ Talk(SAY_STEELBREAKER_POWER);
DoCastVictim(SPELL_OVERWHELMING_POWER);
events.ScheduleEvent(EVENT_OVERWHELMING_POWER, RAID_MODE(60000, 35000));
break;
@@ -335,12 +266,8 @@ class boss_runemaster_molgeim : public CreatureScript
struct boss_runemaster_molgeimAI : public BossAI
{
- boss_runemaster_molgeimAI(Creature* creature) : BossAI(creature, BOSS_ASSEMBLY_OF_IRON)
- {
- instance = me->GetInstanceScript();
- }
+ boss_runemaster_molgeimAI(Creature* creature) : BossAI(creature, BOSS_ASSEMBLY_OF_IRON) { }
- InstanceScript* instance;
uint32 phase;
void Reset()
@@ -348,14 +275,12 @@ class boss_runemaster_molgeim : public CreatureScript
_Reset();
phase = 0;
me->RemoveAllAuras();
- RespawnEncounter(instance, me);
}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* /*who*/)
{
- StartEncounter(instance, me, who);
- DoScriptText(SAY_MOLGEIM_AGGRO, me);
- DoZoneInCombat();
+ _EnterCombat();
+ Talk(SAY_MOLGEIM_AGGRO);
events.SetPhase(++phase);
events.ScheduleEvent(EVENT_BERSERK, 900000);
events.ScheduleEvent(EVENT_SHIELD_OF_RUNES, 30000);
@@ -366,8 +291,9 @@ class boss_runemaster_molgeim : public CreatureScript
{
switch (action)
{
- case ACTION_MOLGEIM:
- me->SetHealth(me->GetMaxHealth());
+ case ACTION_SUPERCHARGE:
+ {
+ me->SetFullHealth();
me->AddAura(SPELL_SUPERCHARGE, me);
events.SetPhase(++phase);
events.RescheduleEvent(EVENT_SHIELD_OF_RUNES, 27000);
@@ -376,35 +302,40 @@ class boss_runemaster_molgeim : public CreatureScript
events.RescheduleEvent(EVENT_RUNE_OF_DEATH, 30000);
if (phase >= 3)
events.RescheduleEvent(EVENT_RUNE_OF_SUMMONING, urand(20000, 30000));
- break;
+ break;
+ }
}
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(RAND(SAY_MOLGEIM_DEATH_1, SAY_MOLGEIM_DEATH_2), me);
- if (IsEncounterComplete(instance, me))
+ _JustDied();
+
+ if (instance->GetBossState(BOSS_ASSEMBLY_OF_IRON) == DONE)
{
- instance->SetBossState(BOSS_ASSEMBLY_OF_IRON, DONE);
- instance->SetBossState(BOSS_STEELBREAKER, DONE);
- instance->SetBossState(BOSS_MOLGEIM, DONE);
- instance->SetBossState(BOSS_BRUNDIR, DONE);
+ DoCastAOE(SPELL_KILL_CREDIT);
+ Talk(SAY_MOLGEIM_ENCOUNTER_DEFEATED);
}
else
+ {
me->SetLootRecipient(NULL);
+ Talk(SAY_MOLGEIM_DEATH);
+ //DoCastAOE(SPELL_SUPERCHARGE, true);
- if (Creature* Brundir = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_BRUNDIR)))
- if (Brundir->isAlive())
- Brundir->AI()->DoAction(ACTION_BRUNDIR);
+ if (Creature* Brundir = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_BRUNDIR)))
+ if (Brundir->isAlive())
+ Brundir->AI()->DoAction(ACTION_SUPERCHARGE);
- if (Creature* Steelbreaker = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_STEELBREAKER)))
- if (Steelbreaker->isAlive())
- Steelbreaker->AI()->DoAction(ACTION_STEELBREAKER);
+ if (Creature* Steelbreaker = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_STEELBREAKER)))
+ if (Steelbreaker->isAlive())
+ Steelbreaker->AI()->DoAction(ACTION_SUPERCHARGE);
+ }
}
- void KilledUnit(Unit* /*who*/)
+ void KilledUnit(Unit* who)
{
- DoScriptText(RAND(SAY_MOLGEIM_SLAY_1, SAY_MOLGEIM_SLAY_2), me);
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ Talk(SAY_MOLGEIM_SLAY);
}
void UpdateAI(uint32 const diff)
@@ -422,28 +353,27 @@ class boss_runemaster_molgeim : public CreatureScript
switch (eventId)
{
case EVENT_BERSERK:
- DoScriptText(SAY_MOLGEIM_BERSERK, me);
+ Talk(SAY_MOLGEIM_BERSERK);
DoCast(SPELL_BERSERK);
events.CancelEvent(EVENT_BERSERK);
break;
case EVENT_RUNE_OF_POWER:
{
- Unit* target = NULL;
+ Unit* target = me;
switch (urand(0, 2))
{
- case 0:
- target = me;
- break;
case 1:
- if (Creature* Steelbreaker = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_STEELBREAKER)))
+ if (Creature* Steelbreaker = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_STEELBREAKER)))
if (Steelbreaker->isAlive())
target = Steelbreaker;
break;
case 2:
- if (Creature* Brundir = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_STEELBREAKER)))
+ if (Creature* Brundir = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_STEELBREAKER)))
if (Brundir->isAlive())
target = Brundir;
break;
+ default:
+ break;
}
DoCast(target, SPELL_SUMMON_RUNE_OF_POWER);
events.ScheduleEvent(EVENT_RUNE_OF_POWER, 60000);
@@ -454,13 +384,13 @@ class boss_runemaster_molgeim : public CreatureScript
events.ScheduleEvent(EVENT_SHIELD_OF_RUNES, urand(27000, 34000));
break;
case EVENT_RUNE_OF_DEATH:
- DoScriptText(SAY_MOLGEIM_RUNE_DEATH, me);
+ Talk(SAY_MOLGEIM_RUNE_DEATH);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(target, SPELL_RUNE_OF_DEATH);
events.ScheduleEvent(EVENT_RUNE_OF_DEATH, urand(30000, 40000));
break;
case EVENT_RUNE_OF_SUMMONING:
- DoScriptText(SAY_MOLGEIM_SUMMON, me);
+ Talk(SAY_MOLGEIM_SUMMON);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(target, SPELL_RUNE_OF_SUMMONING);
events.ScheduleEvent(EVENT_RUNE_OF_SUMMONING, urand(30000, 45000));
@@ -478,93 +408,6 @@ class boss_runemaster_molgeim : public CreatureScript
}
};
-class mob_rune_of_power : public CreatureScript
-{
- public:
- mob_rune_of_power() : CreatureScript("mob_rune_of_power") { }
-
- struct mob_rune_of_powerAI : public ScriptedAI
- {
- mob_rune_of_powerAI(Creature* creature) : ScriptedAI(creature)
- {
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- me->setFaction(16); // Same faction as bosses
- DoCast(SPELL_RUNE_OF_POWER);
-
- me->DespawnOrUnsummon(60000);
- }
- };
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_rune_of_powerAI(creature);
- }
-};
-
-class mob_lightning_elemental : public CreatureScript
-{
- public:
- mob_lightning_elemental() : CreatureScript("mob_lightning_elemental") { }
-
- struct mob_lightning_elementalAI : public ScriptedAI
- {
- mob_lightning_elementalAI(Creature* creature) : ScriptedAI(creature)
- {
- me->SetInCombatWithZone();
- me->AddAura(SPELL_LIGHTNING_ELEMENTAL_PASSIVE, me);
- }
-
- // Nothing to do here, just let the creature chase players and procflags == 2 on the applied aura will trigger explosion
- };
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_lightning_elementalAI(creature);
- }
-};
-
-class mob_rune_of_summoning : public CreatureScript
-{
- public:
- mob_rune_of_summoning() : CreatureScript("mob_rune_of_summoning") { }
-
- struct mob_rune_of_summoningAI : public ScriptedAI
- {
- mob_rune_of_summoningAI(Creature* creature) : ScriptedAI(creature)
- {
- me->AddAura(SPELL_RUNE_OF_SUMMONING_VIS, me);
- summonCount = 0;
- summonTimer = 2000;
- }
-
- uint32 summonCount;
- uint32 summonTimer;
-
- void UpdateAI(uint32 const diff)
- {
- if (summonTimer <= diff)
- SummonLightningElemental();
- else
- summonTimer -= diff;
- }
-
- void SummonLightningElemental()
- {
- me->CastSpell(me, SPELL_RUNE_OF_SUMMONING_SUMMON, false);
- if (++summonCount == 10) // TODO: Find out if this amount is right
- me->DespawnOrUnsummon();
- else
- summonTimer = 2000; // TODO: Find out of timer is right
- }
- };
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_rune_of_summoningAI(creature);
- }
-};
-
class boss_stormcaller_brundir : public CreatureScript
{
public:
@@ -572,12 +415,8 @@ class boss_stormcaller_brundir : public CreatureScript
struct boss_stormcaller_brundirAI : public BossAI
{
- boss_stormcaller_brundirAI(Creature* creature) : BossAI(creature, BOSS_ASSEMBLY_OF_IRON)
- {
- instance = me->GetInstanceScript();
- }
+ boss_stormcaller_brundirAI(Creature* creature) : BossAI(creature, BOSS_ASSEMBLY_OF_IRON) { }
- InstanceScript* instance;
uint32 phase;
void Reset()
@@ -587,15 +426,13 @@ class boss_stormcaller_brundir : public CreatureScript
me->RemoveAllAuras();
me->SetDisableGravity(false);
me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_INTERRUPT, false); // Should be interruptable unless overridden by spell (Overload)
- me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_STUN, false); // Reset immumity, Brundir should be stunnable by default
- RespawnEncounter(instance, me);
+ me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_STUN, false); // Reset immumity, Brundir should be stunnable by default
}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* /*who*/)
{
- StartEncounter(instance, me, who);
- DoScriptText(SAY_BRUNDIR_AGGRO, me);
- DoZoneInCombat();
+ _EnterCombat();
+ Talk(SAY_BRUNDIR_AGGRO);
events.SetPhase(++phase);
events.ScheduleEvent(EVENT_MOVE_POSITION, 1000);
events.ScheduleEvent(EVENT_BERSERK, 900000);
@@ -607,8 +444,9 @@ class boss_stormcaller_brundir : public CreatureScript
{
switch (action)
{
- case ACTION_BRUNDIR:
- me->SetHealth(me->GetMaxHealth());
+ case ACTION_SUPERCHARGE:
+ {
+ me->SetFullHealth();
me->AddAura(SPELL_SUPERCHARGE, me);
events.SetPhase(++phase);
events.RescheduleEvent(EVENT_CHAIN_LIGHTNING, urand(7000, 12000));
@@ -619,42 +457,46 @@ class boss_stormcaller_brundir : public CreatureScript
{
DoCast(me, SPELL_STORMSHIELD);
events.RescheduleEvent(EVENT_LIGHTNING_TENDRILS, urand(50000, 60000));
- me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_STUN, true); // Apply immumity to stuns
+ me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_STUN, true); // Apply immumity to stuns
}
- break;
-
+ break;
+ }
}
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(RAND(SAY_BRUNDIR_DEATH_1, SAY_BRUNDIR_DEATH_2), me);
- if (IsEncounterComplete(instance, me))
+ _JustDied();
+
+ if (instance->GetBossState(BOSS_ASSEMBLY_OF_IRON) == DONE)
{
- instance->SetBossState(BOSS_ASSEMBLY_OF_IRON, DONE);
- instance->SetBossState(BOSS_STEELBREAKER, DONE);
- instance->SetBossState(BOSS_MOLGEIM, DONE);
- instance->SetBossState(BOSS_BRUNDIR, DONE);
+ DoCastAOE(SPELL_KILL_CREDIT);
+ Talk(SAY_BRUNDIR_ENCOUNTER_DEFEATED);
}
else
+ {
me->SetLootRecipient(NULL);
+ Talk(SAY_BRUNDIR_DEATH);
+ //DoCastAOE(SPELL_SUPERCHARGE, true);
- if (Creature* Molgeim = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_MOLGEIM)))
- if (Molgeim->isAlive())
- Molgeim->AI()->DoAction(ACTION_MOLGEIM);
+ if (Creature* Molgeim = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_MOLGEIM)))
+ if (Molgeim->isAlive())
+ Molgeim->AI()->DoAction(ACTION_SUPERCHARGE);
- if (Creature* Steelbreaker = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_STEELBREAKER)))
- if (Steelbreaker->isAlive())
- Steelbreaker->AI()->DoAction(ACTION_STEELBREAKER);
+ if (Creature* Steelbreaker = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_STEELBREAKER)))
+ if (Steelbreaker->isAlive())
+ Steelbreaker->AI()->DoAction(ACTION_SUPERCHARGE);
+ }
// Prevent to have Brundir somewhere in the air when he die in Air phase
if (me->GetPositionZ() > FLOOR_Z)
me->GetMotionMaster()->MoveFall();
}
- void KilledUnit(Unit* /*who*/)
+ void KilledUnit(Unit* who)
{
- DoScriptText(RAND(SAY_BRUNDIR_SLAY_1, SAY_BRUNDIR_SLAY_2), me);
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ Talk(SAY_BRUNDIR_SLAY);
}
void UpdateAI(uint32 const diff)
@@ -672,7 +514,7 @@ class boss_stormcaller_brundir : public CreatureScript
switch (eventId)
{
case EVENT_BERSERK:
- DoScriptText(SAY_BRUNDIR_BERSERK, me);
+ Talk(SAY_BRUNDIR_BERSERK);
DoCast(SPELL_BERSERK);
events.CancelEvent(EVENT_BERSERK);
break;
@@ -682,8 +524,8 @@ class boss_stormcaller_brundir : public CreatureScript
events.ScheduleEvent(EVENT_CHAIN_LIGHTNING, urand(7000, 10000));
break;
case EVENT_OVERLOAD:
- me->MonsterTextEmote(EMOTE_OVERLOAD, 0, true);
- DoScriptText(SAY_BRUNDIR_SPECIAL, me);
+ Talk(EMOTE_BRUNDIR_OVERLOAD);
+ Talk(SAY_BRUNDIR_SPECIAL);
DoCast(SPELL_OVERLOAD);
events.ScheduleEvent(EVENT_OVERLOAD, urand(60000, 120000));
break;
@@ -692,7 +534,7 @@ class boss_stormcaller_brundir : public CreatureScript
events.ScheduleEvent(EVENT_LIGHTNING_WHIRL, urand(15000, 20000));
break;
case EVENT_LIGHTNING_TENDRILS:
- DoScriptText(SAY_BRUNDIR_FLIGHT, me);
+ Talk(SAY_BRUNDIR_FLIGHT);
DoCast(RAID_MODE(SPELL_LIGHTNING_TENDRILS_10M, SPELL_LIGHTNING_TENDRILS_25M));
DoCast(SPELL_LIGHTNING_TENDRILS_VISUAL);
me->AttackStop();
@@ -798,7 +640,7 @@ class spell_assembly_meltdown : public SpellScriptLoader
void HandleInstaKill(SpellEffIndex /*effIndex*/)
{
if (InstanceScript* instance = GetCaster()->GetInstanceScript())
- if (Creature* Steelbreaker = ObjectAccessor::GetCreature(*GetCaster(), instance->GetData64(BOSS_STEELBREAKER)))
+ if (Creature* Steelbreaker = ObjectAccessor::GetCreature(*GetCaster(), instance->GetData64(DATA_STEELBREAKER)))
Steelbreaker->AI()->DoAction(ACTION_ADD_CHARGE);
}
@@ -814,14 +656,53 @@ class spell_assembly_meltdown : public SpellScriptLoader
}
};
+class spell_assembly_rune_of_summoning : public SpellScriptLoader
+{
+ public:
+ spell_assembly_rune_of_summoning() : SpellScriptLoader("spell_assembly_rune_of_summoning") { }
+
+ class spell_assembly_rune_of_summoning_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_assembly_rune_of_summoning_AuraScript);
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_RUNE_OF_SUMMONING_SUMMON))
+ return false;
+ return true;
+ }
+
+ void HandlePeriodic(AuraEffect const* aurEff)
+ {
+ PreventDefaultAction();
+ GetTarget()->CastSpell(GetTarget(), SPELL_RUNE_OF_SUMMONING_SUMMON, true, NULL, aurEff, GetTarget()->isSummon() ? GetTarget()->ToTempSummon()->GetSummonerGUID() : 0);
+ }
+
+ void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ if (TempSummon* summ = GetTarget()->ToTempSummon())
+ summ->DespawnOrUnsummon(1);
+ }
+
+ void Register()
+ {
+ OnEffectPeriodic += AuraEffectPeriodicFn(spell_assembly_rune_of_summoning_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
+ OnEffectRemove += AuraEffectRemoveFn(spell_assembly_rune_of_summoning_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const
+ {
+ return new spell_assembly_rune_of_summoning_AuraScript();
+ }
+};
+
void AddSC_boss_assembly_of_iron()
{
new boss_steelbreaker();
new boss_runemaster_molgeim();
new boss_stormcaller_brundir();
- new mob_lightning_elemental();
- new mob_rune_of_summoning();
- new mob_rune_of_power();
new spell_shield_of_runes();
new spell_assembly_meltdown();
+ new spell_assembly_rune_of_summoning();
}
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp
index bfe158051b1..bd063877d39 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp
@@ -76,16 +76,12 @@ enum AuriayaEvents
enum AuriayaYells
{
- // Yells
- SAY_AGGRO = -1603050,
- SAY_SLAY_1 = -1603051,
- SAY_SLAY_2 = -1603052,
- SAY_DEATH = -1603053,
- SAY_BERSERK = -1603054,
-
- // Emotes
- EMOTE_FEAR = -1603055,
- EMOTE_DEFENDER = -1603056,
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_BERSERK = 3,
+ EMOTE_FEAR = 4,
+ EMOTE_DEFENDER = 5
};
enum AuriayaActions
@@ -121,7 +117,7 @@ class boss_auriaya : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
events.ScheduleEvent(EVENT_SCREECH, urand(45000, 65000));
events.ScheduleEvent(EVENT_BLAST, urand(20000, 25000));
@@ -131,9 +127,10 @@ class boss_auriaya : public CreatureScript
events.ScheduleEvent(EVENT_BERSERK, 600000);
}
- void KilledUnit(Unit* /*who*/)
+ void KilledUnit(Unit* who)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ Talk(SAY_SLAY);
}
void JustSummoned(Creature* summoned)
@@ -206,8 +203,8 @@ class boss_auriaya : public CreatureScript
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
_JustDied();
+ Talk(SAY_DEATH);
}
void UpdateAI(uint32 const diff)
@@ -229,7 +226,7 @@ class boss_auriaya : public CreatureScript
events.ScheduleEvent(EVENT_SCREECH, urand(40000, 60000));
break;
case EVENT_TERRIFYING:
- DoScriptText(EMOTE_FEAR, me);
+ Talk(EMOTE_FEAR);
DoCast(SPELL_TERRIFYING_SCREECH);
events.ScheduleEvent(EVENT_TERRIFYING, urand(20000, 30000));
break;
@@ -238,7 +235,7 @@ class boss_auriaya : public CreatureScript
events.ScheduleEvent(EVENT_BLAST, urand(25000, 35000));
break;
case EVENT_DEFENDER:
- DoScriptText(EMOTE_DEFENDER, me);
+ Talk(EMOTE_DEFENDER);
DoCast(SPELL_DEFENDER_TRIGGER);
if (Creature* trigger = me->FindNearestCreature(NPC_FERAL_DEFENDER_TRIGGER, 15.0f, true))
DoCast(trigger, SPELL_ACTIVATE_DEFENDER, true);
@@ -262,7 +259,7 @@ class boss_auriaya : public CreatureScript
break;
case EVENT_BERSERK:
DoCast(me, SPELL_BERSERK, true);
- DoScriptText(SAY_BERSERK, me);
+ Talk(SAY_BERSERK);
events.CancelEvent(EVENT_BERSERK);
break;
}
@@ -296,17 +293,17 @@ class npc_auriaya_seeping_trigger : public CreatureScript
instance = me->GetInstanceScript();
}
- void Reset()
- {
- me->DespawnOrUnsummon(600000);
- DoCast(me, SPELL_SEEPING_ESSENCE);
- }
+ void Reset()
+ {
+ me->DespawnOrUnsummon(600000);
+ DoCast(me, SPELL_SEEPING_ESSENCE);
+ }
- void UpdateAI(uint32 const /*diff*/)
- {
- if (instance->GetBossState(BOSS_AURIAYA) != IN_PROGRESS)
- me->DespawnOrUnsummon();
- }
+ void UpdateAI(uint32 const /*diff*/)
+ {
+ if (instance->GetBossState(BOSS_AURIAYA) != IN_PROGRESS)
+ me->DespawnOrUnsummon();
+ }
private:
InstanceScript* instance;
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 a26f5763472..921d67d6d65 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp
@@ -141,9 +141,6 @@ enum Vehicles
VEHICLE_DEMOLISHER = 33109,
};
-#define EMOTE_PURSUE "Flame Leviathan pursues $N."
-#define EMOTE_OVERLOAD "Flame Leviathan's circuits overloaded."
-#define EMOTE_REPAIR "Automatic repair sequence initiated."
#define DATA_SHUTOUT 29112912 // 2911, 2912 are achievement IDs
#define DATA_ORBIT_ACHIEVEMENTS 1
#define VEHICLE_SPAWNS 5
@@ -151,22 +148,21 @@ enum Vehicles
enum Yells
{
- SAY_AGGRO = -1603060,
- SAY_SLAY = -1603061,
- SAY_DEATH = -1603062,
- SAY_TARGET_1 = -1603063,
- SAY_TARGET_2 = -1603064,
- SAY_TARGET_3 = -1603065,
- SAY_HARDMODE = -1603066,
- SAY_TOWER_NONE = -1603067,
- SAY_TOWER_FROST = -1603068,
- SAY_TOWER_FLAME = -1603069,
- SAY_TOWER_NATURE = -1603070,
- SAY_TOWER_STORM = -1603071,
- SAY_PLAYER_RIDING = -1603072,
- SAY_OVERLOAD_1 = -1603073,
- SAY_OVERLOAD_2 = -1603074,
- SAY_OVERLOAD_3 = -1603075,
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_TARGET = 3,
+ SAY_HARDMODE = 4,
+ SAY_TOWER_NONE = 5,
+ SAY_TOWER_FROST = 6,
+ SAY_TOWER_FLAME = 7,
+ SAY_TOWER_NATURE = 8,
+ SAY_TOWER_STORM = 9,
+ SAY_PLAYER_RIDING = 10,
+ SAY_OVERLOAD = 11,
+ EMOTE_PURSUE = 12,
+ EMOTE_OVERLOAD = 13,
+ EMOTE_REPAIR = 14
};
enum MiscellanousData
@@ -179,15 +175,8 @@ enum MiscellanousData
FOUR_SEATS = 4,
};
-Position const Center[]=
-{
- {354.8771f, -12.90240f, 409.803650f, 0.0f},
-};
-
-Position const InfernoStart[]=
-{
- {390.93f, -13.91f, 409.81f, 0.0f},
-};
+Position const Center = { 354.8771f, -12.90240f, 409.803650f, 0.0f };
+Position const InfernoStart = { 390.93f, -13.91f, 409.81f, 0.0f };
Position const PosSiege[VEHICLE_SPAWNS] =
{
@@ -320,12 +309,12 @@ class boss_flame_leviathan : public CreatureScript
}
if (!towerOfLife && !towerOfFrost && !towerOfFlames && !towerOfStorms)
- DoScriptText(SAY_TOWER_NONE, me);
+ Talk(SAY_TOWER_NONE);
else
- DoScriptText(SAY_HARDMODE, me);
+ Talk(SAY_HARDMODE);
}
else
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void JustDied(Unit* /*killer*/)
@@ -334,7 +323,7 @@ class boss_flame_leviathan : public CreatureScript
// Set Field Flags 67108928 = 64 | 67108864 = UNIT_FLAG_UNK_6 | UNIT_FLAG_SKINNABLE
// Set DynFlags 12
// Set NPCFlags 0
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void SpellHit(Unit* /*caster*/, SpellInfo const* spell)
@@ -397,7 +386,7 @@ class boss_flame_leviathan : public CreatureScript
switch (eventId)
{
case EVENT_PURSUE:
- DoScriptText(RAND(SAY_TARGET_1, SAY_TARGET_2, SAY_TARGET_3), me);
+ Talk(SAY_TARGET);
DoCast(SPELL_PURSUED); // Will select target in spellscript
events.ScheduleEvent(EVENT_PURSUE, 35*IN_MILLISECONDS);
break;
@@ -420,8 +409,8 @@ class boss_flame_leviathan : public CreatureScript
events.ScheduleEvent(EVENT_SUMMON, 2*IN_MILLISECONDS);
break;
case EVENT_SHUTDOWN:
- DoScriptText(RAND(SAY_OVERLOAD_1, SAY_OVERLOAD_2, SAY_OVERLOAD_3), me);
- me->MonsterTextEmote(EMOTE_OVERLOAD, 0, true);
+ Talk(SAY_OVERLOAD);
+ Talk(EMOTE_OVERLOAD);
me->CastSpell(me, SPELL_SYSTEMS_SHUTDOWN, true);
if (Shutout)
Shutout = false;
@@ -429,7 +418,7 @@ class boss_flame_leviathan : public CreatureScript
events.DelayEvents(20 * IN_MILLISECONDS, 0);
break;
case EVENT_REPAIR:
- me->MonsterTextEmote(EMOTE_REPAIR, 0, true);
+ Talk(EMOTE_REPAIR);
me->ClearUnitState(UNIT_STATE_STUNNED | UNIT_STATE_ROOT);
events.ScheduleEvent(EVENT_SHUTDOWN, 150*IN_MILLISECONDS);
events.CancelEvent(EVENT_REPAIR);
@@ -440,12 +429,12 @@ class boss_flame_leviathan : public CreatureScript
if (Creature* thorim = DoSummon(NPC_THORIM_BEACON, me, float(urand(20, 60)), 20000, TEMPSUMMON_TIMED_DESPAWN))
thorim->GetMotionMaster()->MoveRandom(100);
}
- DoScriptText(SAY_TOWER_STORM, me);
+ Talk(SAY_TOWER_STORM);
events.CancelEvent(EVENT_THORIM_S_HAMMER);
break;
case EVENT_MIMIRON_S_INFERNO: // Tower of Flames
- me->SummonCreature(NPC_MIMIRON_BEACON, InfernoStart->GetPositionX(), InfernoStart->GetPositionY(), InfernoStart->GetPositionZ());
- DoScriptText(SAY_TOWER_FLAME, me);
+ me->SummonCreature(NPC_MIMIRON_BEACON, InfernoStart);
+ Talk(SAY_TOWER_FLAME);
events.CancelEvent(EVENT_MIMIRON_S_INFERNO);
break;
case EVENT_HODIR_S_FURY: // Tower of Frost
@@ -454,11 +443,11 @@ class boss_flame_leviathan : public CreatureScript
if (Creature* hodir = DoSummon(NPC_HODIR_BEACON, me, 50, 0))
hodir->GetMotionMaster()->MoveRandom(100);
}
- DoScriptText(SAY_TOWER_FROST, me);
+ Talk(SAY_TOWER_FROST);
events.CancelEvent(EVENT_HODIR_S_FURY);
break;
case EVENT_FREYA_S_WARD: // Tower of Nature
- DoScriptText(SAY_TOWER_NATURE, me);
+ Talk(SAY_TOWER_NATURE);
for (int32 i = 0; i < 4; ++i)
me->SummonCreature(NPC_FREYA_BEACON, FreyaBeacons[i]);
@@ -529,8 +518,8 @@ class boss_flame_leviathan : public CreatureScript
case ACTION_MOVE_TO_CENTER_POSITION: // Triggered by 2 Collossus near door
if (!me->isDead())
{
- me->SetHomePosition(Center->GetPositionX(), Center->GetPositionY(), Center->GetPositionZ(), 0);
- me->GetMotionMaster()->MoveCharge(Center->GetPositionX(), Center->GetPositionY(), Center->GetPositionZ()); //position center
+ me->SetHomePosition(Center);
+ me->GetMotionMaster()->MoveCharge(Center.GetPositionX(), Center.GetPositionY(), Center.GetPositionZ()); // position center
me->SetReactState(REACT_AGGRESSIVE);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_STUNNED);
return;
@@ -593,8 +582,8 @@ class boss_flame_leviathan_seat : public CreatureScript
{
if (!apply)
return;
- else
- DoScriptText(SAY_PLAYER_RIDING, me);
+ else if (Creature* leviathan = me->GetVehicleCreatureBase())
+ leviathan->AI()->Talk(SAY_PLAYER_RIDING);
if (Creature* turret = me->GetVehicleKit()->GetPassenger(SEAT_TURRET)->ToCreature())
{
@@ -887,7 +876,7 @@ class npc_colossus : public CreatureScript
void JustDied(Unit* /*killer*/)
{
- if (me->GetHomePosition().IsInDist(Center, 50.f))
+ if (me->GetHomePosition().IsInDist(&Center, 50.f))
instance->SetData(DATA_COLOSSUS, instance->GetData(DATA_COLOSSUS)+1);
}
@@ -1187,7 +1176,7 @@ class npc_lorekeeper : public CreatureScript
if (Creature* Branz = creature->FindNearestCreature(NPC_BRANZ_BRONZBEARD, 1000, true))
{
Delorah->GetMotionMaster()->MovePoint(0, Branz->GetPositionX()-4, Branz->GetPositionY(), Branz->GetPositionZ());
- //TODO DoScriptText(xxxx, Delorah, Branz); when reached at branz
+ //TODO Delorah->AI()->Talk(xxxx, Branz->GetGUID()); when reached at branz
}
}
}
@@ -1700,7 +1689,7 @@ class spell_pursue : public SpellScriptLoader
{
if (IS_PLAYER_GUID(itr->second.Passenger))
{
- caster->MonsterTextEmote(EMOTE_PURSUE, itr->second.Passenger, true);
+ caster->AI()->Talk(EMOTE_PURSUE, itr->second.Passenger);
return;
}
}
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp
index f60922c426c..b894706e0bf 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp
@@ -27,34 +27,23 @@
enum FreyaYells
{
// Freya
- SAY_AGGRO = -1603180,
- SAY_AGGRO_WITH_ELDER = -1603181,
- SAY_SLAY_1 = -1603182,
- SAY_SLAY_2 = -1603183,
- SAY_DEATH = -1603184,
- SAY_BERSERK = -1603185,
- SAY_SUMMON_CONSERVATOR = -1603186,
- SAY_SUMMON_TRIO = -1603187,
- SAY_SUMMON_LASHERS = -1603188,
- SAY_YS_HELP = -1603189,
-
- // Elder Brightleaf
- SAY_BRIGHTLEAF_AGGRO = -1603190,
- SAY_BRIGHTLEAF_SLAY_1 = -1603191,
- SAY_BRIGHTLEAF_SLAY_2 = -1603192,
- SAY_BRIGHTLEAF_DEATH = -1603193,
-
- // Elder Ironbranch
- SAY_IRONBRANCH_AGGRO = -1603194,
- SAY_IRONBRANCH_SLAY_1 = -1603195,
- SAY_IRONBRANCH_SLAY_2 = -1603196,
- SAY_IRONBRANCH_DEATH = -1603197,
-
- // Elder Stonebark
- SAY_STONEBARK_AGGRO = -1603198,
- SAY_STONEBARK_SLAY_1 = -1603199,
- SAY_STONEBARK_SLAY_2 = -1603200,
- SAY_STONEBARK_DEATH = -1603201,
+ SAY_AGGRO = 0,
+ SAY_AGGRO_WITH_ELDER = 1,
+ SAY_SLAY = 2,
+ SAY_DEATH = 3,
+ SAY_BERSERK = 4,
+ SAY_SUMMON_CONSERVATOR = 5,
+ SAY_SUMMON_TRIO = 6,
+ SAY_SUMMON_LASHERS = 7,
+ EMOTE_LIFEBINDERS_GIFT = 8,
+ EMOTE_ALLIES_OF_NATURE = 9,
+ EMOTE_GROUND_TREMOR = 10,
+ EMOTE_IRON_ROOTS = 11,
+
+ // Elder Brightleaf / Elder Ironbranch / Elder Stonebark
+ SAY_ELDER_AGGRO = 0,
+ SAY_ELDER_SLAY = 1,
+ SAY_ELDER_DEATH = 2
};
enum FreyaSpells
@@ -143,7 +132,7 @@ enum FreyaSpells
// Nature Bomb
SPELL_NATURE_BOMB = 64587,
SPELL_OBJECT_BOMB = 64600,
- SPELL_SUMMON_NATURE_BOMB = 64606,
+ SPELL_SUMMON_NATURE_BOMB = 64604,
// Unstable Sun Beam
SPELL_UNSTABLE_SUN_BEAM = 62211,
@@ -159,7 +148,7 @@ enum FreyaSpells
// Attuned To Nature spells
SPELL_ATTUNED_TO_NATURE_2_DOSE_REDUCTION = 62524,
SPELL_ATTUNED_TO_NATURE_10_DOSE_REDUCTION = 62525,
- SPELL_ATTUNED_TO_NATURE_25_DOSE_REDUCTION = 62521,
+ SPELL_ATTUNED_TO_NATURE_25_DOSE_REDUCTION = 62521
};
enum FreyaNpcs
@@ -177,13 +166,13 @@ enum FreyaNpcs
NPC_IRON_ROOTS = 33088,
NPC_STRENGTHENED_IRON_ROOTS = 33168,
- OBJECT_NATURE_BOMB = 194902,
+ OBJECT_NATURE_BOMB = 194902
};
enum FreyaActions
{
ACTION_ELDER_DEATH = 1,
- ACTION_ELDER_FREYA_KILLED = 2,
+ ACTION_ELDER_FREYA_KILLED = 2
};
enum FreyaEvents
@@ -211,13 +200,16 @@ enum FreyaEvents
// Elder Brightleaf
EVENT_SOLAR_FLARE = 15,
EVENT_UNSTABLE_SUN_BEAM = 16,
- EVENT_FLUX = 17,
+ EVENT_FLUX = 17
};
-#define WAVE_TIME 60000 // Normal wave is one minute
-#define TIME_DIFFERENCE 10000 // If difference between waveTime and WAVE_TIME is bigger then TIME_DIFFERENCE, schedule EVENT_WAVE in 10 seconds
-#define DATA_GETTING_BACK_TO_NATURE 1
-#define DATA_KNOCK_ON_WOOD 2
+enum Misc
+{
+ WAVE_TIME = 60000, // Normal wave is one minute
+ TIME_DIFFERENCE = 10000, // If difference between waveTime and WAVE_TIME is bigger then TIME_DIFFERENCE, schedule EVENT_WAVE in 10 seconds
+ DATA_GETTING_BACK_TO_NATURE = 1,
+ DATA_KNOCK_ON_WOOD = 2
+};
class npc_iron_roots : public CreatureScript
{
@@ -273,9 +265,7 @@ class boss_freya : public CreatureScript
struct boss_freyaAI : public BossAI
{
- boss_freyaAI(Creature* creature) : BossAI(creature, BOSS_FREYA)
- {
- }
+ boss_freyaAI(Creature* creature) : BossAI(creature, BOSS_FREYA) { }
uint64 ElementalGUID[3][2];
@@ -316,9 +306,10 @@ class boss_freya : public CreatureScript
random[n] = false;
}
- void KilledUnit(Unit* /*who*/)
+ void KilledUnit(Unit* who)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ Talk(SAY_SLAY);
}
void DamageTaken(Unit* who, uint32& damage)
@@ -369,9 +360,9 @@ class boss_freya : public CreatureScript
}
if (elderCount == 0)
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
else
- DoScriptText(SAY_AGGRO_WITH_ELDER, me);
+ Talk(SAY_AGGRO_WITH_ELDER);
me->CastCustomSpell(SPELL_ATTUNED_TO_NATURE, SPELLVALUE_AURA_STACK, 150, me, true);
@@ -409,7 +400,7 @@ class boss_freya : public CreatureScript
switch (eventId)
{
case EVENT_ENRAGE:
- DoScriptText(SAY_BERSERK, me);
+ Talk(SAY_BERSERK);
DoCast(me, SPELL_ENRAGE);
break;
case EVENT_SUNBEAM:
@@ -418,17 +409,9 @@ class boss_freya : public CreatureScript
events.ScheduleEvent(EVENT_SUNBEAM, urand(10000, 15000));
break;
case EVENT_NATURE_BOMB:
- {
- // On every player
- std::list<Player*> PlayerList;
- Trinity::AnyPlayerInObjectRangeCheck checker(me, 50.0f);
- Trinity::PlayerListSearcher<Trinity::AnyPlayerInObjectRangeCheck> searcher(me, PlayerList, checker);
- me->VisitNearbyWorldObject(50.0f, searcher);
- for (std::list<Player*>::const_iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr)
- (*itr)->CastSpell(*itr, SPELL_SUMMON_NATURE_BOMB, true);
+ DoCastAOE(SPELL_SUMMON_NATURE_BOMB, true);
events.ScheduleEvent(EVENT_NATURE_BOMB, urand(10000, 12000));
break;
- }
case EVENT_UNSTABLE_ENERGY:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true))
DoCast(target, SPELL_FREYA_UNSTABLE_SUNBEAM, true);
@@ -442,15 +425,18 @@ class boss_freya : public CreatureScript
events.ScheduleEvent(EVENT_NATURE_BOMB, urand(10000, 20000));
break;
case EVENT_EONAR_GIFT:
+ Talk(EMOTE_LIFEBINDERS_GIFT);
DoCast(me, SPELL_SUMMON_EONAR_GIFT);
events.ScheduleEvent(EVENT_EONAR_GIFT, urand(40000, 50000));
break;
case EVENT_STRENGTHENED_IRON_ROOTS:
+ Talk(EMOTE_IRON_ROOTS);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true, -SPELL_ROOTS_FREYA))
target->CastSpell(target, SPELL_ROOTS_FREYA, true); // This must be casted by Target self
events.ScheduleEvent(EVENT_STRENGTHENED_IRON_ROOTS, urand(12000, 20000));
break;
case EVENT_GROUND_TREMOR:
+ Talk(EMOTE_GROUND_TREMOR);
DoCastAOE(SPELL_FREYA_GROUND_TREMOR);
events.ScheduleEvent(EVENT_GROUND_TREMOR, urand(25000, 28000));
break;
@@ -573,20 +559,21 @@ class boss_freya : public CreatureScript
switch (GetWaveId())
{
case 0:
- DoScriptText(SAY_SUMMON_LASHERS, me);
+ Talk(SAY_SUMMON_LASHERS);
for (uint8 n = 0; n < 10; ++n)
DoCast(SPELL_SUMMON_LASHERS);
break;
case 1:
- DoScriptText(SAY_SUMMON_TRIO, me);
+ Talk(SAY_SUMMON_TRIO);
DoCast(SPELL_SUMMON_TRIO);
trioWaveCount++;
break;
case 2:
- DoScriptText(SAY_SUMMON_CONSERVATOR, me);
+ Talk(SAY_SUMMON_CONSERVATOR);
DoCast(SPELL_SUMMON_ANCIENT_CONSERVATOR);
break;
}
+ Talk(EMOTE_ALLIES_OF_NATURE);
waveCount++;
}
@@ -602,7 +589,7 @@ class boss_freya : public CreatureScript
me->CastSpell((Unit*)NULL, summonSpell[me->GetMap()->GetDifficulty()][elderCount], true);
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
me->SetReactState(REACT_PASSIVE);
_JustDied();
me->RemoveAllAuras();
@@ -705,17 +692,18 @@ class boss_elder_brightleaf : public CreatureScript
lumberjack = false;
}
- void KilledUnit(Unit* /*who*/)
+ void KilledUnit(Unit* who)
{
- DoScriptText(RAND(SAY_BRIGHTLEAF_SLAY_1, SAY_BRIGHTLEAF_SLAY_2), me);
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ Talk(SAY_ELDER_SLAY);
}
void JustDied(Unit* killer)
{
_JustDied();
- DoScriptText(SAY_BRIGHTLEAF_DEATH, me);
+ Talk(SAY_ELDER_DEATH);
- if (killer && killer->GetTypeId() == TYPEID_PLAYER)
+ if (killer->GetTypeId() == TYPEID_PLAYER)
{
if (Creature* Ironbranch = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_IRONBRANCH)))
Ironbranch->AI()->DoAction(ACTION_ELDER_DEATH);
@@ -729,7 +717,7 @@ class boss_elder_brightleaf : public CreatureScript
{
_EnterCombat();
if (!me->HasAura(SPELL_DRAINED_OF_POWER))
- DoScriptText(SAY_BRIGHTLEAF_AGGRO, me);
+ Talk(SAY_ELDER_AGGRO);
}
void UpdateAI(uint32 const diff)
@@ -825,17 +813,18 @@ class boss_elder_stonebark : public CreatureScript
lumberjack = false;
}
- void KilledUnit(Unit* /*who*/)
+ void KilledUnit(Unit* who)
{
- DoScriptText(RAND(SAY_STONEBARK_SLAY_1, SAY_STONEBARK_SLAY_2), me);
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ Talk(SAY_ELDER_SLAY);
}
void JustDied(Unit* killer)
{
_JustDied();
- DoScriptText(SAY_STONEBARK_DEATH, me);
+ Talk(SAY_ELDER_DEATH);
- if (killer && killer->GetTypeId() == TYPEID_PLAYER)
+ if (killer->GetTypeId() == TYPEID_PLAYER)
{
if (Creature* Ironbranch = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_IRONBRANCH)))
Ironbranch->AI()->DoAction(ACTION_ELDER_DEATH);
@@ -849,7 +838,7 @@ class boss_elder_stonebark : public CreatureScript
{
_EnterCombat();
if (!me->HasAura(SPELL_DRAINED_OF_POWER))
- DoScriptText(SAY_STONEBARK_AGGRO, me);
+ Talk(SAY_ELDER_AGGRO);
}
void DamageTaken(Unit* who, uint32& damage)
@@ -951,17 +940,18 @@ class boss_elder_ironbranch : public CreatureScript
lumberjack = false;
}
- void KilledUnit(Unit* /*who*/)
+ void KilledUnit(Unit* who)
{
- DoScriptText(RAND(SAY_IRONBRANCH_SLAY_1, SAY_IRONBRANCH_SLAY_2), me);
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ Talk(SAY_ELDER_SLAY);
}
void JustDied(Unit* killer)
{
_JustDied();
- DoScriptText(SAY_IRONBRANCH_DEATH, me);
+ Talk(SAY_ELDER_DEATH);
- if (killer && killer->GetTypeId() == TYPEID_PLAYER)
+ if (killer->GetTypeId() == TYPEID_PLAYER)
{
if (Creature* Brightleaf = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_BRIGHTLEAF)))
Brightleaf->AI()->DoAction(ACTION_ELDER_DEATH);
@@ -975,7 +965,7 @@ class boss_elder_ironbranch : public CreatureScript
{
_EnterCombat();
if (!me->HasAura(SPELL_DRAINED_OF_POWER))
- DoScriptText(SAY_IRONBRANCH_AGGRO, me);
+ Talk(SAY_ELDER_AGGRO);
}
void UpdateAI(uint32 const diff)
@@ -1530,19 +1520,17 @@ class npc_unstable_sun_beam : public CreatureScript
class spell_freya_attuned_to_nature_dose_reduction : public SpellScriptLoader
{
public:
- spell_freya_attuned_to_nature_dose_reduction() : SpellScriptLoader("spell_freya_attuned_to_nature_dose_reduction")
- {
- }
+ spell_freya_attuned_to_nature_dose_reduction() : SpellScriptLoader("spell_freya_attuned_to_nature_dose_reduction") { }
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*/)
{
Unit* target = GetHitUnit();
- SpellInfo const* spellInfo = GetSpellInfo();
- switch (spellInfo->Id)
+
+ switch (GetSpellInfo()->Id)
{
case SPELL_ATTUNED_TO_NATURE_2_DOSE_REDUCTION:
if (target->HasAura(GetEffectValue()))
@@ -1579,9 +1567,7 @@ class spell_freya_attuned_to_nature_dose_reduction : public SpellScriptLoader
class spell_freya_iron_roots : public SpellScriptLoader
{
public:
- spell_freya_iron_roots() : SpellScriptLoader("spell_freya_iron_roots")
- {
- }
+ spell_freya_iron_roots() : SpellScriptLoader("spell_freya_iron_roots") { }
class spell_freya_iron_roots_SpellScript : public SpellScript
{
@@ -1614,80 +1600,44 @@ class spell_freya_iron_roots : public SpellScriptLoader
class achievement_getting_back_to_nature : public AchievementCriteriaScript
{
public:
- achievement_getting_back_to_nature() : AchievementCriteriaScript("achievement_getting_back_to_nature")
- {
- }
+ achievement_getting_back_to_nature() : AchievementCriteriaScript("achievement_getting_back_to_nature") { }
bool OnCheck(Player* /*player*/, Unit* target)
{
- if (!target)
- return false;
-
- if (Creature* Freya = target->ToCreature())
- if (Freya->AI()->GetData(DATA_GETTING_BACK_TO_NATURE) >= 25)
- return true;
-
- return false;
+ return target && target->GetAI()->GetData(DATA_GETTING_BACK_TO_NATURE) >= 25;
}
};
class achievement_knock_on_wood : public AchievementCriteriaScript
{
public:
- achievement_knock_on_wood() : AchievementCriteriaScript("achievement_knock_on_wood")
- {
- }
+ achievement_knock_on_wood() : AchievementCriteriaScript("achievement_knock_on_wood") { }
bool OnCheck(Player* /*player*/, Unit* target)
{
- if (!target)
- return false;
-
- if (Creature* Freya = target->ToCreature())
- if (Freya->AI()->GetData(DATA_KNOCK_ON_WOOD) >= 1)
- return true;
-
- return false;
+ return target && target->GetAI()->GetData(DATA_KNOCK_ON_WOOD) >= 1;
}
};
class achievement_knock_knock_on_wood : public AchievementCriteriaScript
{
public:
- achievement_knock_knock_on_wood() : AchievementCriteriaScript("achievement_knock_knock_on_wood")
- {
- }
+ achievement_knock_knock_on_wood() : AchievementCriteriaScript("achievement_knock_knock_on_wood") { }
bool OnCheck(Player* /*player*/, Unit* target)
{
- if (!target)
- return false;
-
- if (Creature* Freya = target->ToCreature())
- if (Freya->AI()->GetData(DATA_KNOCK_ON_WOOD) >= 2)
- return true;
-
- return false;
+ return target && target->GetAI()->GetData(DATA_KNOCK_ON_WOOD) >= 2;
}
};
class achievement_knock_knock_knock_on_wood : public AchievementCriteriaScript
{
public:
- achievement_knock_knock_knock_on_wood() : AchievementCriteriaScript("achievement_knock_knock_knock_on_wood")
- {
- }
+ achievement_knock_knock_knock_on_wood() : AchievementCriteriaScript("achievement_knock_knock_knock_on_wood") { }
bool OnCheck(Player* /*player*/, Unit* target)
{
- if (!target)
- return false;
-
- if (Creature* Freya = target->ToCreature())
- if (Freya->AI()->GetData(DATA_KNOCK_ON_WOOD) == 3)
- return true;
-
- return false;
+ return target && target->GetAI()->GetData(DATA_KNOCK_ON_WOOD) == 3;
}
};
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 1232c1b9051..43d203daedf 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp
@@ -24,21 +24,22 @@
enum VezaxYells
{
- SAY_AGGRO = -1603290,
- SAY_SLAY_1 = -1603291,
- SAY_SLAY_2 = -1603292,
- SAY_SURGE_OF_DARKNESS = -1603293,
- SAY_DEATH = -1603294,
- SAY_BERSERK = -1603295,
- SAY_HARDMODE = -1603296,
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_SURGE_OF_DARKNESS = 2,
+ SAY_DEATH = 3,
+ SAY_BERSERK = 4,
+ SAY_HARDMODE = 5,
};
enum VezaxEmotes
{
- EMOTE_VAPORS = -1603289,
- EMOTE_ANIMUS = -1603297,
- EMOTE_BARRIER = -1603298,
- EMOTE_SURGE_OF_DARKNESS = -1603299,
+ EMOTE_ANIMUS = 6,
+ EMOTE_BARRIER = 7,
+ EMOTE_SURGE_OF_DARKNESS = 8,
+
+ // Saronite Vapor
+ EMOTE_VAPORS = 9
};
enum VezaxSpells
@@ -122,7 +123,7 @@ class boss_general_vezax : public CreatureScript
{
_EnterCombat();
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
DoCast(me, SPELL_AURA_OF_DESPAIR);
CheckShamanisticRage();
@@ -173,8 +174,8 @@ class boss_general_vezax : public CreatureScript
break;
}
case EVENT_SURGE_OF_DARKNESS:
- DoScriptText(EMOTE_SURGE_OF_DARKNESS, me);
- DoScriptText(SAY_SURGE_OF_DARKNESS, me);
+ Talk(EMOTE_SURGE_OF_DARKNESS);
+ Talk(SAY_SURGE_OF_DARKNESS);
DoCast(me, SPELL_SURGE_OF_DARKNESS);
events.ScheduleEvent(EVENT_SURGE_OF_DARKNESS, urand(50000, 70000));
break;
@@ -183,8 +184,8 @@ class boss_general_vezax : public CreatureScript
events.ScheduleEvent(EVENT_SARONITE_VAPORS, urand(30000, 35000));
if (++vaporCount == 6 && smellSaronite)
{
- DoScriptText(SAY_HARDMODE, me);
- DoScriptText(EMOTE_BARRIER, me);
+ Talk(SAY_HARDMODE);
+ Talk(EMOTE_BARRIER);
summons.DespawnAll();
DoCast(me, SPELL_SARONITE_BARRIER);
DoCast(SPELL_SUMMON_SARONITE_ANIMUS);
@@ -194,7 +195,7 @@ class boss_general_vezax : public CreatureScript
}
break;
case EVENT_BERSERK:
- DoScriptText(SAY_BERSERK, me);
+ Talk(SAY_BERSERK);
DoCast(me, SPELL_BERSERK);
break;
}
@@ -209,15 +210,16 @@ class boss_general_vezax : public CreatureScript
shadowDodger = false;
}
- void KilledUnit(Unit* /*who*/)
+ void KilledUnit(Unit* who)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
_JustDied();
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_AURA_OF_DESPAIR);
}
@@ -316,7 +318,6 @@ class boss_saronite_animus : public CreatureScript
boss_saronite_animusAI(Creature* creature) : ScriptedAI(creature)
{
instance = me->GetInstanceScript();
- DoScriptText(EMOTE_BARRIER, me);
}
void Reset()
@@ -378,7 +379,7 @@ class npc_saronite_vapors : public CreatureScript
{
npc_saronite_vaporsAI(Creature* creature) : ScriptedAI(creature)
{
- DoScriptText(EMOTE_VAPORS, me);
+ Talk(EMOTE_VAPORS);
instance = me->GetInstanceScript();
me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true);
me->ApplySpellImmune(0, IMMUNITY_ID, 49560, true); // Death Grip jump effect
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp
index c9fe1c5b707..8247236016c 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp
@@ -32,18 +32,15 @@
enum HodirYells
{
- SAY_AGGRO = -1603210,
- SAY_SLAY_1 = -1603211,
- SAY_SLAY_2 = -1603212,
- SAY_FLASH_FREEZE = -1603213,
- SAY_STALACTITE = -1603214,
- SAY_DEATH = -1603215,
- SAY_BERSERK = -1603216,
- SAY_YS_HELP = -1603217,
- SAY_HARD_MODE_FAILED = -1603218,
-
- EMOTE_FREEZE = -1603209,
- EMOTE_BLOWS = -1603219,
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_FLASH_FREEZE = 2,
+ SAY_STALACTITE = 3,
+ SAY_DEATH = 4,
+ SAY_BERSERK = 5,
+ SAY_HARD_MODE_FAILED = 6,
+ EMOTE_FREEZE = 7,
+ EMOTE_BLOWS = 8
};
enum HodirSpells
@@ -70,6 +67,8 @@ enum HodirSpells
SPELL_ICE_SHARD = 62457,
SPELL_ICE_SHARD_HIT = 65370,
+ SPELL_KILL_CREDIT = 64899,
+
// Druids
SPELL_WRATH = 62793,
SPELL_STARLIGHT = 62807,
@@ -329,7 +328,7 @@ class boss_hodir : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
DoCast(me, SPELL_BITING_COLD, true);
gettingColdInHereTimer = 1000;
@@ -346,10 +345,10 @@ class boss_hodir : public CreatureScript
events.ScheduleEvent(EVENT_BERSERK, 480000);
}
- void KilledUnit(Unit* /*who*/)
+ void KilledUnit(Unit* who)
{
- if (!urand(0, 3))
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ Talk(SAY_SLAY);
}
void DamageTaken(Unit* /*who*/, uint32& damage)
@@ -357,7 +356,7 @@ class boss_hodir : public CreatureScript
if (damage >= me->GetHealth())
{
damage = 0;
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (iCouldSayThatThisCacheWasRare)
instance->SetData(DATA_HODIR_RARE_CACHE, 1);
@@ -376,6 +375,8 @@ class boss_hodir : public CreatureScript
me->setFaction(35);
me->DespawnOrUnsummon(10000);
+ DoCastAOE(SPELL_KILL_CREDIT);
+
_JustDied();
}
}
@@ -404,8 +405,8 @@ class boss_hodir : public CreatureScript
events.ScheduleEvent(EVENT_ICICLE, RAID_MODE(5500, 3500));
break;
case EVENT_FLASH_FREEZE:
- DoScriptText(SAY_FLASH_FREEZE, me);
- DoScriptText(EMOTE_FREEZE, me);
+ Talk(SAY_FLASH_FREEZE);
+ Talk(EMOTE_FREEZE);
for (uint8 n = 0; n < RAID_MODE(2, 3); ++n)
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true))
target->CastSpell(target, SPELL_ICICLE_SNOWDRIFT, true);
@@ -424,19 +425,19 @@ class boss_hodir : public CreatureScript
break;
}
case EVENT_BLOWS:
- DoScriptText(SAY_STALACTITE, me);
- DoScriptText(EMOTE_BLOWS, me);
+ Talk(SAY_STALACTITE);
+ Talk(EMOTE_BLOWS);
DoCast(me, SPELL_FROZEN_BLOWS);
events.ScheduleEvent(EVENT_BLOWS, urand(60000, 65000));
break;
case EVENT_RARE_CACHE:
- DoScriptText(SAY_HARD_MODE_FAILED, me);
+ Talk(SAY_HARD_MODE_FAILED);
iCouldSayThatThisCacheWasRare = false;
instance->SetData(DATA_HODIR_RARE_CACHE, 0);
events.CancelEvent(EVENT_RARE_CACHE);
break;
case EVENT_BERSERK:
- DoScriptText(SAY_BERSERK, me);
+ Talk(SAY_BERSERK);
DoCast(me, SPELL_BERSERK, true);
events.CancelEvent(EVENT_BERSERK);
break;
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp
index c0fb4e3ecc8..c8789d680ed 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp
@@ -24,16 +24,14 @@
enum Yells
{
- SAY_AGGRO = -1603220,
- SAY_SLAY_1 = -1603221,
- SAY_SLAY_2 = -1603222,
- SAY_DEATH = -1603223,
- SAY_SUMMON = -1603224,
- SAY_SLAG_POT = -1603225,
- SAY_SCORCH_1 = -1603226,
- SAY_SCORCH_2 = -1603227,
- SAY_BERSERK = -1603228,
- EMOTE_JETS = -1603229,
+ SAY_AGGRO = 0,
+ SAY_SUMMON = 1,
+ SAY_SLAG_POT = 2,
+ SAY_SCORCH = 3,
+ SAY_SLAY = 4,
+ SAY_BERSERK = 5,
+ SAY_DEATH = 6,
+ EMOTE_JETS = 7
};
enum Spells
@@ -135,7 +133,7 @@ class boss_ignis : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
events.ScheduleEvent(EVENT_JET, 30000);
events.ScheduleEvent(EVENT_SCORCH, 25000);
events.ScheduleEvent(EVENT_SLAG_POT, 35000);
@@ -151,7 +149,7 @@ class boss_ignis : public CreatureScript
void JustDied(Unit* /*killer*/)
{
_JustDied();
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
uint32 GetData(uint32 type) const
@@ -162,10 +160,10 @@ class boss_ignis : public CreatureScript
return 0;
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* who)
{
- if (!urand(0, 4))
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ Talk(SAY_SLAY);
}
void JustSummoned(Creature* summon)
@@ -210,14 +208,14 @@ class boss_ignis : public CreatureScript
switch (eventId)
{
case EVENT_JET:
- me->MonsterTextEmote(EMOTE_JETS, 0, true);
+ Talk(EMOTE_JETS);
DoCast(me, SPELL_FLAME_JETS);
events.ScheduleEvent(EVENT_JET, urand(35000, 40000));
break;
case EVENT_SLAG_POT:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
{
- DoScriptText(SAY_SLAG_POT, me);
+ Talk(SAY_SLAG_POT);
_slagPotGUID = target->GetGUID();
DoCast(target, SPELL_GRAB);
events.DelayEvents(3000);
@@ -252,14 +250,14 @@ class boss_ignis : public CreatureScript
}
break;
case EVENT_SCORCH:
- DoScriptText(RAND(SAY_SCORCH_1, SAY_SCORCH_2), me);
+ Talk(SAY_SCORCH);
if (Unit* target = me->getVictim())
me->SummonCreature(NPC_GROUND_SCORCH, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 45000);
DoCast(SPELL_SCORCH);
events.ScheduleEvent(EVENT_SCORCH, 25000);
break;
case EVENT_CONSTRUCT:
- DoScriptText(SAY_SUMMON, me);
+ Talk(SAY_SUMMON);
DoSummon(NPC_IRON_CONSTRUCT, ConstructSpawnPosition[urand(0, CONSTRUCT_SPAWN_POINTS - 1)], 30000, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT);
DoCast(SPELL_STRENGHT);
DoCast(me, SPELL_ACTIVATE_CONSTRUCT);
@@ -267,7 +265,7 @@ class boss_ignis : public CreatureScript
break;
case EVENT_BERSERK:
DoCast(me, SPELL_BERSERK, true);
- DoScriptText(SAY_BERSERK, me);
+ Talk(SAY_BERSERK);
break;
}
}
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp
index 9c77bb298a5..c1fc0a81989 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp
@@ -30,34 +30,40 @@ SDComment: TODO: Achievements
SDCategory: Ulduar
EndScriptData */
-#define SPELL_ARM_DEAD_DAMAGE RAID_MODE(63629, 63979)
-#define SPELL_TWO_ARM_SMASH RAID_MODE(63356, 64003)
-#define SPELL_ONE_ARM_SMASH RAID_MODE(63573, 64006)
-#define SPELL_ARM_SWEEP RAID_MODE(63766, 63983)
-#define SPELL_STONE_SHOUT RAID_MODE(63716, 64005)
-#define SPELL_PETRIFY_BREATH RAID_MODE(62030, 63980)
-#define SPELL_STONE_GRIP RAID_MODE(62166, 63981)
-#define SPELL_STONE_GRIP_CANCEL 65594
-#define SPELL_SUMMON_RUBBLE 63633
-#define SPELL_FALLING_RUBBLE 63821
-#define SPELL_ARM_ENTER_VEHICLE 65343
-#define SPELL_ARM_ENTER_VISUAL 64753
-
-#define SPELL_SUMMON_FOCUSED_EYEBEAM 63342
-#define SPELL_FOCUSED_EYEBEAM_PERIODIC RAID_MODE(63347, 63977)
-#define SPELL_FOCUSED_EYEBEAM_VISUAL 63369
-#define SPELL_FOCUSED_EYEBEAM_VISUAL_LEFT 63676
-#define SPELL_FOCUSED_EYEBEAM_VISUAL_RIGHT 63702
-
-// Passive
-#define SPELL_KOLOGARN_REDUCE_PARRY 64651
-#define SPELL_KOLOGARN_PACIFY 63726
-#define SPELL_KOLOGARN_UNK_0 65219 // Not found in DBC
-
-#define SPELL_BERSERK 47008 // guess
-
-#define NPC_RUBBLE_STALKER 33809
-#define NPC_ARM_SWEEP_STALKER 33661
+enum Spells
+{
+ SPELL_ARM_DEAD_DAMAGE = 63629,
+ SPELL_TWO_ARM_SMASH = 63356,
+ SPELL_ONE_ARM_SMASH = 63573,
+ SPELL_ARM_SWEEP = 63766,
+ SPELL_STONE_SHOUT = 63716,
+ SPELL_PETRIFY_BREATH = 62030,
+ SPELL_STONE_GRIP = 62166,
+ SPELL_STONE_GRIP_CANCEL = 65594,
+ SPELL_SUMMON_RUBBLE = 63633,
+ SPELL_FALLING_RUBBLE = 63821,
+ SPELL_ARM_ENTER_VEHICLE = 65343,
+ SPELL_ARM_ENTER_VISUAL = 64753,
+
+ SPELL_SUMMON_FOCUSED_EYEBEAM = 63342,
+ SPELL_FOCUSED_EYEBEAM_PERIODIC = 63347,
+ SPELL_FOCUSED_EYEBEAM_VISUAL = 63369,
+ SPELL_FOCUSED_EYEBEAM_VISUAL_LEFT = 63676,
+ SPELL_FOCUSED_EYEBEAM_VISUAL_RIGHT = 63702,
+
+ // Passive
+ SPELL_KOLOGARN_REDUCE_PARRY = 64651,
+ SPELL_KOLOGARN_PACIFY = 63726,
+ SPELL_KOLOGARN_UNK_0 = 65219, // Not found in DBC
+
+ SPELL_BERSERK = 47008 // guess
+};
+
+enum NPCs
+{
+ NPC_RUBBLE_STALKER = 33809,
+ NPC_ARM_SWEEP_STALKER = 33661
+};
enum Events
{
@@ -76,15 +82,15 @@ enum Events
enum Yells
{
- SAY_AGGRO = -1603230,
- SAY_SLAY_1 = -1603231,
- SAY_SLAY_2 = -1603232,
- SAY_LEFT_ARM_GONE = -1603233,
- SAY_RIGHT_ARM_GONE = -1603234,
- SAY_SHOCKWAVE = -1603235,
- SAY_GRAB_PLAYER = -1603236,
- SAY_DEATH = -1603237,
- SAY_BERSERK = -1603238,
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_LEFT_ARM_GONE = 2,
+ SAY_RIGHT_ARM_GONE = 3,
+ SAY_SHOCKWAVE = 4,
+ SAY_GRAB_PLAYER = 5,
+ SAY_DEATH = 6,
+ SAY_BERSERK = 7,
+ EMOTE_STONE_GRIP = 8
};
class boss_kologarn : public CreatureScript
@@ -113,7 +119,7 @@ class boss_kologarn : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
events.ScheduleEvent(EVENT_MELEE_CHECK, 6000);
events.ScheduleEvent(EVENT_SMASH, 5000);
@@ -138,7 +144,7 @@ class boss_kologarn : public CreatureScript
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
DoCast(SPELL_KOLOGARN_PACIFY);
me->GetMotionMaster()->MoveTargetedHome();
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
@@ -146,9 +152,10 @@ class boss_kologarn : public CreatureScript
_JustDied();
}
- void KilledUnit(Unit* /*who*/)
+ void KilledUnit(Unit* who)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ Talk(SAY_SLAY);
}
void PassengerBoarded(Unit* who, int8 /*seatId*/, bool apply)
@@ -160,7 +167,7 @@ class boss_kologarn : public CreatureScript
if (!apply && isEncounterInProgress)
{
who->ToCreature()->DisappearAndDie();
- DoScriptText(SAY_LEFT_ARM_GONE, me);
+ Talk(SAY_LEFT_ARM_GONE);
events.ScheduleEvent(EVENT_RESPAWN_LEFT_ARM, 40000);
}
}
@@ -171,7 +178,7 @@ class boss_kologarn : public CreatureScript
if (!apply && isEncounterInProgress)
{
who->ToCreature()->DisappearAndDie();
- DoScriptText(SAY_RIGHT_ARM_GONE, me);
+ Talk(SAY_RIGHT_ARM_GONE);
events.ScheduleEvent(EVENT_RESPAWN_RIGHT_ARM, 40000);
}
}
@@ -272,7 +279,7 @@ class boss_kologarn : public CreatureScript
break;
case EVENT_ENRAGE:
DoCast(SPELL_BERSERK);
- DoScriptText(SAY_BERSERK, me);
+ Talk(SAY_BERSERK);
break;
case EVENT_RESPAWN_LEFT_ARM:
case EVENT_RESPAWN_RIGHT_ARM:
@@ -290,11 +297,12 @@ class boss_kologarn : public CreatureScript
if (right)
{
DoCast(SPELL_STONE_GRIP);
- DoScriptText(SAY_GRAB_PLAYER, me);
+ Talk(SAY_GRAB_PLAYER);
+ Talk(EMOTE_STONE_GRIP);
}
events.ScheduleEvent(EVENT_STONE_GRIP, 25 * IN_MILLISECONDS);
+ break;
}
- break;
case EVENT_FOCUSED_EYEBEAM:
if (Unit* eyebeamTargetUnit = SelectTarget(SELECT_TARGET_FARTHEST, 0, 0, true))
{
@@ -404,12 +412,12 @@ class spell_ulduar_stone_grip_cast_target : public SpellScriptLoader
}
// For subsequent effects
- m_unitList = unitList;
+ _unitList = unitList;
}
void FillTargetsSubsequential(std::list<WorldObject*>& unitList)
{
- unitList = m_unitList;
+ unitList = _unitList;
}
void Register()
@@ -419,8 +427,9 @@ class spell_ulduar_stone_grip_cast_target : public SpellScriptLoader
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_ulduar_stone_grip_cast_target_SpellScript::FillTargetsSubsequential, EFFECT_2, TARGET_UNIT_SRC_AREA_ENEMY);
}
+ private:
// Shared between effects
- std::list<WorldObject*> m_unitList;
+ std::list<WorldObject*> _unitList;
};
SpellScript* GetSpellScript() const
@@ -625,10 +634,10 @@ class spell_kologarn_summon_focused_eyebeam : public SpellScriptLoader
{
PrepareSpellScript(spell_kologarn_summon_focused_eyebeam_SpellScript);
- void HandleForceCast(SpellEffIndex eff)
+ void HandleForceCast(SpellEffIndex effIndex)
{
- PreventHitDefaultEffect(eff);
- GetCaster()->CastSpell(GetCaster(), GetSpellInfo()->Effects[eff].TriggerSpell, true);
+ PreventHitDefaultEffect(effIndex);
+ GetCaster()->CastSpell(GetCaster(), GetSpellInfo()->Effects[effIndex].TriggerSpell, true);
}
void Register()
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
index 6a4a5255293..b5c907af7f0 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
@@ -35,8 +35,7 @@ enum Yells
SAY_V07TRON_ACTIVATE = 11,
SAY_V07TRON_SLAY = 12,
SAY_V07TRON_DEATH = 13,
- SAY_BERSERK = 14,
- SAY_YS_HELP = 15
+ SAY_BERSERK = 14
};
enum Spells
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp
index 5ea2678adfe..5f560ed8dd4 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp
@@ -27,15 +27,22 @@
enum Says
{
- SAY_GREET = -1603260,
- SAY_GROUND_PHASE = -1603261,
- SAY_AGGRO_1 = -1603262,
- SAY_AGGRO_2 = -1603263,
- SAY_AGGRO_3 = -1603264,
- SAY_TURRETS = -1603265,
- EMOTE_HARPOON = -1603266,
- EMOTE_BREATH = -1603267,
- EMOTE_PERMA = -1603268,
+ // Expedition Commander
+ SAY_INTRO = 0,
+ SAY_GROUND_PHASE = 1,
+ SAY_AGGRO_2 = 2,
+
+ // Expedition Engineer
+ SAY_AGGRO_1 = 0,
+ SAY_AGGRO_3 = 1,
+ SAY_TURRETS = 2, // unused
+
+ // Razorscale Controller
+ EMOTE_HARPOON = 0,
+
+ // Razorscale
+ EMOTE_PERMA = 0,
+ EMOTE_BREATH = 1
};
enum Spells
@@ -245,7 +252,7 @@ class boss_razorscale_controller : public CreatureScript
switch (eventId)
{
case EVENT_BUILD_HARPOON_1:
- DoScriptText(EMOTE_HARPOON, me);
+ Talk(EMOTE_HARPOON);
if (GameObject* Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_1, PosHarpoon[0].GetPositionX(), PosHarpoon[0].GetPositionY(), PosHarpoon[0].GetPositionZ(), 4.790f, 0.0f, 0.0f, 0.0f, 0.0f, uint32(me->GetRespawnTime())))
{
if (GameObject* BrokenHarpoon = Harpoon->FindNearestGameObject(GO_RAZOR_BROKEN_HARPOON, 5.0f)) //only nearest broken harpoon
@@ -255,7 +262,7 @@ class boss_razorscale_controller : public CreatureScript
}
return;
case EVENT_BUILD_HARPOON_2:
- DoScriptText(EMOTE_HARPOON, me);
+ Talk(EMOTE_HARPOON);
if (GameObject* Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_2, PosHarpoon[1].GetPositionX(), PosHarpoon[1].GetPositionY(), PosHarpoon[1].GetPositionZ(), 4.659f, 0, 0, 0, 0, uint32(me->GetRespawnTime())))
{
if (GameObject* BrokenHarpoon = Harpoon->FindNearestGameObject(GO_RAZOR_BROKEN_HARPOON, 5.0f))
@@ -264,7 +271,7 @@ class boss_razorscale_controller : public CreatureScript
}
return;
case EVENT_BUILD_HARPOON_3:
- DoScriptText(EMOTE_HARPOON, me);
+ Talk(EMOTE_HARPOON);
if (GameObject* Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_3, PosHarpoon[2].GetPositionX(), PosHarpoon[2].GetPositionY(), PosHarpoon[2].GetPositionZ(), 5.382f, 0, 0, 0, 0, uint32(me->GetRespawnTime())))
{
if (GameObject* BrokenHarpoon = Harpoon->FindNearestGameObject(GO_RAZOR_BROKEN_HARPOON, 5.0f))
@@ -274,7 +281,7 @@ class boss_razorscale_controller : public CreatureScript
}
return;
case EVENT_BUILD_HARPOON_4:
- DoScriptText(EMOTE_HARPOON, me);
+ Talk(EMOTE_HARPOON);
if (GameObject* Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_4, PosHarpoon[3].GetPositionX(), PosHarpoon[3].GetPositionY(), PosHarpoon[3].GetPositionZ(), 4.266f, 0, 0, 0, 0, uint32(me->GetRespawnTime())))
{
if (GameObject* BrokenHarpoon = Harpoon->FindNearestGameObject(GO_RAZOR_BROKEN_HARPOON, 5.0f))
@@ -444,7 +451,7 @@ class boss_razorscale : public CreatureScript
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED | UNIT_FLAG_PACIFIED);
me->RemoveAllAuras();
me->SetReactState(REACT_AGGRESSIVE);
- DoScriptText(EMOTE_BREATH, me, 0);
+ Talk(EMOTE_BREATH);
DoCastAOE(SPELL_FLAMEBREATH);
events.CancelEvent(EVENT_BREATH);
return;
@@ -468,7 +475,7 @@ class boss_razorscale : public CreatureScript
events.ScheduleEvent(EVENT_FLAME, 10000, 0, PHASE_PERMAGROUND);
return;
case EVENT_BREATH:
- me->MonsterTextEmote(EMOTE_BREATH, 0, true);
+ Talk(EMOTE_BREATH);
DoCastVictim(SPELL_FLAMEBREATH);
events.ScheduleEvent(EVENT_BREATH, 20000, 0, PHASE_PERMAGROUND);
return;
@@ -522,7 +529,7 @@ class boss_razorscale : public CreatureScript
void EnterPermaGround()
{
- me->MonsterTextEmote(EMOTE_PERMA, 0, true);
+ Talk(EMOTE_PERMA);
phase = PHASE_PERMAGROUND;
events.SetPhase(PHASE_PERMAGROUND);
me->SetCanFly(false);
@@ -608,7 +615,7 @@ class npc_expedition_commander : public CreatureScript
{
if (!Greet && me->IsWithinDistInMap(who, 10.0f) && who->GetTypeId() == TYPEID_PLAYER)
{
- DoScriptText(SAY_GREET, me);
+ Talk(SAY_INTRO);
Greet = true;
}
}
@@ -623,7 +630,7 @@ class npc_expedition_commander : public CreatureScript
switch (action)
{
case ACTION_GROUND_PHASE:
- DoScriptText(SAY_GROUND_PHASE, me);
+ Talk(SAY_GROUND_PHASE);
break;
case ACTION_COMMANDER_RESET:
summons.clear();
@@ -653,7 +660,7 @@ class npc_expedition_commander : public CreatureScript
Engineer[n]->SetHomePosition(PosEngRepair[n]);
Engineer[n]->GetMotionMaster()->MoveTargetedHome();
}
- Engineer[0]->MonsterYell(SAY_AGGRO_3, LANG_UNIVERSAL, 0);
+ Engineer[0]->AI()->Talk(SAY_AGGRO_3);
Phase = 3;
AttackStartTimer = 14000;
break;
@@ -672,7 +679,7 @@ class npc_expedition_commander : public CreatureScript
Engineer[n]->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USE_STANDING);
for (uint8 n = 0; n < 4; ++n)
Defender[n]->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY2H);
- me->MonsterYell(SAY_AGGRO_2, LANG_UNIVERSAL, 0);
+ Talk(SAY_AGGRO_2);
AttackStartTimer = 16000;
Phase = 5;
break;
@@ -682,7 +689,7 @@ class npc_expedition_commander : public CreatureScript
Razorscale->AI()->DoAction(ACTION_EVENT_START);
me->SetInCombatWith(Razorscale);
}
- Engineer[0]->MonsterYell(SAY_AGGRO_1, LANG_UNIVERSAL, 0);
+ Engineer[0]->AI()->Talk(SAY_AGGRO_1);
Phase = 6;
break;
}
@@ -1077,7 +1084,7 @@ class achievement_quick_shave : public AchievementCriteriaScript
bool OnCheck(Player* /*source*/, Unit* target)
{
- if (target)
+ if (target)
if (Creature* razorscale = target->ToCreature())
if (razorscale->AI()->GetData(DATA_QUICK_SHAVE))
return true;
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp
index 084cd3e0f86..82845d10b8c 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp
@@ -21,83 +21,80 @@
enum Yells
{
- SAY_AGGRO_1 = -1603270,
- SAY_AGGRO_2 = -1603271,
- SAY_SPECIAL_1 = -1603272,
- SAY_SPECIAL_2 = -1603273,
- SAY_SPECIAL_3 = -1603274,
- SAY_JUMPDOWN = -1603275,
- SAY_SLAY_1 = -1603276,
- SAY_SLAY_2 = -1603277,
- SAY_BERSERK = -1603278,
- SAY_WIPE = -1603279,
- SAY_DEATH = -1603280,
- SAY_END_NORMAL_1 = -1603281,
- SAY_END_NORMAL_2 = -1603282,
- SAY_END_NORMAL_3 = -1603283,
- SAY_END_HARD_1 = -1603284,
- SAY_END_HARD_2 = -1603285,
- SAY_END_HARD_3 = -1603286,
- SAY_YS_HELP = -1603287,
+ SAY_AGGRO = 0,
+ SAY_SPECIAL_1 = 1,
+ SAY_SPECIAL_2 = 2,
+ SAY_SPECIAL_3 = 3,
+ SAY_JUMPDOWN = 4,
+ SAY_SLAY = 5,
+ SAY_BERSERK = 6,
+ SAY_WIPE = 7,
+ SAY_DEATH = 8,
+ SAY_END_NORMAL_1 = 9,
+ SAY_END_NORMAL_2 = 10,
+ SAY_END_NORMAL_3 = 11,
+ SAY_END_HARD_1 = 12,
+ SAY_END_HARD_2 = 13,
+ SAY_END_HARD_3 = 14
};
class boss_thorim : public CreatureScript
{
-public:
- boss_thorim() : CreatureScript("boss_thorim") { }
+ public:
+ boss_thorim() : CreatureScript("boss_thorim") { }
- CreatureAI* GetAI(Creature* creature) const
- {
- return GetUlduarAI<boss_thorimAI>(creature);
- }
-
- struct boss_thorimAI : public BossAI
- {
- boss_thorimAI(Creature* creature) : BossAI(creature, BOSS_THORIM)
+ struct boss_thorimAI : public BossAI
{
- }
+ boss_thorimAI(Creature* creature) : BossAI(creature, BOSS_THORIM)
+ {
+ }
- void Reset()
- {
- _Reset();
- }
+ void Reset()
+ {
+ _Reset();
+ }
- void EnterEvadeMode()
- {
- DoScriptText(SAY_WIPE, me);
- _EnterEvadeMode();
- }
+ void EnterEvadeMode()
+ {
+ Talk(SAY_WIPE);
+ _EnterEvadeMode();
+ }
- void KilledUnit(Unit* /*victim*/)
- {
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
- }
+ void KilledUnit(Unit* who)
+ {
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ Talk(SAY_SLAY);
+ }
- void JustDied(Unit* /*killer*/)
- {
- DoScriptText(SAY_DEATH, me);
- _JustDied();
- }
+ void JustDied(Unit* /*killer*/)
+ {
+ Talk(SAY_DEATH);
+ _JustDied();
+ }
- void EnterCombat(Unit* /*who*/)
- {
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2), me);
- _EnterCombat();
- }
+ void EnterCombat(Unit* /*who*/)
+ {
+ Talk(SAY_AGGRO);
+ _EnterCombat();
+ }
- void UpdateAI(const uint32 diff)
- {
- if (!UpdateVictim())
- return;
- //SPELLS TODO:
+ void UpdateAI(uint32 const diff)
+ {
+ if (!UpdateVictim())
+ return;
+ //SPELLS TODO:
- //
- DoMeleeAttackIfReady();
+ //
+ DoMeleeAttackIfReady();
- EnterEvadeIfOutOfCombatArea(diff);
- }
- };
+ EnterEvadeIfOutOfCombatArea(diff);
+ }
+ };
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return GetUlduarAI<boss_thorimAI>(creature);
+ }
};
void AddSC_boss_thorim()
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp
index 30f60da178a..09ab35d6589 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp
@@ -157,15 +157,18 @@ enum XT002Data
enum Yells
{
- SAY_AGGRO = -1603300,
- SAY_HEART_OPENED = -1603301,
- SAY_HEART_CLOSED = -1603302,
- SAY_TYMPANIC_TANTRUM = -1603303,
- SAY_SLAY_1 = -1603304,
- SAY_SLAY_2 = -1603305,
- SAY_BERSERK = -1603306,
- SAY_DEATH = -1603307,
- SAY_SUMMON = -1603308,
+ SAY_AGGRO = 0,
+ SAY_HEART_OPENED = 1,
+ SAY_HEART_CLOSED = 2,
+ SAY_TYMPANIC_TANTRUM = 3,
+ SAY_SLAY = 4,
+ SAY_BERSERK = 5,
+ SAY_DEATH = 6,
+ SAY_SUMMON = 7,
+ EMOTE_HEART_OPENED = 8,
+ EMOTE_HEART_CLOSED = 9,
+ EMOTE_TYMPANIC_TANTRUM = 10,
+ EMOTE_SCRAPBOT = 11
};
enum AchievementCredits
@@ -223,7 +226,7 @@ class boss_xt002 : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
_EnterCombat();
events.ScheduleEvent(EVENT_ENRAGE, TIMER_ENRAGE);
@@ -248,14 +251,15 @@ class boss_xt002 : public CreatureScript
}
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* who)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
_JustDied();
}
@@ -292,7 +296,8 @@ class boss_xt002 : public CreatureScript
events.ScheduleEvent(EVENT_GRAVITY_BOMB, TIMER_GRAVITY_BOMB);
break;
case EVENT_TYMPANIC_TANTRUM:
- DoScriptText(SAY_TYMPANIC_TANTRUM, me);
+ Talk(SAY_TYMPANIC_TANTRUM);
+ Talk(EMOTE_TYMPANIC_TANTRUM);
DoCast(SPELL_TYMPANIC_TANTRUM);
events.ScheduleEvent(EVENT_TYMPANIC_TANTRUM, urand(TIMER_TYMPANIC_TANTRUM_MIN, TIMER_TYMPANIC_TANTRUM_MAX));
break;
@@ -300,7 +305,7 @@ class boss_xt002 : public CreatureScript
SetPhaseOne();
break;
case EVENT_ENRAGE:
- DoScriptText(SAY_BERSERK, me);
+ Talk(SAY_BERSERK);
DoCast(me, SPELL_ENRAGE);
break;
case EVENT_ENTER_HARD_MODE:
@@ -325,6 +330,7 @@ class boss_xt002 : public CreatureScript
if (me->GetHealthPct() > (25 * (4 - _heartExposed)))
++_heartExposed;
+ Talk(EMOTE_SCRAPBOT);
_healthRecovered = true;
}
}
@@ -359,7 +365,8 @@ class boss_xt002 : public CreatureScript
void ExposeHeart()
{
- DoScriptText(SAY_HEART_OPENED, me);
+ Talk(SAY_HEART_OPENED);
+ Talk(EMOTE_HEART_OPENED);
DoCast(me, SPELL_SUBMERGE); // WIll make creature untargetable
me->AttackStop();
@@ -391,7 +398,8 @@ class boss_xt002 : public CreatureScript
void SetPhaseOne()
{
- DoScriptText(SAY_HEART_CLOSED, me);
+ Talk(SAY_HEART_CLOSED);
+ Talk(EMOTE_HEART_CLOSED);
DoCast(me, SPELL_STAND);
me->SetReactState(REACT_AGGRESSIVE);
@@ -928,7 +936,8 @@ class spell_xt002_heart_overload_periodic : public SpellScriptLoader
}
}
- DoScriptText(SAY_SUMMON, caster->GetVehicleBase());
+ if (Creature* base = caster->GetVehicleCreatureBase())
+ base->AI()->Talk(SAY_SUMMON);
}
}
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp
index 58ba125b994..20d6a7a40da 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp
@@ -43,18 +43,6 @@ enum Sara
enum YoggSaron_Yells
{
- SAY_PHASE2_1 = -1603330,
- SAY_PHASE2_2 = -1603331,
- SAY_PHASE2_3 = -1603332,
- SAY_PHASE2_4 = -1603333,
- SAY_PHASE2_5 = -1603334,
- SAY_PHASE3 = -1603335,
- SAY_VISION = -1603336,
- SAY_SLAY_1 = -1603337,
- SAY_SLAY_2 = -1603338,
- WHISP_INSANITY_1 = -1603339,
- WHISP_INSANITY_2 = -1603340,
- SAY_DEATH = -1603341,
};
enum
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp
index 7d3b943f7b0..b334b8dcbed 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp
@@ -34,6 +34,14 @@ static DoorData const doorData[] =
{0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE },
};
+MinionData const minionData[] =
+{
+ { NPC_STEELBREAKER, BOSS_ASSEMBLY_OF_IRON },
+ { NPC_MOLGEIM, BOSS_ASSEMBLY_OF_IRON },
+ { NPC_BRUNDIR, BOSS_ASSEMBLY_OF_IRON },
+ { 0, 0, }
+};
+
class instance_ulduar : public InstanceMapScript
{
public:
@@ -43,8 +51,6 @@ class instance_ulduar : public InstanceMapScript
{
instance_ulduar_InstanceMapScript(InstanceMap* map) : InstanceScript(map) { }
- std::string m_strInstData;
-
// Creatures
uint64 LeviathanGUID;
uint64 IgnisGUID;
@@ -99,6 +105,7 @@ class instance_ulduar : public InstanceMapScript
{
SetBossNumber(MAX_ENCOUNTER);
LoadDoorData(doorData);
+ LoadMinionData(minionData);
IgnisGUID = 0;
RazorscaleGUID = 0;
RazorscaleController = 0;
@@ -202,18 +209,24 @@ class instance_ulduar : public InstanceMapScript
case NPC_XT_TOY_PILE:
for (uint8 i = 0; i < 4; ++i)
if (!XTToyPileGUIDs[i])
+ {
XTToyPileGUIDs[i] = creature->GetGUID();
+ break;
+ }
break;
// Assembly of Iron
case NPC_STEELBREAKER:
AssemblyGUIDs[0] = creature->GetGUID();
+ AddMinion(creature, true);
break;
case NPC_MOLGEIM:
AssemblyGUIDs[1] = creature->GetGUID();
+ AddMinion(creature, true);
break;
case NPC_BRUNDIR:
AssemblyGUIDs[2] = creature->GetGUID();
+ AddMinion(creature, true);
break;
// Freya's Keeper
@@ -314,10 +327,25 @@ class instance_ulduar : public InstanceMapScript
{
switch (creature->GetEntry())
{
+ case NPC_XT_TOY_PILE:
+ for (uint8 i = 0; i < 4; ++i)
+ if (XTToyPileGUIDs[i] == creature->GetGUID())
+ {
+ XTToyPileGUIDs[i] = 0;
+ break;
+ }
+ break;
+ case NPC_STEELBREAKER:
+ case NPC_MOLGEIM:
+ case NPC_BRUNDIR:
+ AddMinion(creature, false);
+ break;
case NPC_BRANN_BRONZBEARD_ALG:
if (BrannBronzebeardAlgGUID == creature->GetGUID())
BrannBronzebeardAlgGUID = 0;
break;
+ default:
+ break;
}
}
@@ -707,11 +735,11 @@ class instance_ulduar : public InstanceMapScript
return RazorHarpoonGUIDs[3];
// Assembly of Iron
- case BOSS_STEELBREAKER:
+ case DATA_STEELBREAKER:
return AssemblyGUIDs[0];
- case BOSS_MOLGEIM:
+ case DATA_MOLGEIM:
return AssemblyGUIDs[1];
- case BOSS_BRUNDIR:
+ case DATA_BRUNDIR:
return AssemblyGUIDs[2];
// Freya's Keepers
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h
index 858a82bbe57..4dff89f7b2c 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h
@@ -25,28 +25,25 @@ extern Position const AlgalonLandPos;
enum UlduarBosses
{
- MAX_ENCOUNTER = 20,
+ MAX_ENCOUNTER = 17,
BOSS_LEVIATHAN = 0,
BOSS_IGNIS = 1,
BOSS_RAZORSCALE = 2,
BOSS_XT002 = 3,
BOSS_ASSEMBLY_OF_IRON = 4,
- BOSS_STEELBREAKER = 5,
- BOSS_MOLGEIM = 6,
- BOSS_BRUNDIR = 7,
- BOSS_KOLOGARN = 8,
- BOSS_AURIAYA = 9,
- BOSS_MIMIRON = 10,
- BOSS_HODIR = 11,
- BOSS_THORIM = 12,
- BOSS_FREYA = 13,
- BOSS_BRIGHTLEAF = 14,
- BOSS_IRONBRANCH = 15,
- BOSS_STONEBARK = 16,
- BOSS_VEZAX = 17,
- BOSS_YOGGSARON = 18,
- BOSS_ALGALON = 19,
+ BOSS_KOLOGARN = 5,
+ BOSS_AURIAYA = 6,
+ BOSS_MIMIRON = 7,
+ BOSS_HODIR = 8,
+ BOSS_THORIM = 9,
+ BOSS_FREYA = 10,
+ BOSS_BRIGHTLEAF = 11,
+ BOSS_IRONBRANCH = 12,
+ BOSS_STONEBARK = 13,
+ BOSS_VEZAX = 14,
+ BOSS_YOGGSARON = 15,
+ BOSS_ALGALON = 16,
};
enum UlduarNPCs
@@ -207,6 +204,11 @@ enum UlduarData
DATA_TOY_PILE_2,
DATA_TOY_PILE_3,
+ // Assembly of Iron
+ DATA_STEELBREAKER,
+ DATA_MOLGEIM,
+ DATA_BRUNDIR,
+
// Hodir
DATA_HODIR_RARE_CACHE,
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 aaa95631792..4fe56b346b2 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
@@ -29,14 +29,14 @@ EndScriptData */
enum Yells
{
//Yells Ingvar
- YELL_AGGRO_1 = -1574005,
- YELL_AGGRO_2 = -1574006,
+ YELL_AGGRO_1 = 0,
+ YELL_AGGRO_2 = 1,
- YELL_DEAD_1 = -1574007,
- YELL_DEAD_2 = -1574008,
+ YELL_DEAD_1 = 2,
+ YELL_DEAD_2 = 3,
- YELL_KILL_1 = -1574009,
- YELL_KILL_2 = -1574010,
+ YELL_KILL_1 = 4,
+ YELL_KILL_2 = 5,
};
enum Creatures
@@ -151,7 +151,7 @@ public:
events.SetPhase(PHASE_EVENT);
events.ScheduleEvent(EVENT_SUMMON_BANSHEE, 3 * IN_MILLISECONDS, 0, PHASE_EVENT);
- DoScriptText(YELL_DEAD_1, me);
+ Talk(YELL_DEAD_1);
}
if (events.GetPhaseMask() & (1 << PHASE_EVENT))
@@ -164,13 +164,13 @@ public:
me->UpdateEntry(MOB_INGVAR_UNDEAD);
events.ScheduleEvent(EVENT_JUST_TRANSFORMED, 2 * IN_MILLISECONDS, 0, PHASE_EVENT);
- DoScriptText(YELL_AGGRO_2, me);
+ Talk(YELL_AGGRO_2);
}
void EnterCombat(Unit* /*who*/)
{
if (!bIsUndead)
- DoScriptText(YELL_AGGRO_1, me);
+ Talk(YELL_AGGRO_1);
if (instance)
instance->SetData(DATA_INGVAR_EVENT, IN_PROGRESS);
@@ -180,7 +180,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(YELL_DEAD_2, me);
+ Talk(YELL_DEAD_2);
if (instance)
{
@@ -201,10 +201,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- if (bIsUndead)
- DoScriptText(YELL_KILL_1, me);
- else
- DoScriptText(YELL_KILL_2, me);
+ Talk(bIsUndead ? YELL_KILL_1 : YELL_KILL_2);
}
void UpdateAI(const uint32 diff)
@@ -329,7 +326,7 @@ public:
{
me->GetMotionMaster()->MovePoint(1, x, y, z+15);
- // DoScriptText(YELL_RESSURECT, me);
+ // Talk(YELL_RESSURECT);
}
}
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp
index 7c977250e79..aad4c9989c1 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp
@@ -29,18 +29,18 @@ EndScriptData */
enum eEnums
{
//signed for 24200, but used by 24200, 27390
- YELL_SKARVALD_AGGRO = -1574011,
- YELL_SKARVALD_DAL_DIED = -1574012,
- YELL_SKARVALD_SKA_DIEDFIRST = -1574013,
- YELL_SKARVALD_KILL = -1574014,
- YELL_SKARVALD_DAL_DIEDFIRST = -1574015,
+ YELL_SKARVALD_AGGRO = 0,
+ YELL_SKARVALD_DAL_DIED = 1,
+ YELL_SKARVALD_SKA_DIEDFIRST = 2,
+ YELL_SKARVALD_KILL = 3,
+ YELL_SKARVALD_DAL_DIEDFIRST = 4,
//signed for 24201, but used by 24201, 27389
- YELL_DALRONN_AGGRO = -1574016,
- YELL_DALRONN_SKA_DIED = -1574017,
- YELL_DALRONN_DAL_DIEDFIRST = -1574018,
- YELL_DALRONN_KILL = -1574019,
- YELL_DALRONN_SKA_DIEDFIRST = -1574020,
+ YELL_DALRONN_AGGRO = 0,
+ YELL_DALRONN_SKA_DIED = 1,
+ YELL_DALRONN_DAL_DIEDFIRST = 2,
+ YELL_DALRONN_KILL = 3,
+ YELL_DALRONN_SKA_DIEDFIRST = 4,
//Spells of Skarvald and his Ghost
MOB_SKARVALD_THE_CONSTRUCTOR = 24200,
@@ -123,7 +123,7 @@ public:
{
if (!ghost && instance)
{
- DoScriptText(YELL_SKARVALD_AGGRO, me);
+ Talk(YELL_SKARVALD_AGGRO);
Unit* dalronn = Unit::GetUnit(*me, instance->GetData64(DATA_DALRONN));
if (dalronn && dalronn->isAlive() && !dalronn->getVictim())
@@ -151,13 +151,13 @@ public:
{
if (dalronn->isDead())
{
- DoScriptText(YELL_SKARVALD_DAL_DIED, me);
+ Talk(YELL_SKARVALD_DAL_DIED);
instance->SetData(DATA_SKARVALD_DALRONN_EVENT, DONE);
}
else
{
- DoScriptText(YELL_SKARVALD_SKA_DIEDFIRST, me);
+ Talk(YELL_SKARVALD_SKA_DIEDFIRST);
me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
//DoCast(me, SPELL_SUMMON_SKARVALD_GHOST, true);
@@ -176,7 +176,7 @@ public:
{
if (!ghost)
{
- DoScriptText(YELL_SKARVALD_KILL, me);
+ Talk(YELL_SKARVALD_KILL);
}
}
@@ -211,7 +211,7 @@ public:
{
if (Response_Timer <= diff)
{
- DoScriptText(YELL_SKARVALD_DAL_DIEDFIRST, me);
+ Talk(YELL_SKARVALD_DAL_DIEDFIRST);
Response_Timer = 0;
} else Response_Timer -= diff;
@@ -310,14 +310,14 @@ public:
{
if (skarvald->isDead())
{
- DoScriptText(YELL_DALRONN_SKA_DIED, me);
+ Talk(YELL_DALRONN_SKA_DIED);
if (instance)
instance->SetData(DATA_SKARVALD_DALRONN_EVENT, DONE);
}
else
{
- DoScriptText(YELL_DALRONN_DAL_DIEDFIRST, me);
+ Talk(YELL_DALRONN_DAL_DIEDFIRST);
me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
//DoCast(me, SPELL_SUMMON_DALRONN_GHOST, true);
@@ -336,7 +336,7 @@ public:
{
if (!ghost)
{
- DoScriptText(YELL_DALRONN_KILL, me);
+ Talk(YELL_DALRONN_KILL);
}
}
@@ -355,7 +355,7 @@ public:
{
if (AggroYell_Timer <= diff)
{
- DoScriptText(YELL_DALRONN_AGGRO, me);
+ Talk(YELL_DALRONN_AGGRO);
AggroYell_Timer = 0;
} else AggroYell_Timer -= diff;
@@ -382,7 +382,7 @@ public:
{
if (Response_Timer <= diff)
{
- DoScriptText(YELL_DALRONN_SKA_DIEDFIRST, me);
+ Talk(YELL_DALRONN_SKA_DIEDFIRST);
Response_Timer = 0;
} else Response_Timer -= diff;
}
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp
index 8cbfe4bafb4..d2772514edf 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp
@@ -47,10 +47,9 @@ enum OrbSpells
//not in db
enum Yells
{
- SAY_AGGRO = -1575000,
- SAY_SLAY_1 = -1575001,
- SAY_SLAY_2 = -1575002,
- SAY_DEATH = -1575003
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1
+ //SAY_DEATH = 2 Missing in database
};
enum Creatures
@@ -155,7 +154,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void AttackStart(Unit* who)
@@ -212,7 +211,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ //Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_GORTOK_PALEHOOF_EVENT, DONE);
Creature* temp = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_MOB_ORB) : 0);
@@ -222,7 +221,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
void NextPhase()
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp
index 63898e57c08..45bab11c46a 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp
@@ -34,16 +34,13 @@ Script Data End */
//Yell
enum eYells
{
- SAY_AGGRO = -1575004,
- SAY_KILL_1 = -1575005,
- SAY_KILL_2 = -1575006,
- EMOTE_RANGE = -1575007, //Skadi
- SAY_DEATH = -1575008,
- SAY_DRAKE_DEATH = -1575009,
- EMOTE_BREATH = -1575010, //Grauf
- SAY_DRAKE_BREATH_1 = -1575011,
- SAY_DRAKE_BREATH_2 = -1575012,
- SAY_DRAKE_BREATH_3 = -1575013,
+ SAY_AGGRO = 0,
+ SAY_KILL = 1,
+ EMOTE_RANGE = 2,
+ SAY_DEATH = 3,
+ SAY_DRAKE_DEATH = 4,
+ EMOTE_BREATH = 5,
+ SAY_DRAKE_BREATH = 6
};
static Position SpawnLoc = {468.931f, -513.555f, 104.723f, 0};
@@ -230,7 +227,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE);
@@ -297,7 +294,7 @@ public:
}
me->GetMotionMaster()->MoveJump(Location[4].GetPositionX(), Location[4].GetPositionY(), Location[4].GetPositionZ(), 5.0f, 10.0f);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE);
- DoScriptText(SAY_DRAKE_DEATH, me);
+ Talk(SAY_DRAKE_DEATH);
m_uiCrushTimer = 8000;
m_uiPoisonedSpearTimer = 10000;
m_uiWhirlwindTimer = 20000;
@@ -319,7 +316,7 @@ public:
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE);
if (!m_bSaidEmote)
{
- DoScriptText(EMOTE_RANGE, me);
+ Talk(EMOTE_RANGE);
m_bSaidEmote = true;
}
}
@@ -360,8 +357,8 @@ public:
break;
case 3:
me->GetMotionMaster()->MovePoint(0, Location[69].GetPositionX(), Location[69].GetPositionY(), Location[69].GetPositionZ());
- DoScriptText(RAND(SAY_DRAKE_BREATH_1, SAY_DRAKE_BREATH_2), me);
- DoScriptText(EMOTE_BREATH, me);
+ Talk(SAY_DRAKE_BREATH);
+ Talk(EMOTE_BREATH);
m_uiMovementTimer = 2500;
break;
case 4:
@@ -413,7 +410,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
Summons.DespawnAll();
if (instance)
instance->SetData(DATA_SKADI_THE_RUTHLESS_EVENT, DONE);
@@ -421,7 +418,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2), me);
+ Talk(SAY_KILL);
}
void SpawnMobs()
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp
index 0278125deb3..96cfee7c2b8 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp
@@ -55,16 +55,13 @@ enum Spells
//not in db
enum Yells
{
- SAY_AGGRO = -1575028,
- SAY_SLAY_1 = -1575029,
- SAY_SLAY_2 = -1575030,
- SAY_SLAY_3 = -1575031,
- SAY_SLAY_4 = -1575032,
- SAY_DEATH = -1575033,
- SAY_SUMMON_BJORN = -1575034,
- SAY_SUMMON_HALDOR = -1575035,
- SAY_SUMMON_RANULF = -1575036,
- SAY_SUMMON_TORGYN = -1575037
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_SUMMON_BJORN = 3,
+ SAY_SUMMON_HALDOR = 4,
+ SAY_SUMMON_RANULF = 5,
+ SAY_SUMMON_TORGYN = 6
};
enum Creatures
@@ -190,7 +187,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_KING_YMIRON_EVENT, IN_PROGRESS);
@@ -216,7 +213,7 @@ public:
{
if (m_uiPause_Timer <= diff)
{
- DoScriptText(ActiveBoat[m_uiActiveOrder[m_uiActivedNumber]].say, me);
+ Talk(ActiveBoat[m_uiActiveOrder[m_uiActivedNumber]].say);
DoCast(me, SPELL_CHANNEL_YMIRON_TO_SPIRIT); // should be on spirit
if (Creature* temp = me->SummonCreature(ActiveBoat[m_uiActiveOrder[m_uiActivedNumber]].npc, ActiveBoat[m_uiActiveOrder[m_uiActivedNumber]].SpawnX, ActiveBoat[m_uiActiveOrder[m_uiActivedNumber]].SpawnY, ActiveBoat[m_uiActiveOrder[m_uiActivedNumber]].SpawnZ, ActiveBoat[m_uiActiveOrder[m_uiActivedNumber]].SpawnO, TEMPSUMMON_CORPSE_DESPAWN, 0))
{
@@ -370,7 +367,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
DespawnBoatGhosts(m_uiActivedCreatureGUID);
DespawnBoatGhosts(m_uiOrbGUID);
@@ -381,7 +378,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3, SAY_SLAY_4), me);
+ Talk(SAY_SLAY);
}
void DespawnBoatGhosts(uint64 m_uiCreatureGUID)
diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp
index 96e0bc66bd1..8a5e25e4487 100644
--- a/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp
+++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp
@@ -19,7 +19,10 @@
#include "ScriptedCreature.h"
#include "vault_of_archavon.h"
-#define EMOTE_BERSERK -1590002
+enum
+{
+ EMOTE_BERSERK = 0
+};
//Spells Archavon
#define SPELL_ROCK_SHARDS 58678
@@ -109,7 +112,7 @@ class boss_archavon : public CreatureScript
break;
case EVENT_BERSERK:
DoCast(me, SPELL_BERSERK);
- DoScriptText(EMOTE_BERSERK, me);
+ Talk(EMOTE_BERSERK);
break;
default:
break;
diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp
index 903280d317a..b61bb20389d 100644
--- a/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp
+++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp
@@ -37,9 +37,9 @@ enum Spells
enum BossEmotes
{
- EMOTE_OVERCHARGE = -1590000,
- EMOTE_MINION_RESPAWN = -1590001,
- EMOTE_BERSERK = -1590002,
+ EMOTE_OVERCHARGE = 0,
+ EMOTE_MINION_RESPAWN = 1,
+ EMOTE_BERSERK = 2
};
enum Events
@@ -146,14 +146,14 @@ class boss_emalon : public CreatureScript
{
minion->CastSpell(me, SPELL_OVERCHARGED, true);
minion->SetFullHealth();
- DoScriptText(EMOTE_OVERCHARGE, me);
+ Talk(EMOTE_OVERCHARGE);
events.ScheduleEvent(EVENT_OVERCHARGE, 45000);
}
}
break;
case EVENT_BERSERK:
DoCast(me, SPELL_BERSERK);
- DoScriptText(EMOTE_BERSERK, me);
+ Talk(EMOTE_BERSERK);
break;
default:
break;
@@ -198,7 +198,7 @@ class mob_tempest_minion : public CreatureScript
if (emalon->isAlive())
{
emalon->SummonCreature(MOB_TEMPEST_MINION, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
- DoScriptText(EMOTE_MINION_RESPAWN, me);
+ Talk(EMOTE_MINION_RESPAWN);
}
}
}
@@ -244,7 +244,7 @@ class mob_tempest_minion : public CreatureScript
{
DoCast(me, SPELL_OVERCHARGED_BLAST);
me->DespawnOrUnsummon();
- DoScriptText(EMOTE_MINION_RESPAWN, me);
+ Talk(EMOTE_MINION_RESPAWN);
}
}
}
diff --git a/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp b/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp
index b4ce402e7de..7b1b9e96baf 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp
@@ -34,16 +34,13 @@ enum Spells
enum Yells
{
- SAY_AGGRO = -1608000,
- SAY_SLAY_1 = -1608001,
- SAY_SLAY_2 = -1608002,
- SAY_SLAY_3 = -1608003,
- SAY_DEATH = -1608004,
- SAY_SPAWN = -1608005,
- SAY_DISRUPTION = -1608006,
- SAY_BREATH_ATTACK = -1608007,
- SAY_SPECIAL_ATTACK_1 = -1608008,
- SAY_SPECIAL_ATTACK_2 = -1608009
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_SPAWN = 3,
+ SAY_DISRUPTION = 4,
+ SAY_BREATH_ATTACK = 5,
+ SAY_SPECIAL_ATTACK = 6
};
class boss_cyanigosa : public CreatureScript
@@ -84,7 +81,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_CYANIGOSA_EVENT, IN_PROGRESS);
@@ -144,7 +141,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_CYANIGOSA_EVENT, DONE);
@@ -154,7 +151,7 @@ public:
{
if (victim == me)
return;
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me);
+ Talk(SAY_SLAY);
}
};
diff --git a/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp b/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp
index bd59b731c3c..15cd12140cf 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp
@@ -34,14 +34,12 @@ enum Spells
enum Yells
{
- SAY_AGGRO = -1608010,
- SAY_SLAY_1 = -1608011,
- SAY_SLAY_2 = -1608012,
- SAY_SLAY_3 = -1608013,
- SAY_DEATH = -1608014,
- SAY_SPAWN = -1608015,
- SAY_ADD_KILLED = -1608016,
- SAY_BOTH_ADDS_KILLED = -1608017
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_SPAWN = 3,
+ SAY_ADD_KILLED = 4,
+ SAY_BOTH_ADDS_KILLED = 5
};
class boss_erekem : public CreatureScript
@@ -125,7 +123,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
DoCast(me, SPELL_EARTH_SHIELD);
if (instance)
@@ -209,7 +207,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
{
@@ -230,7 +228,7 @@ public:
{
if (victim == me)
return;
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me);
+ Talk(SAY_SLAY);
}
uint64 GetChainHealTargetGUID()
diff --git a/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp b/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp
index cea00417233..fba7efe43ab 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp
@@ -40,15 +40,13 @@ enum IchoronCreatures
enum Yells
{
- SAY_AGGRO = -1608018,
- SAY_SLAY_1 = -1608019,
- SAY_SLAY_2 = -1608020,
- SAY_SLAY_3 = -1608021,
- SAY_DEATH = -1608022,
- SAY_SPAWN = -1608023,
- SAY_ENRAGE = -1608024,
- SAY_SHATTER = -1608025,
- SAY_BUBBLE = -1608026
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_SPAWN = 3,
+ SAY_ENRAGE = 4,
+ SAY_SHATTER = 5,
+ SAY_BUBBLE = 6
};
enum Actions
@@ -120,7 +118,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
DoCast(me, SPELL_PROTECTIVE_BUBBLE);
@@ -189,7 +187,7 @@ public:
if (!HealthBelowPct(25))
{
- DoScriptText(SAY_BUBBLE, me);
+ Talk(SAY_BUBBLE);
DoCast(me, SPELL_PROTECTIVE_BUBBLE, true);
}
@@ -214,7 +212,7 @@ public:
if (!bIsFrenzy && HealthBelowPct(25) && !bIsExploded)
{
- DoScriptText(SAY_ENRAGE, me);
+ Talk(SAY_ENRAGE);
DoCast(me, SPELL_FRENZY, true);
bIsFrenzy = true;
}
@@ -227,7 +225,7 @@ public:
{
if (!me->HasAura(SPELL_PROTECTIVE_BUBBLE, 0))
{
- DoScriptText(SAY_SHATTER, me);
+ Talk(SAY_SHATTER);
DoCast(me, SPELL_WATER_BLAST);
DoCast(me, SPELL_DRAINED);
bIsExploded = true;
@@ -277,7 +275,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (bIsExploded)
{
@@ -326,7 +324,7 @@ public:
{
if (victim == me)
return;
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me);
+ Talk(SAY_SLAY);
}
};
diff --git a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp
index 58d7b59c7dd..429b2ac32ea 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp
@@ -22,41 +22,38 @@
enum Spells
{
- SPELL_ARCANE_BARRAGE_VOLLEY = 54202,
- SPELL_ARCANE_BARRAGE_VOLLEY_H = 59483,
- SPELL_ARCANE_BUFFET = 54226,
- SPELL_ARCANE_BUFFET_H = 59485,
- SPELL_SUMMON_ETHEREAL_SPHERE_1 = 54102,
- SPELL_SUMMON_ETHEREAL_SPHERE_2 = 54137,
- SPELL_SUMMON_ETHEREAL_SPHERE_3 = 54138,
+ SPELL_ARCANE_BARRAGE_VOLLEY = 54202,
+ SPELL_ARCANE_BARRAGE_VOLLEY_H = 59483,
+ SPELL_ARCANE_BUFFET = 54226,
+ SPELL_ARCANE_BUFFET_H = 59485,
+ SPELL_SUMMON_ETHEREAL_SPHERE_1 = 54102,
+ SPELL_SUMMON_ETHEREAL_SPHERE_2 = 54137,
+ SPELL_SUMMON_ETHEREAL_SPHERE_3 = 54138,
};
enum NPCs
{
- NPC_ETHEREAL_SPHERE = 29271,
- //NPC_ETHEREAL_SPHERE2 = 32582, // heroic only?
+ NPC_ETHEREAL_SPHERE = 29271,
+ //NPC_ETHEREAL_SPHERE2 = 32582, // heroic only?
};
enum CreatureSpells
{
- SPELL_ARCANE_POWER = 54160,
- H_SPELL_ARCANE_POWER = 59474,
- SPELL_SUMMON_PLAYERS = 54164,
- SPELL_POWER_BALL_VISUAL = 54141,
+ SPELL_ARCANE_POWER = 54160,
+ H_SPELL_ARCANE_POWER = 59474,
+ SPELL_SUMMON_PLAYERS = 54164,
+ SPELL_POWER_BALL_VISUAL = 54141,
};
enum Yells
{
- SAY_AGGRO = -1608027,
- SAY_SLAY_1 = -1608028,
- SAY_SLAY_2 = -1608029,
- SAY_SLAY_3 = -1608030,
- SAY_DEATH = -1608031,
- SAY_SPAWN = -1608032,
- SAY_CHARGED = -1608033,
- SAY_REPEAT_SUMMON_1 = -1608034,
- SAY_REPEAT_SUMMON_2 = -1608035,
- SAY_SUMMON_ENERGY = -1608036
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_SPAWN = 3,
+ SAY_CHARGED = 4,
+ SAY_REPEAT_SUMMON = 5,
+ SAY_SUMMON_ENERGY = 6
};
class boss_xevozz : public CreatureScript
@@ -139,7 +136,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
{
if (GameObject* pDoor = instance->instance->GetGameObject(instance->GetData64(DATA_XEVOZZ_CELL)))
@@ -182,7 +179,7 @@ public:
if (uiSummonEtherealSphere_Timer < uiDiff)
{
- DoScriptText(SAY_SPAWN, me);
+ Talk(SAY_SPAWN);
DoCast(me, SPELL_SUMMON_ETHEREAL_SPHERE_1);
if (IsHeroic()) // extra one for heroic
me->SummonCreature(NPC_ETHEREAL_SPHERE, me->GetPositionX()-5+rand()%10, me->GetPositionY()-5+rand()%10, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 40000);
@@ -197,7 +194,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
DespawnSphere();
@@ -220,7 +217,7 @@ public:
if (victim == me)
return;
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me);
+ Talk(SAY_SLAY);
}
};
diff --git a/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp b/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp
index 408a7083383..5216ae9f08d 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp
@@ -38,14 +38,12 @@ enum ZuramatCreatures
enum Yells
{
- SAY_AGGRO = -1608037,
- SAY_SLAY_1 = -1608038,
- SAY_SLAY_2 = -1608039,
- SAY_SLAY_3 = -1608040,
- SAY_DEATH = -1608041,
- SAY_SPAWN = -1608042,
- SAY_SHIELD = -1608043,
- SAY_WHISPER = -1608044
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_SPAWN = 3,
+ SAY_SHIELD = 4,
+ SAY_WHISPER = 5
};
#define DATA_VOID_DANCE 2153
@@ -106,7 +104,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
{
if (GameObject* pDoor = instance->instance->GetGameObject(instance->GetData64(DATA_ZURAMAT_CELL)))
@@ -168,7 +166,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
{
@@ -190,7 +188,7 @@ public:
if (victim == me)
return;
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me);
+ Talk(SAY_SLAY);
}
void JustSummoned(Creature* summon)
diff --git a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp
index 5e3bbc01025..c1c93c789de 100644
--- a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp
+++ b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp
@@ -16,6 +16,7 @@
*/
#include "ScriptMgr.h"
+#include "ScriptedCreature.h"
#include "InstanceScript.h"
#include "violet_hold.h"
#include "Player.h"
@@ -94,7 +95,7 @@ const Position MiddleRoomPortalSaboLocation = {1896.622925f, 804.854126f, 38.504
//Cyanigosa's prefight event data
enum Yells
{
- CYANIGOSA_SAY_SPAWN = -1608005
+ CYANIGOSA_SAY_SPAWN = 0
};
enum Spells
@@ -742,7 +743,7 @@ public:
{
case 1:
pCyanigosa->CastSpell(pCyanigosa, CYANIGOSA_BLUE_AURA, false);
- DoScriptText(CYANIGOSA_SAY_SPAWN, pCyanigosa);
+ pCyanigosa->AI()->Talk(CYANIGOSA_SAY_SPAWN);
uiCyanigosaEventTimer = 7*IN_MILLISECONDS;
++uiCyanigosaEventPhase;
break;
diff --git a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp
index c73cb97f2d1..5e326af9891 100644
--- a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp
+++ b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp
@@ -125,7 +125,7 @@ enum Spells
enum eSinclari
{
- SAY_SINCLARI_1 = -1608045
+ SAY_SINCLARI_1 = 0
};
float FirstPortalWPs [6][3] =
@@ -353,7 +353,7 @@ public:
switch (uiPhase)
{
case 1:
- DoScriptText(SAY_SINCLARI_1, me);
+ Talk(SAY_SINCLARI_1);
uiTimer = 4000;
uiPhase = 2;
break;
diff --git a/src/server/scripts/Northrend/borean_tundra.cpp b/src/server/scripts/Northrend/borean_tundra.cpp
index 6eed82991b8..3f20a3d32bc 100644
--- a/src/server/scripts/Northrend/borean_tundra.cpp
+++ b/src/server/scripts/Northrend/borean_tundra.cpp
@@ -29,7 +29,6 @@ npc_corastrasza
npc_jenny
npc_sinkhole_kill_credit
npc_khunok_the_behemoth
-npc_scourge_prisoner
mob_nerubar_victim
npc_keristrasza
npc_nesingwary_trapper
@@ -67,26 +66,26 @@ public:
{
npc_sinkhole_kill_creditAI(Creature* creature) : ScriptedAI(creature){}
- uint32 uiPhaseTimer;
- uint8 Phase;
+ uint32 phaseTimer;
+ uint8 phase;
uint64 casterGuid;
void Reset()
{
- uiPhaseTimer = 500;
- Phase = 0;
+ phaseTimer = 500;
+ phase = 0;
casterGuid = 0;
}
void SpellHit(Unit* caster, const SpellInfo* spell)
{
- if (Phase)
+ if (phase)
return;
if (spell->Id == SPELL_SET_CART && caster->GetTypeId() == TYPEID_PLAYER
&& CAST_PLR(caster)->GetQuestStatus(11897) == QUEST_STATUS_INCOMPLETE)
{
- Phase = 1;
+ phase = 1;
casterGuid = caster->GetGUID();
}
}
@@ -95,32 +94,32 @@ public:
void UpdateAI(const uint32 diff)
{
- if (!Phase)
+ if (!phase)
return;
- if (uiPhaseTimer <= diff)
+ if (phaseTimer <= diff)
{
- switch (Phase)
+ switch (phase)
{
case 1:
DoCast(me, SPELL_EXPLODE_CART, true);
DoCast(me, SPELL_SUMMON_CART, true);
if (GameObject* cart = me->FindNearestGameObject(188160, 3))
cart->SetUInt32Value(GAMEOBJECT_FACTION, 14);
- uiPhaseTimer = 3000;
- Phase = 2;
+ phaseTimer = 3000;
+ phase = 2;
break;
case 2:
if (GameObject* cart = me->FindNearestGameObject(188160, 3))
cart->UseDoorOrButton();
DoCast(me, SPELL_EXPLODE_CART, true);
- uiPhaseTimer = 3000;
- Phase = 3;
+ phaseTimer = 3000;
+ phase = 3;
break;
case 3:
DoCast(me, SPELL_EXPLODE_CART, true);
- uiPhaseTimer = 2000;
- Phase = 4;
+ phaseTimer = 2000;
+ phase = 4;
case 5:
DoCast(me, SPELL_SUMMON_WORM, true);
if (Unit* worm = me->FindNearestCreature(26250, 3))
@@ -128,8 +127,8 @@ public:
worm->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
worm->HandleEmoteCommand(EMOTE_ONESHOT_EMERGE);
}
- uiPhaseTimer = 1000;
- Phase = 6;
+ phaseTimer = 1000;
+ phase = 6;
break;
case 6:
DoCast(me, SPELL_EXPLODE_CART, true);
@@ -138,21 +137,21 @@ public:
me->Kill(worm);
worm->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
}
- uiPhaseTimer = 2000;
- Phase = 7;
+ phaseTimer = 2000;
+ phase = 7;
break;
case 7:
DoCast(me, SPELL_EXPLODE_CART, true);
if (Player* caster = Unit::GetPlayer(*me, casterGuid))
caster->KilledMonster(me->GetCreatureTemplate(), me->GetGUID());
- uiPhaseTimer = 5000;
- Phase = 8;
+ phaseTimer = 5000;
+ phase = 8;
break;
case 8:
EnterEvadeMode();
break;
}
- } else uiPhaseTimer -= diff;
+ } else phaseTimer -= diff;
}
@@ -387,41 +386,6 @@ public:
};
/*######
-## npc_scourge_prisoner
-######*/
-
-enum eScourgePrisoner
-{
- GO_SCOURGE_CAGE = 187867
-};
-
-class npc_scourge_prisoner : public CreatureScript
-{
-public:
- npc_scourge_prisoner() : CreatureScript("npc_scourge_prisoner") { }
-
- struct npc_scourge_prisonerAI : public ScriptedAI
- {
- npc_scourge_prisonerAI(Creature* creature) : ScriptedAI (creature){}
-
- void Reset()
- {
- me->SetReactState(REACT_PASSIVE);
-
- if (GameObject* go = me->FindNearestGameObject(GO_SCOURGE_CAGE, 5.0f))
- if (go->GetGoState() == GO_STATE_ACTIVE)
- go->SetGoState(GO_STATE_READY);
- }
-
- };
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new npc_scourge_prisonerAI(creature);
- }
-};
-
-/*######
## npc_jenny
######*/
@@ -583,14 +547,14 @@ public:
npc_nesingwary_trapperAI(Creature* creature) : ScriptedAI(creature) { creature->SetVisible(false); }
uint64 go_caribouGUID;
- uint8 Phase;
- uint32 uiPhaseTimer;
+ uint8 phase;
+ uint32 phaseTimer;
void Reset()
{
me->SetVisible(false);
- uiPhaseTimer = 2500;
- Phase = 1;
+ phaseTimer = 2500;
+ phase = 1;
go_caribouGUID = 0;
}
@@ -614,41 +578,41 @@ public:
void UpdateAI(const uint32 diff)
{
- if (uiPhaseTimer <= diff)
+ if (phaseTimer <= diff)
{
- switch (Phase)
+ switch (phase)
{
case 1:
me->SetVisible(true);
- uiPhaseTimer = 2000;
- Phase = 2;
+ phaseTimer = 2000;
+ phase = 2;
break;
case 2:
if (GameObject* go_fur = me->FindNearestGameObject(GO_HIGH_QUALITY_FUR, 11.0f))
me->GetMotionMaster()->MovePoint(0, go_fur->GetPositionX(), go_fur->GetPositionY(), go_fur->GetPositionZ());
- uiPhaseTimer = 1500;
- Phase = 3;
+ phaseTimer = 1500;
+ phase = 3;
break;
case 3:
- //DoScriptText(SAY_NESINGWARY_1, me);
- uiPhaseTimer = 2000;
- Phase = 4;
+ //Talk(SAY_NESINGWARY_1);
+ phaseTimer = 2000;
+ phase = 4;
break;
case 4:
me->HandleEmoteCommand(EMOTE_ONESHOT_LOOT);
- uiPhaseTimer = 1000;
- Phase = 5;
+ phaseTimer = 1000;
+ phase = 5;
break;
case 5:
me->HandleEmoteCommand(EMOTE_ONESHOT_NONE);
- uiPhaseTimer = 500;
- Phase = 6;
+ phaseTimer = 500;
+ phase = 6;
break;
case 6:
if (GameObject* go_fur = me->FindNearestGameObject(GO_HIGH_QUALITY_FUR, 11.0f))
go_fur->Delete();
- uiPhaseTimer = 500;
- Phase = 7;
+ phaseTimer = 500;
+ phase = 7;
break;
case 7:
{
@@ -663,16 +627,16 @@ public:
break;
}
}
- Phase = 8;
- uiPhaseTimer = 1000;
+ phase = 8;
+ phaseTimer = 1000;
}
break;
case 8:
DoCast(me, SPELL_TRAPPED, true);
- Phase = 0;
+ phase = 0;
break;
}
- } else uiPhaseTimer -= diff;
+ } else phaseTimer -= diff;
}
};
@@ -694,12 +658,12 @@ enum eLurgglbr
FACTION_ESCORTEE_A = 774,
FACTION_ESCORTEE_H = 775,
-};
-/*#define SAY_WP_1_LUR_START -1571004
-#define SAY_WP_1_LUR_END -1571005
-#define SAY_WP_41_LUR_START -1571006
-#define SAY_WP_41_LUR_END -1571007*/
+ SAY_START_1 = 0,
+ SAY_START_2 = 1,
+ SAY_END_1 = 2,
+ SAY_END_2 = 3
+};
class npc_lurgglbr : public CreatureScript
{
@@ -746,12 +710,12 @@ public:
switch (IntroPhase)
{
case 1:
- //DoScriptText(SAY_WP_1_LUR_START, me);
+ Talk(SAY_START_1);
IntroPhase = 2;
IntroTimer = 7500;
break;
case 2:
- //DoScriptText(SAY_WP_1_LUR_END, me);
+ Talk(SAY_END_1);
IntroPhase = 3;
IntroTimer = 7500;
break;
@@ -761,12 +725,12 @@ public:
IntroTimer = 0;
break;
case 4:
- //DoScriptText(SAY_WP_41_LUR_START, me);
+ Talk(SAY_START_2);
IntroPhase = 5;
IntroTimer = 8000;
break;
case 5:
- //DoScriptText(SAY_WP_41_LUR_END, me);
+ Talk(SAY_END_2);
IntroPhase = 6;
IntroTimer = 2500;
break;
@@ -951,26 +915,30 @@ enum eThassarian
NPC_GENERAL_ARLOS = 25250,
NPC_LERYSSA = 25251,
- SAY_TALBOT_1 = -1571004,
- SAY_LICH_1 = -1571005,
- SAY_TALBOT_2 = -1571006,
- SAY_THASSARIAN_1 = -1571007,
- SAY_THASSARIAN_2 = -1571008,
- SAY_LICH_2 = -1571009,
- SAY_THASSARIAN_3 = -1571010,
- SAY_TALBOT_3 = -1571011,
- SAY_LICH_3 = -1571012,
- SAY_TALBOT_4 = -1571013,
- SAY_ARLOS_1 = -1571014,
- SAY_ARLOS_2 = -1571015,
- SAY_LERYSSA_1 = -1571016,
- SAY_THASSARIAN_4 = -1571017,
- SAY_LERYSSA_2 = -1571018,
- SAY_THASSARIAN_5 = -1571019,
- SAY_LERYSSA_3 = -1571020,
- SAY_THASSARIAN_6 = -1571021,
- SAY_LERYSSA_4 = -1571022,
- SAY_THASSARIAN_7 = -1571023,
+ SAY_THASSARIAN_1 = 0,
+ SAY_THASSARIAN_2 = 1,
+ SAY_THASSARIAN_3 = 2,
+ SAY_THASSARIAN_4 = 3,
+ SAY_THASSARIAN_5 = 4,
+ SAY_THASSARIAN_6 = 5,
+ SAY_THASSARIAN_7 = 6,
+
+ SAY_TALBOT_1 = 0,
+ SAY_TALBOT_2 = 1,
+ SAY_TALBOT_3 = 2,
+ SAY_TALBOT_4 = 3,
+
+ SAY_LICH_1 = 0,
+ SAY_LICH_2 = 1,
+ SAY_LICH_3 = 2,
+
+ SAY_ARLOS_1 = 0,
+ SAY_ARLOS_2 = 1,
+
+ SAY_LERYSSA_1 = 0,
+ SAY_LERYSSA_2 = 1,
+ SAY_LERYSSA_3 = 2,
+ SAY_LERYSSA_4 = 3
};
#define GOSSIP_ITEM_T "Let's do this, Thassarian. It's now or never."
@@ -982,40 +950,38 @@ public:
struct npc_thassarianAI : public npc_escortAI
{
- npc_thassarianAI(Creature* creature) : npc_escortAI(creature)
- {
- }
+ npc_thassarianAI(Creature* creature) : npc_escortAI(creature) {}
- uint64 uiArthas;
- uint64 uiTalbot;
- uint64 uiLeryssa;
- uint64 uiArlos;
+ uint64 arthasGUID;
+ uint64 talbotGUID;
+ uint64 leryssaGUID;
+ uint64 arlosGUID;
- bool bArthasInPosition;
- bool bArlosInPosition;
- bool bLeryssaInPosition;
- bool bTalbotInPosition;
+ bool arthasInPosition;
+ bool arlosInPosition;
+ bool leryssaInPosition;
+ bool talbotInPosition;
- uint32 uiPhase;
- uint32 uiPhaseTimer;
+ uint32 phase;
+ uint32 phaseTimer;
void Reset()
{
me->RestoreFaction();
me->RemoveStandFlags(UNIT_STAND_STATE_SIT);
- uiArthas = 0;
- uiTalbot = 0;
- uiLeryssa = 0;
- uiArlos = 0;
+ arthasGUID = 0;
+ talbotGUID = 0;
+ leryssaGUID = 0;
+ arlosGUID = 0;
- bArthasInPosition = false;
- bArlosInPosition = false;
- bLeryssaInPosition = false;
- bTalbotInPosition = false;
+ arthasInPosition = false;
+ arlosInPosition = false;
+ leryssaInPosition = false;
+ talbotInPosition = false;
- uiPhase = 0;
- uiPhaseTimer = 0;
+ phase = 0;
+ phaseTimer = 0;
}
void WaypointReached(uint32 waypointId)
@@ -1028,25 +994,25 @@ public:
{
case 3:
SetEscortPaused(true);
- if (Creature* pArthas = me->SummonCreature(NPC_IMAGE_LICH_KING, 3730.313f, 3518.689f, 473.324f, 1.562f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 120000))
+ if (Creature* arthas = me->SummonCreature(NPC_IMAGE_LICH_KING, 3730.313f, 3518.689f, 473.324f, 1.562f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 120000))
{
- uiArthas = pArthas->GetGUID();
- pArthas->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- pArthas->SetReactState(REACT_PASSIVE);
- pArthas->SetWalk(true);
- pArthas->GetMotionMaster()->MovePoint(0, 3737.374756f, 3564.841309f, 477.433014f);
+ arthasGUID = arthas->GetGUID();
+ arthas->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ arthas->SetReactState(REACT_PASSIVE);
+ arthas->SetWalk(true);
+ arthas->GetMotionMaster()->MovePoint(0, 3737.374756f, 3564.841309f, 477.433014f);
}
- if (Creature* pTalbot = me->SummonCreature(NPC_COUNSELOR_TALBOT, 3747.23f, 3614.936f, 473.321f, 4.462012f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 120000))
+ if (Creature* talbot = me->SummonCreature(NPC_COUNSELOR_TALBOT, 3747.23f, 3614.936f, 473.321f, 4.462012f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 120000))
{
- uiTalbot = pTalbot->GetGUID();
- pTalbot->SetWalk(true);
- pTalbot->GetMotionMaster()->MovePoint(0, 3738.000977f, 3568.882080f, 477.433014f);
+ talbotGUID = talbot->GetGUID();
+ talbot->SetWalk(true);
+ talbot->GetMotionMaster()->MovePoint(0, 3738.000977f, 3568.882080f, 477.433014f);
}
me->SetWalk(false);
break;
case 4:
SetEscortPaused(true);
- uiPhase = 7;
+ phase = 7;
break;
}
}
@@ -1055,173 +1021,173 @@ public:
{
npc_escortAI::UpdateAI(uiDiff);
- if (bArthasInPosition && bTalbotInPosition)
+ if (arthasInPosition && talbotInPosition)
{
- uiPhase = 1;
- bArthasInPosition = false;
- bTalbotInPosition = false;
+ phase = 1;
+ arthasInPosition = false;
+ talbotInPosition = false;
}
- if (bArlosInPosition && bLeryssaInPosition)
+ if (arlosInPosition && leryssaInPosition)
{
- bArlosInPosition = false;
- bLeryssaInPosition = false;
- DoScriptText(SAY_THASSARIAN_1, me);
+ arlosInPosition = false;
+ leryssaInPosition = false;
+ Talk(SAY_THASSARIAN_1);
SetEscortPaused(false);
}
- if (uiPhaseTimer <= uiDiff)
+ if (phaseTimer <= uiDiff)
{
- Creature* pTalbot = me->GetCreature(*me, uiTalbot);
- Creature* pArthas = me->GetCreature(*me, uiArthas);
- switch (uiPhase)
+ Creature* talbot = me->GetCreature(*me, talbotGUID);
+ Creature* arthas = me->GetCreature(*me, arthasGUID);
+ switch (phase)
{
case 1:
- if (pTalbot)
- pTalbot->SetStandState(UNIT_STAND_STATE_KNEEL);
- uiPhaseTimer = 3000;
- ++uiPhase;
+ if (talbot)
+ talbot->SetStandState(UNIT_STAND_STATE_KNEEL);
+ phaseTimer = 3000;
+ ++phase;
break;
case 2:
- if (pTalbot)
+ if (talbot)
{
- pTalbot->UpdateEntry(NPC_PRINCE_VALANAR, ALLIANCE);
- pTalbot->setFaction(14);
- pTalbot->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- pTalbot->SetReactState(REACT_PASSIVE);
+ talbot->UpdateEntry(NPC_PRINCE_VALANAR, ALLIANCE);
+ talbot->setFaction(14);
+ talbot->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ talbot->SetReactState(REACT_PASSIVE);
}
- uiPhaseTimer = 5000;
- ++uiPhase;
+ phaseTimer = 5000;
+ ++phase;
break;
case 3:
- if (pTalbot)
- DoScriptText(SAY_TALBOT_1, pTalbot);
- uiPhaseTimer = 5000;
- ++uiPhase;
+ if (talbot)
+ talbot->AI()->Talk(SAY_TALBOT_1);
+ phaseTimer = 5000;
+ ++phase;
break;
case 4:
- if (pArthas)
- DoScriptText(SAY_LICH_1, pArthas);
- uiPhaseTimer = 5000;
- ++uiPhase;
+ if (arthas)
+ arthas->AI()->Talk(SAY_LICH_1);
+ phaseTimer = 5000;
+ ++phase;
break;
case 5:
- if (pTalbot)
- DoScriptText(SAY_TALBOT_2, pTalbot);
- uiPhaseTimer = 5000;
- ++uiPhase;
+ if (talbot)
+ talbot->AI()->Talk(SAY_TALBOT_2);
+ phaseTimer = 5000;
+ ++phase;
break;
case 6:
- if (Creature* pArlos = me->SummonCreature(NPC_GENERAL_ARLOS, 3745.527100f, 3615.655029f, 473.321533f, 4.447805f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 120000))
+ if (Creature* arlos = me->SummonCreature(NPC_GENERAL_ARLOS, 3745.527100f, 3615.655029f, 473.321533f, 4.447805f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 120000))
{
- uiArlos = pArlos->GetGUID();
- pArlos->SetWalk(true);
- pArlos->GetMotionMaster()->MovePoint(0, 3735.570068f, 3572.419922f, 477.441010f);
+ arlosGUID = arlos->GetGUID();
+ arlos->SetWalk(true);
+ arlos->GetMotionMaster()->MovePoint(0, 3735.570068f, 3572.419922f, 477.441010f);
}
- if (Creature* pLeryssa = me->SummonCreature(NPC_LERYSSA, 3749.654541f, 3614.959717f, 473.323486f, 4.524959f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 120000))
+ if (Creature* leryssa = me->SummonCreature(NPC_LERYSSA, 3749.654541f, 3614.959717f, 473.323486f, 4.524959f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 120000))
{
- uiLeryssa = pLeryssa->GetGUID();
- pLeryssa->SetWalk(false);
- pLeryssa->SetReactState(REACT_PASSIVE);
- pLeryssa->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- pLeryssa->GetMotionMaster()->MovePoint(0, 3741.969971f, 3571.439941f, 477.441010f);
+ leryssaGUID = leryssa->GetGUID();
+ leryssa->SetWalk(false);
+ leryssa->SetReactState(REACT_PASSIVE);
+ leryssa->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ leryssa->GetMotionMaster()->MovePoint(0, 3741.969971f, 3571.439941f, 477.441010f);
}
- uiPhaseTimer = 2000;
- uiPhase = 0;
+ phaseTimer = 2000;
+ phase = 0;
break;
case 7:
- DoScriptText(SAY_THASSARIAN_2, me);
- uiPhaseTimer = 5000;
- ++uiPhase;
+ Talk(SAY_THASSARIAN_2);
+ phaseTimer = 5000;
+ ++phase;
break;
case 8:
- if (pArthas && pTalbot)
+ if (arthas && talbot)
{
- pArthas->SetInFront(me); //The client doesen't update with the new orientation :l
- pTalbot->SetStandState(UNIT_STAND_STATE_STAND);
- DoScriptText(SAY_LICH_2, pArthas);
+ arthas->SetInFront(me); //The client doesen't update with the new orientation :l
+ talbot->SetStandState(UNIT_STAND_STATE_STAND);
+ arthas->AI()->Talk(SAY_LICH_2);
}
- uiPhaseTimer = 5000;
- uiPhase = 9;
+ phaseTimer = 5000;
+ phase = 9;
break;
case 9:
- DoScriptText(SAY_THASSARIAN_3, me);
- uiPhaseTimer = 5000;
- uiPhase = 10;
+ Talk(SAY_THASSARIAN_3);
+ phaseTimer = 5000;
+ phase = 10;
break;
case 10:
- if (pTalbot)
- DoScriptText(SAY_TALBOT_3, pTalbot);
- uiPhaseTimer = 5000;
- uiPhase = 11;
+ if (talbot)
+ talbot->AI()->Talk(SAY_TALBOT_3);
+ phaseTimer = 5000;
+ phase = 11;
break;
case 11:
- if (pArthas)
- DoScriptText(SAY_LICH_3, pArthas);
- uiPhaseTimer = 5000;
- uiPhase = 12;
+ if (arthas)
+ arthas->AI()->Talk(SAY_LICH_3);
+ phaseTimer = 5000;
+ phase = 12;
break;
case 12:
- if (pTalbot)
- DoScriptText(SAY_TALBOT_4, pTalbot);
- uiPhaseTimer = 2000;
- uiPhase = 13;
+ if (talbot)
+ talbot->AI()->Talk(SAY_TALBOT_4);
+ phaseTimer = 2000;
+ phase = 13;
break;
case 13:
- if (pArthas)
- pArthas->RemoveFromWorld();
- ++uiPhase;
+ if (arthas)
+ arthas->RemoveFromWorld();
+ ++phase;
break;
case 14:
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- if (pTalbot)
+ if (talbot)
{
- pTalbot->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- pTalbot->SetReactState(REACT_AGGRESSIVE);
- pTalbot->CastSpell(me, SPELL_SHADOW_BOLT, false);
+ talbot->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ talbot->SetReactState(REACT_AGGRESSIVE);
+ talbot->CastSpell(me, SPELL_SHADOW_BOLT, false);
}
- uiPhaseTimer = 1500;
- ++uiPhase;
+ phaseTimer = 1500;
+ ++phase;
break;
case 15:
me->SetReactState(REACT_AGGRESSIVE);
- AttackStart(pTalbot);
- uiPhase = 0;
+ AttackStart(talbot);
+ phase = 0;
break;
case 16:
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
- uiPhaseTimer = 20000;
- ++uiPhase;
+ phaseTimer = 20000;
+ ++phase;
break;
case 17:
- if (Creature* pLeryssa = me->GetCreature(*me, uiLeryssa))
- pLeryssa->RemoveFromWorld();
- if (Creature* pArlos= me->GetCreature(*me, uiArlos))
- pArlos->RemoveFromWorld();
- if (pTalbot)
- pTalbot->RemoveFromWorld();
+ if (Creature* leryssa = me->GetCreature(*me, leryssaGUID))
+ leryssa->RemoveFromWorld();
+ if (Creature* arlos= me->GetCreature(*me, arlosGUID))
+ arlos->RemoveFromWorld();
+ if (talbot)
+ talbot->RemoveFromWorld();
me->RemoveStandFlags(UNIT_STAND_STATE_SIT);
SetEscortPaused(false);
- uiPhaseTimer = 0;
- uiPhase = 0;
+ phaseTimer = 0;
+ phase = 0;
}
- } else uiPhaseTimer -= uiDiff;
+ } else phaseTimer -= uiDiff;
if (!UpdateVictim())
return;
@@ -1231,17 +1197,17 @@ public:
void JustDied(Unit* /*killer*/)
{
- if (Creature* pTalbot = me->GetCreature(*me, uiTalbot))
- pTalbot->RemoveFromWorld();
+ if (Creature* talbot = me->GetCreature(*me, talbotGUID))
+ talbot->RemoveFromWorld();
- if (Creature* pLeryssa = me->GetCreature(*me, uiLeryssa))
- pLeryssa->RemoveFromWorld();
+ if (Creature* leryssa = me->GetCreature(*me, leryssaGUID))
+ leryssa->RemoveFromWorld();
- if (Creature* pArlos = me->GetCreature(*me, uiArlos))
- pArlos->RemoveFromWorld();
+ if (Creature* arlos = me->GetCreature(*me, arlosGUID))
+ arlos->RemoveFromWorld();
- if (Creature* pArthas = me->GetCreature(*me, uiArthas))
- pArthas->RemoveFromWorld();
+ if (Creature* arthas = me->GetCreature(*me, arthasGUID))
+ arthas->RemoveFromWorld();
}
};
@@ -1302,7 +1268,7 @@ public:
if (me->isSummon())
if (Unit* summoner = me->ToTempSummon()->GetSummoner())
- CAST_AI(npc_thassarian::npc_thassarianAI, CAST_CRE(summoner)->AI())->bArthasInPosition = true;
+ CAST_AI(npc_thassarian::npc_thassarianAI, CAST_CRE(summoner)->AI())->arthasInPosition = true;
}
};
@@ -1334,7 +1300,7 @@ public:
me->CastSpell(me, SPELL_STUN, true);
if (me->isSummon())
if (Unit* summoner = me->ToTempSummon()->GetSummoner())
- CAST_AI(npc_thassarian::npc_thassarianAI, CAST_CRE(summoner)->AI())->bArlosInPosition = true;
+ CAST_AI(npc_thassarian::npc_thassarianAI, CAST_CRE(summoner)->AI())->arlosInPosition = true;
}
};
@@ -1366,23 +1332,23 @@ public:
creature->RestoreFaction();
}
- uint64 LeryssaGUID;
- uint64 ArlosGUID;
+ uint64 leryssaGUID;
+ uint64 arlosGUID;
bool bCheck;
- uint32 uiShadowBoltTimer;
- uint32 uiDeflectionTimer;
- uint32 uiSoulBlastTimer;
+ uint32 shadowBoltTimer;
+ uint32 deflectionTimer;
+ uint32 soulBlastTimer;
void Reset()
{
- LeryssaGUID = 0;
- ArlosGUID = 0;
+ leryssaGUID = 0;
+ arlosGUID = 0;
bCheck = false;
- uiShadowBoltTimer = urand(5000, 12000);
- uiDeflectionTimer = urand(20000, 25000);
- uiSoulBlastTimer = urand (12000, 18000);
+ shadowBoltTimer = urand(5000, 12000);
+ deflectionTimer = urand(20000, 25000);
+ soulBlastTimer = urand (12000, 18000);
}
void MovementInform(uint32 uiType, uint32 /*uiId*/)
{
@@ -1391,17 +1357,17 @@ public:
if (me->isSummon())
if (Unit* summoner = me->ToTempSummon()->GetSummoner())
- CAST_AI(npc_thassarian::npc_thassarianAI, CAST_CRE(summoner)->AI())->bTalbotInPosition = true;
+ CAST_AI(npc_thassarian::npc_thassarianAI, CAST_CRE(summoner)->AI())->talbotInPosition = true;
}
void UpdateAI(const uint32 uiDiff)
{
if (bCheck)
{
- if (Creature* pLeryssa = me->FindNearestCreature(NPC_LERYSSA, 50.0f, true))
- LeryssaGUID = pLeryssa->GetGUID();
- if (Creature* pArlos = me->FindNearestCreature(NPC_GENERAL_ARLOS, 50.0f, true))
- ArlosGUID = pArlos->GetGUID();
+ if (Creature* leryssa = me->FindNearestCreature(NPC_LERYSSA, 50.0f, true))
+ leryssaGUID = leryssa->GetGUID();
+ if (Creature* arlos = me->FindNearestCreature(NPC_GENERAL_ARLOS, 50.0f, true))
+ arlosGUID = arlos->GetGUID();
bCheck = false;
}
@@ -1410,23 +1376,23 @@ public:
if (me->GetAreaId() == 4125)
{
- if (uiShadowBoltTimer <= uiDiff)
+ if (shadowBoltTimer <= uiDiff)
{
DoCast(me->getVictim(), SPELL_SHADOW_BOLT);
- uiShadowBoltTimer = urand(5000, 12000);
- } else uiShadowBoltTimer -= uiDiff;
+ shadowBoltTimer = urand(5000, 12000);
+ } else shadowBoltTimer -= uiDiff;
- if (uiDeflectionTimer <= uiDiff)
+ if (deflectionTimer <= uiDiff)
{
DoCast(me->getVictim(), SPELL_DEFLECTION);
- uiDeflectionTimer = urand(20000, 25000);
- } else uiDeflectionTimer -= uiDiff;
+ deflectionTimer = urand(20000, 25000);
+ } else deflectionTimer -= uiDiff;
- if (uiSoulBlastTimer <= uiDiff)
+ if (soulBlastTimer <= uiDiff)
{
DoCast(me->getVictim(), SPELL_SOUL_BLAST);
- uiSoulBlastTimer = urand (12000, 18000);
- } else uiSoulBlastTimer -= uiDiff;
+ soulBlastTimer = urand (12000, 18000);
+ } else soulBlastTimer -= uiDiff;
}
DoMeleeAttackIfReady();
@@ -1434,22 +1400,22 @@ public:
void JustDied(Unit* killer)
{
- if (!LeryssaGUID || !ArlosGUID)
+ if (!leryssaGUID || !arlosGUID)
return;
- Creature* pLeryssa = Unit::GetCreature(*me, LeryssaGUID);
- Creature* pArlos = Unit::GetCreature(*me, ArlosGUID);
- if (!pLeryssa || !pArlos)
+ Creature* leryssa = Unit::GetCreature(*me, leryssaGUID);
+ Creature* arlos = Unit::GetCreature(*me, arlosGUID);
+ if (!leryssa || !arlos)
return;
- DoScriptText(SAY_ARLOS_1, pArlos);
- DoScriptText(SAY_ARLOS_2, pArlos);
- DoScriptText(SAY_LERYSSA_1, pLeryssa);
- pArlos->Kill(pArlos, false);
- pLeryssa->RemoveAura(SPELL_STUN);
- pLeryssa->ClearUnitState(UNIT_STATE_STUNNED);
- pLeryssa->SetWalk(false);
- pLeryssa->GetMotionMaster()->MovePoint(0, 3722.114502f, 3564.201660f, 477.441437f);
+ arlos->AI()->Talk(SAY_ARLOS_1);
+ arlos->AI()->Talk(SAY_ARLOS_2);
+ leryssa->AI()->Talk(SAY_LERYSSA_1);
+ arlos->Kill(arlos, false);
+ leryssa->RemoveAura(SPELL_STUN);
+ leryssa->ClearUnitState(UNIT_STATE_STUNNED);
+ leryssa->SetWalk(false);
+ leryssa->GetMotionMaster()->MovePoint(0, 3722.114502f, 3564.201660f, 477.441437f);
if (Player* player = killer->ToPlayer())
player->RewardPlayerAndGroupAtEvent(NPC_PRINCE_VALANAR, 0);
@@ -1476,33 +1442,33 @@ public:
npc_leryssaAI(Creature* creature) : ScriptedAI(creature)
{
bDone = false;
- Phase = 0;
- uiPhaseTimer = 0;
+ phase = 0;
+ phaseTimer = 0;
creature->RemoveStandFlags(UNIT_STAND_STATE_SIT);
}
bool bDone;
- uint32 Phase;
- uint32 uiPhaseTimer;
+ uint32 phase;
+ uint32 phaseTimer;
- void MovementInform(uint32 uiType, uint32 /*uiId*/)
+ void MovementInform(uint32 type, uint32 /*uiId*/)
{
- if (uiType != POINT_MOTION_TYPE)
+ if (type != POINT_MOTION_TYPE)
return;
if (!bDone)
{
- if (Creature* pTalbot = me->FindNearestCreature(NPC_PRINCE_VALANAR, 50.0f, true))
- CAST_AI(npc_counselor_talbot::npc_counselor_talbotAI, pTalbot->GetAI())->bCheck = true;
+ if (Creature* talbot = me->FindNearestCreature(NPC_PRINCE_VALANAR, 50.0f, true))
+ CAST_AI(npc_counselor_talbot::npc_counselor_talbotAI, talbot->GetAI())->bCheck = true;
me->AddUnitState(UNIT_STATE_STUNNED);
me->CastSpell(me, SPELL_STUN, true);
if (me->isSummon())
if (Unit* summoner = me->ToTempSummon()->GetSummoner())
- CAST_AI(npc_thassarian::npc_thassarianAI, summoner->GetAI())->bLeryssaInPosition = true;
+ CAST_AI(npc_thassarian::npc_thassarianAI, summoner->GetAI())->leryssaInPosition = true;
bDone = true;
}
else
@@ -1511,8 +1477,8 @@ public:
if (me->isSummon())
if (Unit* summoner = me->ToTempSummon()->GetSummoner())
summoner->SetStandState(UNIT_STAND_STATE_SIT);
- uiPhaseTimer = 1500;
- Phase = 1;
+ phaseTimer = 1500;
+ phase = 1;
}
}
@@ -1520,59 +1486,63 @@ public:
{
ScriptedAI::UpdateAI(uiDiff);
- if (uiPhaseTimer <= uiDiff)
+ if (phaseTimer <= uiDiff)
{
- switch (Phase)
+ switch (phase)
{
case 1:
if (me->isSummon())
- if (Unit* pThassarian = me->ToTempSummon()->GetSummoner())
- DoScriptText(SAY_THASSARIAN_4, pThassarian);
- uiPhaseTimer = 5000;
- ++Phase;
+ if (Unit* summoner = me->ToTempSummon()->GetSummoner())
+ if (Creature* thassarian = summoner->ToCreature())
+ thassarian->AI()->Talk(SAY_THASSARIAN_4);
+ phaseTimer = 5000;
+ ++phase;
break;
case 2:
- DoScriptText(SAY_LERYSSA_2, me);
- uiPhaseTimer = 5000;
- ++Phase;
+ Talk(SAY_LERYSSA_2);
+ phaseTimer = 5000;
+ ++phase;
break;
case 3:
if (me->isSummon())
- if (Unit* pThassarian = me->ToTempSummon()->GetSummoner())
- DoScriptText(SAY_THASSARIAN_5, pThassarian);
- uiPhaseTimer = 5000;
- ++Phase;
+ if (Unit* summoner = me->ToTempSummon()->GetSummoner())
+ if (Creature* thassarian = summoner->ToCreature())
+ thassarian->AI()->Talk(SAY_THASSARIAN_5);
+ phaseTimer = 5000;
+ ++phase;
break;
case 4:
- DoScriptText(SAY_LERYSSA_3, me);
- uiPhaseTimer = 5000;
- ++Phase;
+ Talk(SAY_LERYSSA_3);
+ phaseTimer = 5000;
+ ++phase;
break;
case 5:
if (me->isSummon())
- if (Unit* pThassarian = me->ToTempSummon()->GetSummoner())
- DoScriptText(SAY_THASSARIAN_6, pThassarian);
- uiPhaseTimer = 5000;
- ++Phase;
+ if (Unit* summoner = me->ToTempSummon()->GetSummoner())
+ if (Creature* thassarian = summoner->ToCreature())
+ thassarian->AI()->Talk(SAY_THASSARIAN_6);
+ phaseTimer = 5000;
+ ++phase;
break;
case 6:
- DoScriptText(SAY_LERYSSA_4, me);
- uiPhaseTimer = 5000;
- ++Phase;
+ Talk(SAY_LERYSSA_4);
+ phaseTimer = 5000;
+ ++phase;
break;
case 7:
if (me->isSummon())
- if (Unit* pThassarian = me->ToTempSummon()->GetSummoner())
- {
- DoScriptText(SAY_THASSARIAN_7, pThassarian);
- CAST_AI(npc_thassarian::npc_thassarianAI, pThassarian->GetAI())->uiPhase = 16;
- }
- uiPhaseTimer = 5000;
- Phase = 0;
+ if (Unit* summoner = me->ToTempSummon()->GetSummoner())
+ if (Creature* thassarian = summoner->ToCreature())
+ {
+ thassarian->AI()->Talk(SAY_THASSARIAN_7);
+ CAST_AI(npc_thassarian::npc_thassarianAI, thassarian->GetAI())->phase = 16;
+ }
+ phaseTimer = 5000;
+ phase = 0;
break;
}
- } else uiPhaseTimer -= uiDiff;
+ } else phaseTimer -= uiDiff;
if (!UpdateVictim())
return;
@@ -1676,13 +1646,13 @@ enum eImprisionedBerylSorcerer
NPC_IMPRISONED_BERYL_SORCERER = 25478,
- SAY_IMPRISIONED_BERYL_1 = -1571024,
- SAY_IMPRISIONED_BERYL_2 = -1571025,
- SAY_IMPRISIONED_BERYL_3 = -1571026,
- SAY_IMPRISIONED_BERYL_4 = -1571027,
- SAY_IMPRISIONED_BERYL_5 = -1571028,
- SAY_IMPRISIONED_BERYL_6 = -1571029,
- SAY_IMPRISIONED_BERYL_7 = -1571030,
+ SAY_IMPRISIONED_BERYL_1 = 0,
+ SAY_IMPRISIONED_BERYL_2 = 1,
+ SAY_IMPRISIONED_BERYL_3 = 2,
+ SAY_IMPRISIONED_BERYL_4 = 3,
+ SAY_IMPRISIONED_BERYL_5 = 4,
+ SAY_IMPRISIONED_BERYL_6 = 5,
+ SAY_IMPRISIONED_BERYL_7 = 6
};
class npc_imprisoned_beryl_sorcerer : public CreatureScript
@@ -1745,25 +1715,25 @@ public:
switch (step)
{
case 1:
- DoScriptText(SAY_IMPRISIONED_BERYL_1, me);
+ Talk(SAY_IMPRISIONED_BERYL_1);
break;
case 2:
- DoScriptText(SAY_IMPRISIONED_BERYL_2, me, caster);
+ Talk(SAY_IMPRISIONED_BERYL_2, caster->GetGUID());
break;
case 3:
- DoScriptText(SAY_IMPRISIONED_BERYL_3, me);
+ Talk(SAY_IMPRISIONED_BERYL_3);
break;
case 4:
- DoScriptText(SAY_IMPRISIONED_BERYL_4, me);
+ Talk(SAY_IMPRISIONED_BERYL_4);
break;
case 5:
- DoScriptText(SAY_IMPRISIONED_BERYL_5, me);
+ Talk(SAY_IMPRISIONED_BERYL_5);
break;
case 6:
- DoScriptText(SAY_IMPRISIONED_BERYL_6, me, caster);
+ Talk(SAY_IMPRISIONED_BERYL_6, caster->GetGUID());
break;
case 7:
- DoScriptText(SAY_IMPRISIONED_BERYL_7, me);
+ Talk(SAY_IMPRISIONED_BERYL_7);
caster->KilledMonsterCredit(NPC_IMPRISONED_BERYL_SORCERER, 0);
break;
}
@@ -1780,18 +1750,16 @@ public:
/*######
## npc_mootoo_the_younger
######*/
-enum Script_Texts_Mootoo_the_Younger
+enum MootooTheYounger
{
- SAY_1 =-1750040,
- SAY_2 =-1750041,
- SAY_3 =-1750042,
- SAY_4 =-1750043,
- SAY_5 =-1750044
-};
-enum Mootoo_the_Younger_Entries
-{
- NPC_MOOTOO_THE_YOUNGER =25504,
- QUEST_ESCAPING_THE_MIST =11664
+ SAY_1 = 0,
+ SAY_2 = 1,
+ SAY_3 = 2,
+ SAY_4 = 3,
+ SAY_5 = 4,
+
+ NPC_MOOTOO_THE_YOUNGER = 25504,
+ QUEST_ESCAPING_THE_MIST = 11664
};
class npc_mootoo_the_younger : public CreatureScript
@@ -1813,7 +1781,7 @@ public:
break;
}
creature->SetStandState(UNIT_STAND_STATE_STAND);
- DoScriptText(SAY_1, creature);
+ creature->AI()->Talk(SAY_1);
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, false, player->GetGUID());
}
return true;
@@ -1844,19 +1812,19 @@ public:
{
case 10:
me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
- DoScriptText(SAY_2, me);
+ Talk(SAY_2);
break;
case 12:
- DoScriptText(SAY_3, me);
+ Talk(SAY_3);
me->HandleEmoteCommand(EMOTE_ONESHOT_LOOT);
break;
case 16:
- DoScriptText(SAY_4, me);
+ Talk(SAY_4);
me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
break;
case 20:
me->SetPhaseMask(1, true);
- DoScriptText(SAY_5, me);
+ Talk(SAY_5);
me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
player->GroupEventHappens(QUEST_ESCAPING_THE_MIST, me);
SetRun(true);
@@ -1875,15 +1843,13 @@ public:
## npc_bonker_togglevolt
######*/
-enum Bonker_Togglevolt_Entries
-{
- NPC_BONKER_TOGGLEVOLT = 25589,
- QUEST_GET_ME_OUTA_HERE = 11673
-};
-enum Script_Texts_Bonker_Togglevolt
+enum BonkerTogglevolt
{
- SAY_bonker_1 = -1700002,
- SAY_bonker_2 = -1700003
+ NPC_BONKER_TOGGLEVOLT = 25589,
+ QUEST_GET_ME_OUTA_HERE = 11673,
+
+ SAY_BONKER_1 = 0,
+ SAY_BONKER_2 = 1
};
class npc_bonker_togglevolt : public CreatureScript
@@ -1896,7 +1862,7 @@ public:
if (quest->GetQuestId() == QUEST_GET_ME_OUTA_HERE)
{
creature->SetStandState(UNIT_STAND_STATE_STAND);
- DoScriptText(SAY_bonker_2, creature, player);
+ creature->AI()->Talk(SAY_BONKER_2, player->GetGUID());
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, true, player->GetGUID());
}
return true;
@@ -1925,7 +1891,7 @@ public:
{
if (Bonker_agro == 0)
{
- DoScriptText(SAY_bonker_1, me);
+ Talk(SAY_BONKER_1);
Bonker_agro++;
}
DoMeleeAttackIfReady();
@@ -2343,10 +2309,10 @@ enum eHiddenCultist
NPC_SALTY_JOHN_THORPE = 25248,
NPC_GUARD_MITCHELLS = 25828,
- SAY_HIDDEN_CULTIST_1 = -1571044,
- SAY_HIDDEN_CULTIST_2 = -1571045,
- SAY_HIDDEN_CULTIST_3 = -1571046,
- SAY_HIDDEN_CULTIST_4 = -1571047
+ SAY_HIDDEN_CULTIST_1 = 0,
+ SAY_HIDDEN_CULTIST_2 = 1,
+ SAY_HIDDEN_CULTIST_3 = 2,
+ SAY_HIDDEN_CULTIST_4 = 3
};
const char* GOSSIP_ITEM_TOM_HEGGER = "What do you know about the Cult of the Damned?";
@@ -2428,17 +2394,17 @@ public:
{
case NPC_SALTY_JOHN_THORPE:
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);
- DoScriptText(SAY_HIDDEN_CULTIST_1, me);
+ Talk(SAY_HIDDEN_CULTIST_1);
uiEventTimer = 5000;
uiEventPhase = 2;
break;
case NPC_GUARD_MITCHELLS:
- DoScriptText(SAY_HIDDEN_CULTIST_2, me);
+ Talk(SAY_HIDDEN_CULTIST_2);
uiEventTimer = 5000;
uiEventPhase = 2;
break;
case NPC_TOM_HEGGER:
- DoScriptText(SAY_HIDDEN_CULTIST_3, me);
+ Talk(SAY_HIDDEN_CULTIST_3);
uiEventTimer = 5000;
uiEventPhase = 2;
break;
@@ -2448,7 +2414,7 @@ public:
switch (me->GetEntry())
{
case NPC_SALTY_JOHN_THORPE:
- DoScriptText(SAY_HIDDEN_CULTIST_4, me);
+ Talk(SAY_HIDDEN_CULTIST_4);
if (Player* player = me->GetPlayer(*me, uiPlayerGUID))
{
me->SetInFront(player);
@@ -2548,7 +2514,6 @@ void AddSC_borean_tundra()
new npc_corastrasza();
new npc_iruk();
new mob_nerubar_victim();
- new npc_scourge_prisoner();
new npc_jenny();
new npc_fezzix_geartwist();
new npc_nesingwary_trapper();
diff --git a/src/server/scripts/Northrend/grizzly_hills.cpp b/src/server/scripts/Northrend/grizzly_hills.cpp
index 0363e0c892d..8bcc255b343 100644
--- a/src/server/scripts/Northrend/grizzly_hills.cpp
+++ b/src/server/scripts/Northrend/grizzly_hills.cpp
@@ -21,6 +21,7 @@
#include "ScriptedEscortAI.h"
#include "Player.h"
#include "SpellInfo.h"
+#include "CreatureTextMgr.h"
/*######
## Quest 12027: Mr. Floppy's Perilous Adventure
@@ -37,19 +38,19 @@ enum eFloppy
SPELL_MRFLOPPY = 47184, //vehicle aura
- SAY_WORGHAGGRO1 = -1800001, //Um... I think one of those wolves is back...
- SAY_WORGHAGGRO2 = -1800002, //He's going for Mr. Floppy!
- SAY_WORGRAGGRO3 = -1800003, //Oh, no! Look, it's another wolf, and it's a biiiiiig one!
- SAY_WORGRAGGRO4 = -1800004, //He's gonna eat Mr. Floppy! You gotta help Mr. Floppy! You just gotta!
- SAY_RANDOMAGGRO = -1800005, //There's a big meanie attacking Mr. Floppy! Help!
- SAY_VICTORY1 = -1800006, //Let's get out of here before more wolves find us!
- SAY_VICTORY2 = -1800007, //Don't go toward the light, Mr. Floppy!
- SAY_VICTORY3 = -1800008, //Mr. Floppy, you're ok! Thank you so much for saving Mr. Floppy!
- SAY_VICTORY4 = -1800009, //I think I see the camp! We're almost home, Mr. Floppy! Let's go!
- TEXT_EMOTE_WP1 = -1800010, //Mr. Floppy revives
- TEXT_EMOTE_AGGRO = -1800011, //The Ravenous Worg chomps down on Mr. Floppy
- SAY_QUEST_ACCEPT = -1800012, //Are you ready, Mr. Floppy? Stay close to me and watch out for those wolves!
- SAY_QUEST_COMPLETE = -1800013 //Thank you for helping me get back to the camp. Go tell Walter that I'm safe now!
+ SAY_WORGHAGGRO1 = 0, //Um... I think one of those wolves is back...
+ SAY_WORGHAGGRO2 = 1, //He's going for Mr. Floppy!
+ SAY_WORGRAGGRO3 = 2, //Oh, no! Look, it's another wolf, and it's a biiiiiig one!
+ SAY_WORGRAGGRO4 = 3, //He's gonna eat Mr. Floppy! You gotta help Mr. Floppy! You just gotta!
+ SAY_RANDOMAGGRO = 4, //There's a big meanie attacking Mr. Floppy! Help!
+ SAY_VICTORY1 = 5, //Let's get out of here before more wolves find us!
+ SAY_VICTORY2 = 6, //Don't go toward the light, Mr. Floppy!
+ SAY_VICTORY3 = 7, //Mr. Floppy, you're ok! Thank you so much for saving Mr. Floppy!
+ SAY_VICTORY4 = 8, //I think I see the camp! We're almost home, Mr. Floppy! Let's go!
+ TEXT_EMOTE_WP1 = 9, //Mr. Floppy revives
+ TEXT_EMOTE_AGGRO = 10, //The Ravenous Worg chomps down on Mr. Floppy
+ SAY_QUEST_ACCEPT = 11, //Are you ready, Mr. Floppy? Stay close to me and watch out for those wolves!
+ SAY_QUEST_COMPLETE = 12 //Thank you for helping me get back to the camp. Go tell Walter that I'm safe now!
};
//emily
@@ -92,7 +93,7 @@ public:
case 10:
if (Unit::GetCreature(*me, MrfloppyGUID))
{
- DoScriptText(SAY_WORGHAGGRO1, me);
+ 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;
@@ -103,7 +104,7 @@ public:
case 17:
if (Creature* Mrfloppy = Unit::GetCreature(*me, MrfloppyGUID))
Mrfloppy->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ());
- DoScriptText(SAY_WORGRAGGRO3, me);
+ 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))
{
RWORG->setFaction(35);
@@ -141,7 +142,7 @@ public:
Mrfloppy->ExitVehicle();
RWORG->setFaction(14);
RWORG->GetMotionMaster()->MovePoint(0, RWORG->GetPositionX()+10, RWORG->GetPositionY()+80, RWORG->GetPositionZ());
- DoScriptText(SAY_VICTORY2, me);
+ Talk(SAY_VICTORY2);
}
}
break;
@@ -155,7 +156,7 @@ public:
me->GetMotionMaster()->MovePoint(0, Mrfloppy->GetPositionX(), Mrfloppy->GetPositionY(), Mrfloppy->GetPositionZ());
Mrfloppy->setDeathState(ALIVE);
Mrfloppy->GetMotionMaster()->MoveFollow(me, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
- DoScriptText(SAY_VICTORY3, me);
+ Talk(SAY_VICTORY3);
}
}
break;
@@ -164,12 +165,12 @@ public:
{
Completed = true;
player->GroupEventHappens(QUEST_PERILOUS_ADVENTURE, me);
- DoScriptText(SAY_QUEST_COMPLETE, me, player);
+ Talk(SAY_QUEST_COMPLETE, player->GetGUID());
}
me->SetWalk(false);
break;
case 25:
- DoScriptText(SAY_VICTORY4, me);
+ Talk(SAY_VICTORY4);
break;
case 27:
me->DisappearAndDie();
@@ -181,7 +182,7 @@ public:
void EnterCombat(Unit* /*Who*/)
{
- DoScriptText(SAY_RANDOMAGGRO, me);
+ Talk(SAY_RANDOMAGGRO);
}
void Reset()
@@ -209,7 +210,7 @@ public:
{
if (quest->GetQuestId() == QUEST_PERILOUS_ADVENTURE)
{
- DoScriptText(SAY_QUEST_ACCEPT, creature);
+ creature->AI()->Talk(SAY_QUEST_ACCEPT);
if (Creature* Mrfloppy = GetClosestCreatureWithEntry(creature, NPC_MRFLOPPY, 180.0f))
Mrfloppy->GetMotionMaster()->MoveFollow(creature, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
@@ -248,13 +249,13 @@ public:
switch (Who->GetEntry())
{
case NPC_HUNGRY_WORG:
- DoScriptText(SAY_WORGHAGGRO2, Emily);
+ Emily->AI()->Talk(SAY_WORGHAGGRO2);
break;
case NPC_RAVENOUS_WORG:
- DoScriptText(SAY_WORGRAGGRO4, Emily);
+ Emily->AI()->Talk(SAY_WORGRAGGRO4);
break;
default:
- DoScriptText(SAY_RANDOMAGGRO, Emily);
+ Emily->AI()->Talk(SAY_RANDOMAGGRO);
}
}
}
@@ -461,12 +462,10 @@ public:
enum eSkirmisher
{
- SPELL_RENEW_SKIRMISHER = 48812,
- CREDIT_NPC = 27466,
+ SPELL_RENEW_SKIRMISHER = 48812,
+ CREDIT_NPC = 27466,
- RANDOM_SAY_1 = -1800044, //Ahh..better..
- RANDOM_SAY_2 = -1800045, //Whoa.. i nearly died there. Thank you, $Race!
- RANDOM_SAY_3 = -1800046 //Thank you. $Class!
+ RANDOM_SAY = 0,
};
class npc_wounded_skirmisher : public CreatureScript
@@ -500,7 +499,7 @@ public:
&& caster->ToPlayer()->GetQuestStatus(12288) == QUEST_STATUS_INCOMPLETE)
{
caster->ToPlayer()->KilledMonsterCredit(CREDIT_NPC, 0);
- DoScriptText(RAND(RANDOM_SAY_1, RANDOM_SAY_2, RANDOM_SAY_3), caster);
+ sCreatureTextMgr->SendChat(me, RANDOM_SAY, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, caster->ToPlayer());
if (me->IsStandState())
me->GetMotionMaster()->MovePoint(1, me->GetPositionX()+7, me->GetPositionY()+7, me->GetPositionZ());
else
@@ -593,16 +592,12 @@ public:
/*Venture co. Straggler - when you cast Smoke Bomb, he will yell and run away*/
enum eSmokeEmOut
{
- SAY_SEO1 = -1603535,
- SAY_SEO2 = -1603536,
- SAY_SEO3 = -1603537,
- SAY_SEO4 = -1603538,
- SAY_SEO5 = -1603539,
- QUEST_SMOKE_EM_OUT_A = 12323,
- QUEST_SMOKE_EM_OUT_H = 12324,
- SPELL_SMOKE_BOMB = 49075,
- SPELL_CHOP = 43410,
- SPELL_VENTURE_STRAGGLER_CREDIT = 49093,
+ SAY_SEO = 0,
+ QUEST_SMOKE_EM_OUT_A = 12323,
+ QUEST_SMOKE_EM_OUT_H = 12324,
+ SPELL_SMOKE_BOMB = 49075,
+ SPELL_CHOP = 43410,
+ SPELL_VENTURE_STRAGGLER_CREDIT = 49093,
};
class npc_venture_co_straggler : public CreatureScript
@@ -644,7 +639,7 @@ class npc_venture_co_straggler : public CreatureScript
++uiTimer;
break;
case 1:
- DoScriptText(RAND(SAY_SEO1, SAY_SEO2, SAY_SEO3, SAY_SEO4, SAY_SEO5), me);
+ Talk(SAY_SEO);
me->GetMotionMaster()->MovePoint(0, me->GetPositionX()-7, me->GetPositionY()-5, me->GetPositionZ());
uiRunAwayTimer = 2500;
++uiTimer;
diff --git a/src/server/scripts/Northrend/icecrown.cpp b/src/server/scripts/Northrend/icecrown.cpp
index 030df23028c..e08a9173715 100644
--- a/src/server/scripts/Northrend/icecrown.cpp
+++ b/src/server/scripts/Northrend/icecrown.cpp
@@ -494,6 +494,378 @@ class npc_tournament_training_dummy : public CreatureScript
};
+// Battle for Crusaders' Pinnacle
+enum BlessedBanner
+{
+ SPELL_BLESSING_OF_THE_CRUSADE = 58026,
+ SPELL_THREAT_PULSE = 58113,
+ SPELL_CRUSADERS_SPIRE_VICTORY = 58084,
+ SPELL_TORCH = 58121,
+
+ NPC_BLESSED_BANNER = 30891,
+ NPC_CRUSADER_LORD_DALFORS = 31003,
+ NPC_ARGENT_BATTLE_PRIEST = 30919,
+ NPC_ARGENT_MASON = 30900,
+ NPC_REANIMATED_CAPTAIN = 30986,
+ NPC_SCOURGE_DRUDGE = 30984,
+ NPC_HIDEOUS_PLAGEBRINGER = 30987,
+ NPC_HALOF_THE_DEATHBRINGER = 30989,
+ NPC_LK = 31013,
+
+ BANNER_SAY = 0, // "The Blessed Banner of the Crusade has been planted.\n Defend the banner from all attackers!"
+ DALFORS_SAY_PRE_1 = 0, // "BY THE LIGHT! Those damned monsters! Look at what they've done to our people!"
+ DALFORS_SAY_PRE_2 = 1, // "Burn it down, boys. Burn it all down."
+ DALFORS_SAY_START = 2, // "Let 'em come. They'll pay for what they've done!"
+ DALFORS_YELL_FINISHED = 3, // "We've done it, lads! We've taken the pinnacle from the Scourge! Report to Father Gustav at once and tell him the good news! We're gonna get to buildin' and settin' up! Go!"
+ LK_TALK_1 = 0, // "Leave no survivors!"
+ LK_TALK_2 = 1, // "Cower before my terrible creations!"
+ LK_TALK_3 = 2, // "Feast my children! Feast upon the flesh of the living!"
+ LK_TALK_4 = 3, // "Lay down your arms and surrender your souls!"
+
+ EVENT_SPAWN = 1,
+ EVENT_INTRO_1 = 2,
+ EVENT_INTRO_2 = 3,
+ EVENT_INTRO_3 = 4,
+ EVENT_MASON_ACTION = 5,
+ EVENT_START_FIGHT = 6,
+ EVENT_WAVE_SPAWN = 7,
+ EVENT_HALOF = 8,
+ EVENT_ENDED = 9,
+};
+
+Position const DalforsPos[3] =
+{
+ {6458.703f, 403.858f, 490.498f, 3.1205f}, // Dalfors spawn point
+ {6422.950f, 423.335f, 510.451f, 0.0f}, // Dalfors intro pos
+ {6426.343f, 420.515f, 508.650f, 0.0f}, // Dalfors fight pos
+};
+
+Position const Priest1Pos[2] =
+{
+ {6462.025f, 403.681f, 489.721f, 3.1007f}, // priest1 spawn point
+ {6421.480f, 423.576f, 510.781f, 5.7421f}, // priest1 intro pos
+};
+
+Position const Priest2Pos[2] =
+{
+ {6463.969f, 407.198f, 489.240f, 2.2689f}, // priest2 spawn point
+ {6419.778f, 421.404f, 510.972f, 5.7421f}, // priest2 intro pos
+};
+
+Position const Priest3Pos[2] =
+{
+ {6464.371f, 400.944f, 489.186f, 6.1610f}, // priest3 spawn point
+ {6423.516f, 425.782f, 510.774f, 5.7421f}, // priest3 intro pos
+};
+
+Position const Mason1Pos[3] =
+{
+ {6462.929f, 409.826f, 489.392f, 3.0968f}, // mason1 spawn point
+ {6428.163f, 421.960f, 508.297f, 0.0f}, // mason1 intro pos
+ {6414.335f, 454.904f, 511.395f, 2.8972f}, // mason1 action pos
+};
+
+Position const Mason2Pos[3] =
+{
+ {6462.650f, 405.670f, 489.576f, 2.9414f}, // mason2 spawn point
+ {6426.250f, 419.194f, 508.219f, 0.0f}, // mason2 intro pos
+ {6415.014f, 446.849f, 511.395f, 3.1241f}, // mason2 action pos
+};
+
+Position const Mason3Pos[3] =
+{
+ {6462.646f, 401.218f, 489.601f, 2.7864f}, // mason3 spawn point
+ {6423.855f, 416.598f, 508.305f, 0.0f}, // mason3 intro pos
+ {6417.070f, 438.824f, 511.395f, 3.6651f}, // mason3 action pos
+};
+
+class npc_blessed_banner : public CreatureScript
+{
+public:
+ npc_blessed_banner() : CreatureScript("npc_blessed_banner") { }
+
+ struct npc_blessed_bannerAI : public Scripted_NoMovementAI
+ {
+ npc_blessed_bannerAI(Creature* creature) : Scripted_NoMovementAI(creature) , Summons(me)
+ {
+ HalofSpawned = false;
+ PhaseCount = 0;
+ Summons.DespawnAll();
+ }
+
+ EventMap events;
+
+ bool HalofSpawned;
+
+ uint32 PhaseCount;
+
+ SummonList Summons;
+
+ uint64 guidDalfors;
+ uint64 guidPriest[3];
+ uint64 guidMason[3];
+ uint64 guidHalof;
+
+ void Reset()
+ {
+ me->setRegeneratingHealth(false);
+ DoCast(SPELL_THREAT_PULSE);
+ me->AI()->Talk(BANNER_SAY);
+ events.ScheduleEvent(EVENT_SPAWN,3000);
+ }
+
+ void EnterCombat(Unit* /*who*/) {}
+
+ void MoveInLineOfSight(Unit* /*who*/) {}
+
+ void JustSummoned(Creature* Summoned)
+ {
+ Summons.Summon(Summoned);
+ }
+
+ void JustDied(Unit* /*killer*/)
+ {
+ Summons.DespawnAll();
+ me->DespawnOrUnsummon();
+ }
+
+ void UpdateAI(uint32 const diff)
+ {
+ events.Update(diff);
+
+ switch (events.ExecuteEvent())
+ {
+ case EVENT_SPAWN:
+ {
+ if (Creature* Dalfors = DoSummon(NPC_CRUSADER_LORD_DALFORS, DalforsPos[0]))
+ {
+ guidDalfors = Dalfors->GetGUID();
+ Dalfors->GetMotionMaster()->MovePoint(0, DalforsPos[1]);
+ }
+ if (Creature* Priest1 = DoSummon(NPC_ARGENT_BATTLE_PRIEST, Priest1Pos[0]))
+ {
+ guidPriest[0] = Priest1->GetGUID();
+ Priest1->GetMotionMaster()->MovePoint(0, Priest1Pos[1]);
+ }
+ if (Creature* Priest2 = DoSummon(NPC_ARGENT_BATTLE_PRIEST, Priest2Pos[0]))
+ {
+ guidPriest[1] = Priest2->GetGUID();
+ Priest2->GetMotionMaster()->MovePoint(0, Priest2Pos[1]);
+ }
+ if (Creature* Priest3 = DoSummon(NPC_ARGENT_BATTLE_PRIEST, Priest3Pos[0]))
+ {
+ guidPriest[2] = Priest3->GetGUID();
+ Priest3->GetMotionMaster()->MovePoint(0, Priest3Pos[1]);
+ }
+ if (Creature* Mason1 = DoSummon(NPC_ARGENT_MASON, Mason1Pos[0]))
+ {
+ guidMason[0] = Mason1->GetGUID();
+ Mason1->GetMotionMaster()->MovePoint(0, Mason1Pos[1]);
+ }
+ if (Creature* Mason2 = DoSummon(NPC_ARGENT_MASON, Mason2Pos[0]))
+ {
+ guidMason[1] = Mason2->GetGUID();
+ Mason2->GetMotionMaster()->MovePoint(0, Mason2Pos[1]);
+ }
+ if (Creature* Mason3 = DoSummon(NPC_ARGENT_MASON, Mason3Pos[0]))
+ {
+ guidMason[2] = Mason3->GetGUID();
+ Mason3->GetMotionMaster()->MovePoint(0, Mason3Pos[1]);
+ }
+ events.ScheduleEvent(EVENT_INTRO_1,15000);
+ }
+ break;
+ case EVENT_INTRO_1:
+ {
+ if (Creature* Dalfors = me->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))
+ {
+ Dalfors->SetFacingTo(6.215f);
+ Dalfors->AI()->Talk(DALFORS_SAY_PRE_2);
+ }
+ events.ScheduleEvent(EVENT_INTRO_3,5000);
+ }
+ break;
+ case EVENT_INTRO_3:
+ {
+ if (Creature* Dalfors = me->GetCreature(*me,guidDalfors))
+ {
+ Dalfors->GetMotionMaster()->MovePoint(0, DalforsPos[2]);
+ Dalfors->SetHomePosition(DalforsPos[2]);
+ }
+ if (Creature* Priest1 = me->GetCreature(*me,guidPriest[0]))
+ {
+ Priest1->SetFacingTo(5.7421f);
+ Priest1->SetHomePosition(Priest1Pos[1]);
+ }
+ if (Creature* Priest2 = me->GetCreature(*me,guidPriest[1]))
+ {
+ Priest2->SetFacingTo(5.7421f);
+ Priest2->SetHomePosition(Priest2Pos[1]);
+ }
+ if (Creature* Priest3 = me->GetCreature(*me,guidPriest[2]))
+ {
+ Priest3->SetFacingTo(5.7421f);
+ Priest3->SetHomePosition(Priest3Pos[1]);
+ }
+ if (Creature* Mason1 = me->GetCreature(*me,guidMason[0]))
+ {
+ Mason1->GetMotionMaster()->MovePoint(0, Mason1Pos[2]);
+ Mason1->SetHomePosition(Mason1Pos[2]);
+ }
+ if (Creature* Mason2 = me->GetCreature(*me,guidMason[1]))
+ {
+ Mason2->GetMotionMaster()->MovePoint(0, Mason2Pos[2]);
+ Mason2->SetHomePosition(Mason2Pos[2]);
+ }
+ if (Creature* Mason3 = me->GetCreature(*me,guidMason[2]))
+ {
+ Mason3->GetMotionMaster()->MovePoint(0, Mason3Pos[2]);
+ Mason3->SetHomePosition(Mason3Pos[2]);
+ }
+ events.ScheduleEvent(EVENT_START_FIGHT,5000);
+ events.ScheduleEvent(EVENT_MASON_ACTION,15000);
+ }
+ break;
+ case EVENT_MASON_ACTION:
+ {
+ if (Creature* Mason1 = me->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]))
+ {
+ Mason2->SetFacingTo(3.1241f);
+ Mason2->AI()->SetData(1,1); // triggers SAI actions on npc
+ }
+ if (Creature* Mason3 = me->GetCreature(*me,guidMason[2]))
+ {
+ Mason3->SetFacingTo(3.6651f);
+ Mason3->AI()->SetData(1,1); // triggers SAI actions on npc
+ }
+ }
+ break;
+ case EVENT_START_FIGHT:
+ {
+ if(Creature* LK = GetClosestCreatureWithEntry(me,NPC_LK,100))
+ LK->AI()->Talk(LK_TALK_1);
+ if (Creature* Dalfors = me->GetCreature(*me,guidDalfors))
+ Dalfors->AI()->Talk(DALFORS_SAY_START);
+ events.ScheduleEvent(EVENT_WAVE_SPAWN,1000);
+ }
+ break;
+ case EVENT_WAVE_SPAWN:
+ {
+ if (PhaseCount == 3)
+ {
+ if (Creature* LK = GetClosestCreatureWithEntry(me,NPC_LK,100))
+ LK->AI()->Talk(LK_TALK_2);
+ }
+ else if (PhaseCount == 6)
+ {
+ if (Creature* LK = GetClosestCreatureWithEntry(me,NPC_LK,100))
+ LK->AI()->Talk(LK_TALK_3);
+ }
+ if (Creature* tempsum = DoSummon(NPC_SCOURGE_DRUDGE,Mason3Pos[0]))
+ {
+ tempsum->SetHomePosition(DalforsPos[2]);
+ tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100));
+ }
+ if (urand(0,1) == 0)
+ {
+ if (Creature* tempsum = DoSummon(NPC_HIDEOUS_PLAGEBRINGER,Mason1Pos[0]))
+ {
+ tempsum->SetHomePosition(DalforsPos[2]);
+ tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100));
+ }
+ if (Creature* tempsum = DoSummon(NPC_HIDEOUS_PLAGEBRINGER,Mason2Pos[0]))
+ {
+ tempsum->SetHomePosition(DalforsPos[2]);
+ tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100));
+ }
+ }
+ else
+ {
+ if (Creature* tempsum = DoSummon(NPC_REANIMATED_CAPTAIN,Mason1Pos[0]))
+ {
+ tempsum->SetHomePosition(DalforsPos[2]);
+ tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100));
+ }
+ if (Creature* tempsum = DoSummon(NPC_REANIMATED_CAPTAIN,Mason2Pos[0]))
+ {
+ tempsum->SetHomePosition(DalforsPos[2]);
+ tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100));
+ }
+ }
+
+ PhaseCount++;
+
+ if (PhaseCount < 8)
+ events.ScheduleEvent(EVENT_WAVE_SPAWN,urand(10000,20000));
+ else
+ events.ScheduleEvent(EVENT_HALOF,urand(10000,20000));
+ }
+ break;
+ case EVENT_HALOF:
+ {
+ if (Creature* LK = GetClosestCreatureWithEntry(me,NPC_LK,100))
+ LK->AI()->Talk(LK_TALK_4);
+ if (Creature* tempsum = DoSummon(NPC_SCOURGE_DRUDGE,Mason1Pos[0]))
+ {
+ tempsum->SetHomePosition(DalforsPos[2]);
+ tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100));
+ }
+ if (Creature* tempsum = DoSummon(NPC_SCOURGE_DRUDGE,Mason2Pos[0]))
+ {
+ tempsum->SetHomePosition(DalforsPos[2]);
+ tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100));
+ }
+ if (Creature* tempsum = DoSummon(NPC_HALOF_THE_DEATHBRINGER,DalforsPos[0]))
+ {
+ HalofSpawned = true;
+ guidHalof = tempsum->GetGUID();
+ tempsum->SetHomePosition(DalforsPos[2]);
+ tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100));
+ }
+ }
+ break;
+ case EVENT_ENDED:
+ {
+ Summons.DespawnAll();
+ me->DespawnOrUnsummon();
+ }
+ break;
+ }
+
+ if (PhaseCount == 8)
+ if (Creature* Halof = me->GetCreature(*me,guidHalof))
+ if (Halof->isDead())
+ {
+ DoCast(me,SPELL_CRUSADERS_SPIRE_VICTORY,true);
+ Summons.DespawnEntry(NPC_HIDEOUS_PLAGEBRINGER);
+ Summons.DespawnEntry(NPC_REANIMATED_CAPTAIN);
+ Summons.DespawnEntry(NPC_SCOURGE_DRUDGE);
+ Summons.DespawnEntry(NPC_HALOF_THE_DEATHBRINGER);
+ if (Creature* Dalfors = me->GetCreature(*me,guidDalfors))
+ Dalfors->AI()->Talk(DALFORS_YELL_FINISHED);
+ events.ScheduleEvent(EVENT_ENDED,10000);
+ }
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new npc_blessed_bannerAI(creature);
+ }
+};
+
void AddSC_icecrown()
{
new npc_arete;
@@ -502,4 +874,5 @@ void AddSC_icecrown()
new npc_guardian_pavilion;
new npc_vereth_the_cunning;
new npc_tournament_training_dummy;
+ new npc_blessed_banner();
}
diff --git a/src/server/scripts/Northrend/sholazar_basin.cpp b/src/server/scripts/Northrend/sholazar_basin.cpp
index 8404413ad9d..5bf45452d34 100644
--- a/src/server/scripts/Northrend/sholazar_basin.cpp
+++ b/src/server/scripts/Northrend/sholazar_basin.cpp
@@ -18,7 +18,7 @@
/* ScriptData
SDName: Sholazar_Basin
SD%Complete: 100
-SDComment: Quest support: 12570, 12573, 12621.
+SDComment: Quest support: 12570, 12573, 12621, 12726
SDCategory: Sholazar_Basin
EndScriptData */
@@ -26,6 +26,7 @@ EndScriptData */
npc_injured_rainspeaker_oracle
npc_vekjik
avatar_of_freya
+npc_haiphoon (Quest: "Song of Wind and Water")
EndContentData */
#include "ScriptMgr.h"
@@ -34,6 +35,8 @@ EndContentData */
#include "ScriptedEscortAI.h"
#include "SpellScript.h"
#include "SpellAuras.h"
+#include "Vehicle.h"
+#include "CombatAI.h"
#include "Player.h"
/*######
@@ -44,9 +47,9 @@ EndContentData */
enum eRainspeaker
{
- SAY_START_IRO = -1571000,
- SAY_QUEST_ACCEPT_IRO = -1571001,
- SAY_END_IRO = -1571002,
+ SAY_START_IRO = 0,
+ SAY_QUEST_ACCEPT_IRO = 1,
+ SAY_END_IRO = 2,
QUEST_FORTUNATE_MISUNDERSTANDINGS = 12570,
FACTION_ESCORTEE_A = 774,
@@ -106,7 +109,7 @@ public:
case 28:
player->GroupEventHappens(QUEST_FORTUNATE_MISUNDERSTANDINGS, me);
// me->RestoreFaction();
- DoScriptText(SAY_END_IRO, me);
+ Talk(SAY_END_IRO);
SetRun(false);
break;
}
@@ -146,7 +149,7 @@ public:
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, false, player->GetGUID());
CAST_AI(npc_escortAI, (creature->AI()))->SetMaxPlayerDistance(35.0f);
creature->SetUnitMovementFlags(MOVEMENTFLAG_FALLING);
- DoScriptText(SAY_START_IRO, creature);
+ creature->AI()->Talk(SAY_START_IRO);
switch (player->GetTeam()){
case ALLIANCE:
@@ -162,7 +165,7 @@ public:
bool OnQuestAccept(Player* /*player*/, Creature* creature, Quest const* /*_Quest*/)
{
- DoScriptText(SAY_QUEST_ACCEPT_IRO, creature);
+ creature->AI()->Talk(SAY_QUEST_ACCEPT_IRO);
return false;
}
@@ -184,7 +187,7 @@ enum eVekjik
GOSSIP_TEXTID_VEKJIK1 = 13137,
GOSSIP_TEXTID_VEKJIK2 = 13138,
- SAY_TEXTID_VEKJIK1 = -1000208,
+ SAY_TEXTID_VEKJIK1 = 0,
SPELL_FREANZYHEARTS_FURY = 51469,
@@ -223,7 +226,7 @@ public:
break;
case GOSSIP_ACTION_INFO_DEF+2:
player->CLOSE_GOSSIP_MENU();
- DoScriptText(SAY_TEXTID_VEKJIK1, creature, player);
+ creature->AI()->Talk(SAY_TEXTID_VEKJIK1, player->GetGUID());
player->AreaExploredOrEventHappens(QUEST_MAKING_PEACE);
creature->CastSpell(player, SPELL_FREANZYHEARTS_FURY, false);
break;
@@ -342,13 +345,13 @@ enum eEnums
SPELL_EXPLODE_CRYSTAL = 62487,
SPELL_FLAMES = 64561,
- SAY_WP_7 = -1800047,
- SAY_WP_6 = -1800048,
- SAY_WP_5 = -1800049,
- SAY_WP_4 = -1800050,
- SAY_WP_3 = -1800051,
- SAY_WP_2 = -1800052,
- SAY_WP_1 = -1800053,
+ SAY_WP_1 = 0,
+ SAY_WP_2 = 1,
+ SAY_WP_3 = 2,
+ SAY_WP_4 = 3,
+ SAY_WP_5 = 4,
+ SAY_WP_6 = 5,
+ SAY_WP_7 = 6,
QUEST_DISASTER = 12688
};
@@ -371,19 +374,19 @@ public:
switch (waypointId)
{
case 0:
- DoScriptText(SAY_WP_2, me);
+ Talk(SAY_WP_2);
break;
case 1:
- DoScriptText(SAY_WP_3, me);
+ Talk(SAY_WP_3);
me->CastSpell(5918.33f, 5372.91f, -98.770f, SPELL_EXPLODE_CRYSTAL, true);
me->SummonGameObject(184743, 5918.33f, 5372.91f, -98.770f, 0, 0, 0, 0, 0, TEMPSUMMON_MANUAL_DESPAWN); //approx 3 to 4 seconds
me->HandleEmoteCommand(EMOTE_ONESHOT_LAUGH);
break;
case 2:
- DoScriptText(SAY_WP_4, me);
+ Talk(SAY_WP_4);
break;
case 7:
- DoScriptText(SAY_WP_5, me);
+ Talk(SAY_WP_5);
break;
case 8:
me->CastSpell(5887.37f, 5379.39f, -91.289f, SPELL_EXPLODE_CRYSTAL, true);
@@ -391,13 +394,13 @@ public:
me->HandleEmoteCommand(EMOTE_ONESHOT_LAUGH);
break;
case 9:
- DoScriptText(SAY_WP_6, me);
+ Talk(SAY_WP_6);
break;
case 13:
if (player)
{
player->GroupEventHappens(QUEST_DISASTER, me);
- DoScriptText(SAY_WP_7, me);
+ Talk(SAY_WP_7);
}
break;
}
@@ -448,7 +451,7 @@ public:
creature->setFaction(113);
pEscortAI->Start(false, false, player->GetGUID());
- DoScriptText(SAY_WP_1, creature);
+ creature->AI()->Talk(SAY_WP_1);
}
}
return true;
@@ -713,8 +716,8 @@ enum eAdventurousDwarf
GOSSIP_MENU_DWARF = 13307,
- SAY_DWARF_OUCH = -1571042,
- SAY_DWARF_HELP = -1571043
+ SAY_DWARF_OUCH = 0,
+ SAY_DWARF_HELP = 1
};
class npc_adventurous_dwarf : public CreatureScript
@@ -722,10 +725,17 @@ class npc_adventurous_dwarf : public CreatureScript
public:
npc_adventurous_dwarf() : CreatureScript("npc_adventurous_dwarf") { }
+ struct npc_adventurous_dwarfAI : public ScriptedAI
+ {
+ npc_adventurous_dwarfAI(Creature* creature) : ScriptedAI(creature)
+ {
+ Talk(SAY_DWARF_OUCH);
+ }
+ };
+
CreatureAI* GetAI(Creature* creature) const
{
- DoScriptText(SAY_DWARF_OUCH, creature);
- return NULL;
+ return new npc_adventurous_dwarfAI(creature);
}
bool OnGossipHello(Player* player, Creature* creature)
@@ -750,15 +760,24 @@ public:
{
player->PlayerTalkClass->ClearMenus();
uint32 spellId = 0;
+
switch (action)
{
- case GOSSIP_ACTION_INFO_DEF + 1: spellId = SPELL_ADD_ORANGE; break;
- case GOSSIP_ACTION_INFO_DEF + 2: spellId = SPELL_ADD_BANANAS; break;
- case GOSSIP_ACTION_INFO_DEF + 3: spellId = SPELL_ADD_PAPAYA; break;
+ case GOSSIP_ACTION_INFO_DEF + 1:
+ spellId = SPELL_ADD_ORANGE;
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2:
+ spellId = SPELL_ADD_BANANAS;
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3:
+ spellId = SPELL_ADD_PAPAYA;
+ break;
}
+
if (spellId)
player->CastSpell(player, spellId, true);
- DoScriptText(SAY_DWARF_HELP, creature);
+
+ creature->AI()->Talk(SAY_DWARF_HELP);
creature->DespawnOrUnsummon();
return true;
}
@@ -968,6 +987,52 @@ public:
}
};
+/*######
+## Quest: Song of Wind and Water ID: 12726
+######*/
+/*This quest precisly needs core script since battle vehicles are not well integrated with SAI,
+may be easily converted to SAI when they get.*/
+enum SongOfWindAndWater
+{
+ // Spells
+ SPELL_DEVOUR_WIND = 52862,
+ SPELL_DEVOUR_WATER = 52864,
+ // NPCs
+ NPC_HAIPHOON_WATER = 28999,
+ NPC_HAIPHOON_AIR = 28985
+};
+
+class npc_haiphoon : public CreatureScript
+{
+public:
+ npc_haiphoon() : CreatureScript("npc_haiphoon") { }
+
+ struct npc_haiphoonAI : public VehicleAI
+ {
+ npc_haiphoonAI(Creature* creature) : VehicleAI(creature) { }
+
+ void SpellHitTarget(Unit* target, SpellInfo const* spell)
+ {
+ if (target == me)
+ return;
+
+ if (spell->Id == SPELL_DEVOUR_WIND && me->GetCharmerOrOwnerPlayerOrPlayerItself())
+ {
+ me->UpdateEntry(NPC_HAIPHOON_AIR);
+ }
+ else if (spell->Id == SPELL_DEVOUR_WATER && me->GetCharmerOrOwnerPlayerOrPlayerItself())
+ {
+ me->UpdateEntry(NPC_HAIPHOON_WATER);
+ }
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new npc_haiphoonAI(creature);
+ }
+};
+
void AddSC_sholazar_basin()
{
new npc_injured_rainspeaker_oracle();
@@ -979,4 +1044,5 @@ void AddSC_sholazar_basin()
new npc_jungle_punch_target();
new spell_q12620_the_lifewarden_wrath();
new spell_q12589_shoot_rjr();
+ new npc_haiphoon();
}
diff --git a/src/server/scripts/Northrend/storm_peaks.cpp b/src/server/scripts/Northrend/storm_peaks.cpp
index b3a379d903d..f87b24ce639 100644
--- a/src/server/scripts/Northrend/storm_peaks.cpp
+++ b/src/server/scripts/Northrend/storm_peaks.cpp
@@ -30,13 +30,13 @@
## npc_agnetta_tyrsdottar
######*/
-#define SAY_AGGRO -1571003
#define GOSSIP_AGNETTA "Skip the warmup, sister... or are you too scared to face soemeone your own size?"
enum eAgnetta
{
QUEST_ITS_THAT_YOUR_GOBLIN = 12969,
- FACTION_HOSTILE_AT1 = 45
+ FACTION_HOSTILE_AT1 = 45,
+ SAY_AGGRO = 0
};
class npc_agnetta_tyrsdottar : public CreatureScript
@@ -73,7 +73,7 @@ public:
player->PlayerTalkClass->ClearMenus();
if (action == GOSSIP_ACTION_INFO_DEF+1)
{
- DoScriptText(SAY_AGGRO, creature);
+ creature->AI()->Talk(SAY_AGGRO);
player->CLOSE_GOSSIP_MENU();
creature->setFaction(FACTION_HOSTILE_AT1);
creature->AI()->AttackStart(player);
@@ -143,8 +143,8 @@ public:
enum eInjuredGoblin
{
QUEST_BITTER_DEPARTURE = 12832,
- SAY_QUEST_ACCEPT = -1800042,
- SAY_END_WP_REACHED = -1800043
+ SAY_QUEST_ACCEPT = 0,
+ SAY_END_WP_REACHED = 1
};
#define GOSSIP_ITEM_1 "I am ready, lets get you out of here"
@@ -167,7 +167,7 @@ public:
switch (waypointId)
{
case 26:
- DoScriptText(SAY_END_WP_REACHED, me, player);
+ Talk(SAY_END_WP_REACHED, player->GetGUID());
break;
case 27:
player->GroupEventHappens(QUEST_BITTER_DEPARTURE, me);
@@ -218,7 +218,7 @@ public:
bool OnQuestAccept(Player* /*player*/, Creature* creature, Quest const* quest)
{
if (quest->GetQuestId() == QUEST_BITTER_DEPARTURE)
- DoScriptText(SAY_QUEST_ACCEPT, creature);
+ creature->AI()->Talk(SAY_QUEST_ACCEPT);
return false;
}
diff --git a/src/server/scripts/Northrend/zuldrak.cpp b/src/server/scripts/Northrend/zuldrak.cpp
index e5763e5baf6..506c34d40fb 100644
--- a/src/server/scripts/Northrend/zuldrak.cpp
+++ b/src/server/scripts/Northrend/zuldrak.cpp
@@ -121,9 +121,9 @@ enum eRageclaw
SPELL_KNEEL = 39656
};
-const char * SAY_RAGECLAW_1 = "I poop on you, trollses!";
-const char * SAY_RAGECLAW_2 = "ARRRROOOOGGGGAAAA!";
-const char * SAY_RAGECLAW_3 = "No more mister nice wolvar!";
+const char* SAY_RAGECLAW_1 = "I poop on you, trollses!";
+const char* SAY_RAGECLAW_2 = "ARRRROOOOGGGGAAAA!";
+const char* SAY_RAGECLAW_3 = "No more mister nice wolvar!";
#define SAY_RAGECLAW RAND(SAY_RAGECLAW_1, SAY_RAGECLAW_2, SAY_RAGECLAW_3)
@@ -265,14 +265,16 @@ enum eGurgthock
NPC_FIEND_FIRE = 30042,
NPC_FIEND_EARTH = 30043,
- SAY_QUEST_ACCEPT_TUSKARRMAGEDON = -1571031,
- SAY_QUEST_ACCEPT_KORRAK_1 = -1571033,
- SAY_QUEST_ACCEPT_KORRAK_2 = -1571034,
- SAY_QUEST_ACCEPT_MAGNATAUR = -1571035,
+ SAY_QUEST_ACCEPT_TUSKARRMAGEDON = 0,
+ SAY_QUEST_ACCEPT_KORRAK_1 = 1,
+ SAY_QUEST_ACCEPT_KORRAK_2 = 2,
+ SAY_QUEST_ACCEPT_MAGNATAUR = 3,
+ EMOTE_YGGDRAS_SPAWN = 4,
+ SAY_STINKBEARD_SPAWN = 5,
+ SAY_GURGTHOCK_ELEMENTAL_SPAWN = 6,
- EMOTE_YGGDRAS_SPAWN = -1571039,
- SAY_STINKBEARD_SPAWN = -1571040,
- SAY_GURGTHOCK_ELEMENTAL_SPAWN = -1571041,
+ SAY_CALL_FOR_HELP = 0,
+ SAY_RECRUIT = 0,
SPELL_CRASHING_WAVE = 55909, // water
SPELL_SHOCKWAVE = 55918, // earth
@@ -380,12 +382,12 @@ public:
switch (uiValue)
{
case QUEST_AMPHITHEATER_ANGUISH_TUSKARRMAGEDDON:
- DoScriptText(SAY_QUEST_ACCEPT_TUSKARRMAGEDON, me);
+ Talk(SAY_QUEST_ACCEPT_TUSKARRMAGEDON);
uiPhase = 1;
uiTimer = 4000;
break;
case QUEST_AMPHITHEATER_ANGUISH_KORRAK_BLOODRAGER:
- DoScriptText(SAY_QUEST_ACCEPT_KORRAK_1, me);
+ Talk(SAY_QUEST_ACCEPT_KORRAK_1);
uiPhase = 3;
uiTimer = 3000;
break;
@@ -443,7 +445,7 @@ public:
SummonGUID = 0;
break;
case 3:
- DoScriptText(SAY_QUEST_ACCEPT_KORRAK_2, me);
+ Talk(SAY_QUEST_ACCEPT_KORRAK_2);
uiTimer = 3000;
uiPhase = 4;
break;
@@ -477,7 +479,7 @@ public:
}
break;
case 8:
- DoScriptText(SAY_QUEST_ACCEPT_MAGNATAUR, me);
+ Talk(SAY_QUEST_ACCEPT_MAGNATAUR);
uiTimer = 5000;
uiPhase = 11;
break;
@@ -494,12 +496,12 @@ public:
break;
case 10:
me->SummonCreature(NPC_YGGDRAS, SpawnPosition[1], TEMPSUMMON_CORPSE_DESPAWN, 1000);
- DoScriptText(EMOTE_YGGDRAS_SPAWN, me);
+ Talk(EMOTE_YGGDRAS_SPAWN);
uiPhase = 0;
break;
case 11:
if (Creature* creature = me->SummonCreature(NPC_STINKBEARD, SpawnPosition[0], TEMPSUMMON_CORPSE_DESPAWN, 1000))
- DoScriptText(SAY_STINKBEARD_SPAWN, creature);
+ creature->AI()->Talk(SAY_STINKBEARD_SPAWN);
uiPhase = 0;
break;
case 12:
@@ -514,7 +516,7 @@ public:
}
break;
case 13:
- DoScriptText(SAY_GURGTHOCK_ELEMENTAL_SPAWN, me);
+ Talk(SAY_GURGTHOCK_ELEMENTAL_SPAWN);
uiTimer = 3000;
uiPhase = 14;
break;
@@ -575,9 +577,7 @@ enum eOrinokoTuskbreaker
SPELL_SUMMON_WHISKER = 55946,
NPC_WHISKER = 30113,
- NPC_HUNGRY_PENGUIN = 30110,
-
- SAY_CALL_FOR_HELP = -1571032
+ NPC_HUNGRY_PENGUIN = 30110
};
class npc_orinoko_tuskbreaker : public CreatureScript
@@ -659,7 +659,7 @@ public:
if (!bSummoned && !HealthAbovePct(50))
{
- DoScriptText(SAY_CALL_FOR_HELP, me);
+ Talk(SAY_CALL_FOR_HELP);
//DoCast(me->getVictim(), SPELL_SUMMON_WHISKER); petai is not working correctly???
if (Creature* pWhisker = me->SummonCreature(NPC_WHISKER, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0))
@@ -1282,11 +1282,7 @@ enum eCrusade_recruit
QUEST_TROLL_PATROL_INTESTINAL_FORTITUDE = 12509,
- GOSSIP_CRUSADE_TEXT = 13069,
-
- SAY_RECRUIT_1 = -1571036,
- SAY_RECRUIT_2 = -1571037,
- SAY_RECRUIT_3 = -1571038
+ GOSSIP_CRUSADE_TEXT = 13069
};
#define GOSSIP_ITEM_1 "Get out there and make those Scourge wish they were never reborn!"
@@ -1325,7 +1321,7 @@ public:
// say random text
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
- DoScriptText(RAND(SAY_RECRUIT_1, SAY_RECRUIT_2, SAY_RECRUIT_3), me);
+ Talk(SAY_RECRUIT);
m_uiTimer = 3000;
m_uiPhase = 2;
break;
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp
index 2e911406979..2e911406979 100755..100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPEP.h b/src/server/scripts/OutdoorPvP/OutdoorPvPEP.h
index 14712e0150d..14712e0150d 100755..100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPEP.h
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPEP.h
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp
index a4b506e9271..a4b506e9271 100755..100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.h b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.h
index 59bce7be298..59bce7be298 100755..100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.h
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.h
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp
index abf807327e3..abf807327e3 100755..100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h
index ace68034dfc..ace68034dfc 100755..100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp
index 9411bd8a363..9411bd8a363 100755..100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.h b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.h
index c4975d142f0..c4975d142f0 100755..100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.h
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.h
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp
index fdf6533a64b..fdf6533a64b 100755..100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.h b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.h
index dfab6d12cb8..dfab6d12cb8 100755..100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.h
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.h
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp
index 6644dd3f47f..6644dd3f47f 100755..100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h
index 8d2124a3791..8d2124a3791 100755..100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h
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 a8b4b1797cb..5739aa49549 100644
--- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp
+++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp
@@ -126,30 +126,23 @@ public:
};
-#define SAY_INTRO -1558000
-#define SAY_SUMMON -1558001
-
-#define SAY_AGGRO_1 -1558002
-#define SAY_AGGRO_2 -1558003
-#define SAY_AGGRO_3 -1558004
-
-#define SAY_ROAR -1558005
-#define SAY_SOUL_CLEAVE -1558006
-
-#define SAY_SLAY_1 -1558007
-#define SAY_SLAY_2 -1558008
-
-#define SAY_DEATH -1558009
-
-#define SPELL_RIBBON_OF_SOULS 32422
-#define SPELL_SOUL_SCREAM 32421
-
-#define SPELL_STOLEN_SOUL 32346
-#define SPELL_STOLEN_SOUL_VISUAL 32395
-
-#define SPELL_SUMMON_AVATAR 32424
-
-#define ENTRY_STOLEN_SOUL 18441
+enum ExarchMaladaar
+{
+ SAY_INTRO = 0,
+ SAY_SUMMON = 1,
+ SAY_AGGRO = 2,
+ SAY_ROAR = 3,
+ SAY_SLAY = 4,
+ SAY_DEATH = 5,
+
+ SPELL_RIBBON_OF_SOULS = 32422,
+ SPELL_SOUL_SCREAM = 32421,
+ SPELL_STOLEN_SOUL = 32346,
+ SPELL_STOLEN_SOUL_VISUAL = 32395,
+ SPELL_SUMMON_AVATAR = 32424,
+
+ ENTRY_STOLEN_SOUL = 18441
+};
class boss_exarch_maladaar : public CreatureScript
{
@@ -196,7 +189,7 @@ public:
{
if (!HasTaunted && me->IsWithinDistInMap(who, 150.0f))
{
- DoScriptText(SAY_INTRO, me);
+ Talk(SAY_INTRO);
HasTaunted = true;
}
@@ -205,7 +198,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me);
+ Talk(SAY_AGGRO);
}
void JustSummoned(Creature* summoned)
@@ -231,12 +224,12 @@ public:
if (rand()%2)
return;
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
//When Exarch Maladar is defeated D'ore appear.
me->SummonCreature(19412, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 600000);
}
@@ -251,7 +244,7 @@ public:
if (me->IsNonMeleeSpellCasted(false))
me->InterruptNonMeleeSpells(true);
- DoScriptText(SAY_SUMMON, me);
+ Talk(SAY_SUMMON);
DoCast(me, SPELL_SUMMON_AVATAR);
Avatar_summoned = true;
@@ -267,11 +260,7 @@ public:
if (me->IsNonMeleeSpellCasted(false))
me->InterruptNonMeleeSpells(true);
- uint32 i = urand(1, 2);
- if (i == 1)
- DoScriptText(SAY_ROAR, me);
- else
- DoScriptText(SAY_SOUL_CLEAVE, me);
+ Talk(SAY_ROAR);
soulmodel = target->GetDisplayId();
soulholder = target->GetGUID();
diff --git a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp
index 351f30c926f..f7a2eb87d67 100644
--- a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp
@@ -33,14 +33,11 @@ EndContentData */
enum ePrince
{
- SAY_INTRO = -1557000,
- SAY_AGGRO_1 = -1557001,
- SAY_AGGRO_2 = -1557002,
- SAY_AGGRO_3 = -1557003,
- SAY_SLAY_1 = -1557004,
- SAY_SLAY_2 = -1557005,
- SAY_SUMMON = -1557006,
- SAY_DEAD = -1557007,
+ SAY_INTRO = 0,
+ SAY_AGGRO = 1,
+ SAY_SLAY = 2,
+ SAY_SUMMON = 3,
+ SAY_DEAD = 4,
SPELL_BLINK = 34605,
SPELL_FROSTBOLT = 32364,
@@ -110,14 +107,14 @@ public:
{
if (!HasTaunted && who->GetTypeId() == TYPEID_PLAYER && me->IsWithinDistInMap(who, 100.0f))
{
- DoScriptText(SAY_INTRO, me);
+ Talk(SAY_INTRO);
HasTaunted = true;
}
}
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me);
+ Talk(SAY_AGGRO);
DoZoneInCombat();
summons.DoZoneInCombat();
@@ -143,12 +140,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEAD, me);
+ Talk(SAY_DEAD);
summons.DespawnAll();
}
@@ -203,7 +200,7 @@ public:
me->InterruptNonMeleeSpells(true);
if (!urand(0, 3))
- DoScriptText(SAY_SUMMON, me);
+ Talk(SAY_SUMMON);
DoCast(me, SPELL_ETHEREAL_BEACON, true);
diff --git a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp
index 459ba3a8f86..f174091311b 100644
--- a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp
@@ -26,21 +26,19 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
-#define SAY_AGGRO_1 -1557008
-#define SAY_AGGRO_2 -1557009
-#define SAY_AGGRO_3 -1557010
-
-#define SAY_KILL_1 -1557011
-#define SAY_KILL_2 -1557012
-
-#define SAY_DEATH -1557013
-
-#define EMOTE_DARK_SHELL -1557014
+enum Pandemonius
+{
+ SAY_AGGRO = 0,
+ SAY_KILL = 1,
+ SAY_DEATH = 2,
+ EMOTE_DARK_SHELL = 3,
+
+ SPELL_VOID_BLAST = 32325,
+ H_SPELL_VOID_BLAST = 38760,
+ SPELL_DARK_SHELL = 32358,
+ H_SPELL_DARK_SHELL = 38759
+};
-#define SPELL_VOID_BLAST 32325
-#define H_SPELL_VOID_BLAST 38760
-#define SPELL_DARK_SHELL 32358
-#define H_SPELL_DARK_SHELL 38759
class boss_pandemonius : public CreatureScript
{
@@ -71,17 +69,17 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2), me);
+ Talk(SAY_KILL);
}
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me);
+ Talk(SAY_AGGRO);
}
void UpdateAI(const uint32 diff)
@@ -112,7 +110,7 @@ public:
if (me->IsNonMeleeSpellCasted(false))
me->InterruptNonMeleeSpells(true);
- DoScriptText(EMOTE_DARK_SHELL, me);
+ Talk(EMOTE_DARK_SHELL);
DoCast(me, SPELL_DARK_SHELL);
DarkShell_Timer = 20000;
diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp
index 0a85cf1dc5b..5bb396965a6 100644
--- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp
+++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp
@@ -26,28 +26,25 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
-#define SAY_SUMMON -1556000
-
-#define SAY_AGGRO_1 -1556001
-#define SAY_AGGRO_2 -1556002
-#define SAY_AGGRO_3 -1556003
-
-#define SAY_SLAY_1 -1556004
-#define SAY_SLAY_2 -1556005
-
-#define SAY_DEATH -1556006
-
-#define SPELL_FROST_SHOCK 21401 //37865
-#define SPELL_FLAME_SHOCK 34354
-#define SPELL_SHADOW_SHOCK 30138
-#define SPELL_ARCANE_SHOCK 37132
-
-#define SPELL_CHAIN_LIGHTNING 15659 //15305
-
-#define SPELL_SUMMON_SYTH_FIRE 33537 // Spawns 19203
-#define SPELL_SUMMON_SYTH_ARCANE 33538 // Spawns 19205
-#define SPELL_SUMMON_SYTH_FROST 33539 // Spawns 19204
-#define SPELL_SUMMON_SYTH_SHADOW 33540 // Spawns 19206
+enum DarkweaverSyth
+{
+ SAY_SUMMON = 0,
+ SAY_AGGRO = 1,
+ SAY_SLAY = 2,
+ SAY_DEATH = 3,
+
+ SPELL_FROST_SHOCK = 21401, //37865
+ SPELL_FLAME_SHOCK = 34354,
+ SPELL_SHADOW_SHOCK = 30138,
+ SPELL_ARCANE_SHOCK = 37132,
+
+ SPELL_CHAIN_LIGHTNING = 15659, //15305
+
+ SPELL_SUMMON_SYTH_FIRE = 33537, // Spawns 19203
+ SPELL_SUMMON_SYTH_ARCANE = 33538, // Spawns 19205
+ SPELL_SUMMON_SYTH_FROST = 33539, // Spawns 19204
+ SPELL_SUMMON_SYTH_SHADOW = 33540 // Spawns 19206
+};
#define SPELL_FLAME_BUFFET DUNGEON_MODE(33526, 38141)
#define SPELL_ARCANE_BUFFET DUNGEON_MODE(33527, 38138)
@@ -95,12 +92,12 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me);
+ Talk(SAY_AGGRO);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void KilledUnit(Unit* /*victim*/)
@@ -108,7 +105,7 @@ public:
if (rand()%2)
return;
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
void JustSummoned(Creature* summoned)
@@ -119,7 +116,7 @@ public:
void SythSummoning()
{
- DoScriptText(SAY_SUMMON, me);
+ Talk(SAY_SUMMON);
if (me->IsNonMeleeSpellCasted(false))
me->InterruptNonMeleeSpells(false);
diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp
index ec35d6c80b3..07169f031ab 100644
--- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp
+++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp
@@ -27,31 +27,26 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "sethekk_halls.h"
-#define SAY_INTRO -1556007
-
-#define SAY_AGGRO_1 -1556008
-#define SAY_AGGRO_2 -1556009
-#define SAY_AGGRO_3 -1556010
-
-#define SAY_SLAY_1 -1556011
-#define SAY_SLAY_2 -1556012
-#define SAY_DEATH -1556013
-#define EMOTE_ARCANE_EXP -1556015
-
-#define SPELL_BLINK 38194
-#define SPELL_BLINK_TELEPORT 38203
-#define SPELL_MANA_SHIELD 38151
-#define SPELL_ARCANE_BUBBLE 9438
-#define H_SPELL_SLOW 35032
-
-#define SPELL_POLYMORPH 38245
-#define H_SPELL_POLYMORPH 43309
-
-#define SPELL_ARCANE_VOLLEY 35059
-#define H_SPELL_ARCANE_VOLLEY 40424
-
-#define SPELL_ARCANE_EXPLOSION 38197
-#define H_SPELL_ARCANE_EXPLOSION 40425
+enum TailonkingIkiss
+{
+ SAY_INTRO = 0,
+ SAY_AGGRO = 1,
+ SAY_SLAY = 2,
+ SAY_DEATH = 3,
+ EMOTE_ARCANE_EXP = 4,
+
+ SPELL_BLINK = 38194,
+ SPELL_BLINK_TELEPORT = 38203,
+ SPELL_MANA_SHIELD = 38151,
+ SPELL_ARCANE_BUBBLE = 9438,
+ H_SPELL_SLOW = 35032,
+ SPELL_POLYMORPH = 38245,
+ H_SPELL_POLYMORPH = 43309,
+ SPELL_ARCANE_VOLLEY = 35059,
+ H_SPELL_ARCANE_VOLLEY = 40424,
+ SPELL_ARCANE_EXPLOSION = 38197,
+ H_SPELL_ARCANE_EXPLOSION = 40425
+};
class boss_talon_king_ikiss : public CreatureScript
{
@@ -99,7 +94,7 @@ public:
if (!Intro && me->IsWithinDistInMap(who, 100))
{
Intro = true;
- DoScriptText(SAY_INTRO, me);
+ Talk(SAY_INTRO);
}
if (!me->CanFly() && me->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE)
@@ -116,12 +111,12 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me);
+ Talk(SAY_AGGRO);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_IKISSDOOREVENT, DONE);
@@ -129,7 +124,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
void UpdateAI(const uint32 diff)
@@ -183,7 +178,7 @@ public:
if (Blink_Timer <= diff)
{
- DoScriptText(EMOTE_ARCANE_EXP, me);
+ Talk(EMOTE_ARCANE_EXP);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp
index a109e3738b1..c93143c1c5c 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp
@@ -30,14 +30,11 @@ EndScriptData */
enum eEnums
{
- SAY_INTRO = -1555000,
- SAY_AGGRO1 = -1555001,
- SAY_AGGRO2 = -1555002,
- SAY_AGGRO3 = -1555003,
- SAY_HELP = -1555004,
- SAY_SLAY1 = -1555005,
- SAY_SLAY2 = -1555006,
- SAY_DEATH = -1555007,
+ SAY_INTRO = 0,
+ SAY_AGGRO = 1,
+ SAY_HELP = 2,
+ SAY_SLAY = 3,
+ SAY_DEATH = 4,
SPELL_BANISH = 30231,
SPELL_CORROSIVE_ACID = 33551,
@@ -119,7 +116,7 @@ public:
{
if (instance->GetData(TYPE_HELLMAW) != FAIL)
{
- DoScriptText(SAY_INTRO, me);
+ Talk(SAY_INTRO);
Start(true, false, 0, NULL, false, true);
}
@@ -129,17 +126,17 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO1, SAY_AGGRO2, SAY_AGGRO3), me);
+ Talk(SAY_AGGRO);
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(TYPE_HELLMAW, DONE);
diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp
index e7063e479ee..eb06cce87fc 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp
@@ -27,33 +27,26 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "shadow_labyrinth.h"
-#define SPELL_INCITE_CHAOS 33676
-#define SPELL_INCITE_CHAOS_B 33684 //debuff applied to each member of party
-#define SPELL_CHARGE 33709
-#define SPELL_WAR_STOMP 33707
-
-#define SAY_INTRO1 -1555008 //not used
-#define SAY_INTRO2 -1555009 //not used
-#define SAY_INTRO3 -1555010 //not used
-#define SAY_AGGRO1 -1555011
-#define SAY_AGGRO2 -1555012
-#define SAY_AGGRO3 -1555013
-#define SAY_SLAY1 -1555014
-#define SAY_SLAY2 -1555015
-#define SAY_HELP -1555016 //not used
-#define SAY_DEATH -1555017
-
-//below, not used
-#define SAY2_INTRO1 -1555018
-#define SAY2_INTRO2 -1555019
-#define SAY2_INTRO3 -1555020
-#define SAY2_AGGRO1 -1555021
-#define SAY2_AGGRO2 -1555022
-#define SAY2_AGGRO3 -1555023
-#define SAY2_SLAY1 -1555024
-#define SAY2_SLAY2 -1555025
-#define SAY2_HELP -1555026
-#define SAY2_DEATH -1555027
+enum BlackheartTheInciter
+{
+ SPELL_INCITE_CHAOS = 33676,
+ SPELL_INCITE_CHAOS_B = 33684, //debuff applied to each member of party
+ SPELL_CHARGE = 33709,
+ SPELL_WAR_STOMP = 33707,
+
+ SAY_INTRO = 0,
+ SAY_AGGRO = 1,
+ SAY_SLAY = 2,
+ SAY_HELP = 3,
+ SAY_DEATH = 4,
+
+ //below, not used
+ SAY2_INTRO = 5,
+ SAY2_AGGRO = 6,
+ SAY2_SLAY = 7,
+ SAY2_HELP = 8,
+ SAY2_DEATH = 9
+};
class boss_blackheart_the_inciter : public CreatureScript
{
@@ -94,12 +87,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_BLACKHEARTTHEINCITEREVENT, DONE);
@@ -107,7 +100,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO1, SAY_AGGRO2, SAY_AGGRO3), me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_BLACKHEARTTHEINCITEREVENT, IN_PROGRESS);
diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp
index 303a30bea8f..d7dbb8ef722 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp
@@ -28,30 +28,30 @@ EndScriptData */
#include "shadow_labyrinth.h"
#include "Player.h"
-#define SAY_INTRO -1555028
-#define SAY_AGGRO1 -1555029
-#define SAY_AGGRO2 -1555030
-#define SAY_AGGRO3 -1555031
-#define SAY_HELP -1555032
-#define SAY_SLAY1 -1555033
-#define SAY_SLAY2 -1555034
-#define SAY_DEATH -1555035
-
-#define SPELL_RAIN_OF_FIRE 33617
-#define H_SPELL_RAIN_OF_FIRE 39363
-
-#define SPELL_DRAW_SHADOWS 33563
-#define SPELL_SHADOWBOLT_VOLLEY 33841
-#define SPELL_BANISH 38791
-
-#define MOB_VOID_TRAVELER 19226
-#define SPELL_SACRIFICE 33587
-#define SPELL_SHADOW_NOVA 33846
-#define SPELL_EMPOWERING_SHADOWS 33783
-#define H_SPELL_EMPOWERING_SHADOWS 39364
-
-#define MOB_VOID_PORTAL 19224
-#define SPELL_VOID_PORTAL_VISUAL 33569
+enum GrandmasterVorpil
+{
+ SAY_INTRO = 0,
+ SAY_AGGRO = 1,
+ SAY_HELP = 2,
+ SAY_SLAY = 3,
+ SAY_DEATH = 4,
+
+ SPELL_RAIN_OF_FIRE = 33617,
+ H_SPELL_RAIN_OF_FIRE = 39363,
+
+ SPELL_DRAW_SHADOWS = 33563,
+ SPELL_SHADOWBOLT_VOLLEY = 33841,
+ SPELL_BANISH = 38791,
+
+ MOB_VOID_TRAVELER = 19226,
+ SPELL_SACRIFICE = 33587,
+ SPELL_SHADOW_NOVA = 33846,
+ SPELL_EMPOWERING_SHADOWS = 33783,
+ H_SPELL_EMPOWERING_SHADOWS = 39364,
+
+ MOB_VOID_PORTAL = 19224,
+ SPELL_VOID_PORTAL_VISUAL = 33569
+};
float VorpilPosition[3] = {-252.8820f, -264.3030f, 17.1f};
@@ -219,7 +219,7 @@ public:
me->SummonCreature(MOB_VOID_TRAVELER, VoidPortalCoords[pos][0], VoidPortalCoords[pos][1], VoidPortalCoords[pos][2], 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000);
if (!HelpYell)
{
- DoScriptText(SAY_HELP, me);
+ Talk(SAY_HELP);
HelpYell = true;
}
}
@@ -232,12 +232,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
destroyPortals();
if (instance)
@@ -246,7 +246,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO1, SAY_AGGRO2, SAY_AGGRO3), me);
+ Talk(SAY_AGGRO);
summonPortals();
if (instance)
@@ -259,7 +259,7 @@ public:
if (!Intro && me->IsWithinLOSInMap(who)&& me->IsWithinDistInMap(who, 100) && me->IsValidAttackTarget(who))
{
- DoScriptText(SAY_INTRO, me);
+ Talk(SAY_INTRO);
Intro = true;
}
}
diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp
index 1503c9f7234..9ca9f7d089c 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp
@@ -28,15 +28,20 @@ EndScriptData */
#include "shadow_labyrinth.h"
#include "SpellInfo.h"
-#define EMOTE_SONIC_BOOM -1555036
+enum Murmur
+{
+ SPELL_RESONANCE = 33657,
+ SPELL_MAGNETIC_PULL = 33689,
+ SPELL_SONIC_SHOCK = 38797,
+ SPELL_THUNDERING_STORM = 39365,
+ EMOTE_SONIC_BOOM = 0
+};
#define SPELL_SONIC_BOOM_CAST DUNGEON_MODE(33923, 38796)
#define SPELL_SONIC_BOOM_EFFECT DUNGEON_MODE(33666, 38795)
-#define SPELL_RESONANCE 33657
+
#define SPELL_MURMURS_TOUCH DUNGEON_MODE(33711, 38794)
-#define SPELL_MAGNETIC_PULL 33689
-#define SPELL_SONIC_SHOCK 38797
-#define SPELL_THUNDERING_STORM 39365
+
class boss_murmur : public CreatureScript
{
@@ -123,7 +128,7 @@ public:
}
if (SonicBoom_Timer <= diff)
{
- DoScriptText(EMOTE_SONIC_BOOM, me);
+ Talk(EMOTE_SONIC_BOOM);
DoCast(me, SPELL_SONIC_BOOM_CAST);
SonicBoom_Timer = 30000;
SonicBoom = true;
diff --git a/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp b/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp
index fd775df3392..427c23bafa6 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp
@@ -27,32 +27,33 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "black_temple.h"
-//Speech'n'Sound
-#define SAY_AGGRO -1564029
-#define SAY_SLAY1 -1564030
-#define SAY_SLAY2 -1564031
-#define SAY_SPECIAL1 -1564032
-#define SAY_SPECIAL2 -1564033
-#define SAY_ENRAGE1 -1564034
-#define SAY_ENRAGE2 -1564035
-#define SAY_DEATH -1564036
-
-//Spells
-#define SPELL_ACID_GEYSER 40630
-#define SPELL_ACIDIC_WOUND 40481
-#define SPELL_ARCING_SMASH 40599
-#define SPELL_BLOODBOIL 42005 // This spell is AoE whereas it shouldn't be
-#define SPELL_FEL_ACID 40508
-#define SPELL_FEL_RAGE_SELF 40594
-#define SPELL_FEL_RAGE_TARGET 40604
-#define SPELL_FEL_RAGE_2 40616
-#define SPELL_FEL_RAGE_3 41625
-#define SPELL_BEWILDERING_STRIKE 40491
-#define SPELL_EJECT1 40486 // 1000 Physical damage + knockback + script effect (should handle threat reduction I think)
-#define SPELL_EJECT2 40597 // 1000 Physical damage + Stun (used in phase 2?)
-#define SPELL_TAUNT_GURTOGG 40603
-#define SPELL_INSIGNIFIGANCE 40618
-#define SPELL_BERSERK 45078
+enum Bloodboil
+{
+ //Speech'n'Sound
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_SPECIAL = 2,
+ SAY_ENRAGE = 3,
+ SAY_DEATH = 4,
+
+ //Spells
+ SPELL_ACID_GEYSER = 40630,
+ SPELL_ACIDIC_WOUND = 40481,
+ SPELL_ARCING_SMASH = 40599,
+ SPELL_BLOODBOIL = 42005, // This spell is AoE whereas it shouldn't be
+ SPELL_FEL_ACID = 40508,
+ SPELL_FEL_RAGE_SELF = 40594,
+ SPELL_FEL_RAGE_TARGET = 40604,
+ SPELL_FEL_RAGE_2 = 40616,
+ SPELL_FEL_RAGE_3 = 41625,
+ SPELL_BEWILDERING_STRIKE = 40491,
+ SPELL_EJECT1 = 40486, // 1000 Physical damage + knockback + script effect (should handle threat reduction I think)
+ SPELL_EJECT2 = 40597, // 1000 Physical damage + Stun (used in phase 2?)
+ SPELL_TAUNT_GURTOGG = 40603,
+ SPELL_INSIGNIFIGANCE = 40618,
+ SPELL_BERSERK = 45078
+};
+
//This is used to sort the players by distance in preparation for the Bloodboil cast.
@@ -121,14 +122,14 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoZoneInCombat();
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_GURTOGGBLOODBOILEVENT, IN_PROGRESS);
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
@@ -136,7 +137,7 @@ public:
if (instance)
instance->SetData(DATA_GURTOGGBLOODBOILEVENT, DONE);
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
// Note: This seems like a very complicated fix. The fix needs to be handled by the core, as implementation of limited-target AoE spells are still not limited.
@@ -219,7 +220,7 @@ public:
if (EnrageTimer <= diff)
{
DoCast(me, SPELL_BERSERK);
- DoScriptText(RAND(SAY_ENRAGE1, SAY_ENRAGE2), me);
+ Talk(SAY_ENRAGE);
} else EnrageTimer -= diff;
}
@@ -302,7 +303,7 @@ public:
//Cast this without triggered so that it appears in combat logs and shows visual.
DoCast(me, SPELL_FEL_RAGE_SELF);
- DoScriptText(RAND(SAY_SPECIAL1, SAY_SPECIAL2), me);
+ Talk(SAY_SPECIAL);
AcidGeyserTimer = 1000;
PhaseChangeTimer = 30000;
diff --git a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp
index ec25a8f9f60..88e7c063c69 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp
@@ -27,31 +27,29 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "black_temple.h"
-//Speech'n'Sounds
-#define SAY_TAUNT1 -1564018
-#define SAY_TAUNT2 -1564019
-#define SAY_TAUNT3 -1564020
-#define SAY_AGGRO -1564021
-#define SAY_SPELL1 -1564022
-#define SAY_SPELL2 -1564023
-#define SAY_SPELL3 -1564024
-#define SAY_SLAY1 -1564025
-#define SAY_SLAY2 -1564026
-#define SAY_ENRAGE -1564027
-#define SAY_DEATH -1564028
-
-//Spells
-#define SPELL_BEAM_SINISTER 40859
-#define SPELL_BEAM_VILE 40860
-#define SPELL_BEAM_WICKED 40861
-#define SPELL_BEAM_SINFUL 40827
-#define SPELL_ATTRACTION 40871
-#define SPELL_SILENCING_SHRIEK 40823
-#define SPELL_ENRAGE 23537
-#define SPELL_SABER_LASH 40810//43267
-#define SPELL_SABER_LASH_IMM 43690
-#define SPELL_TELEPORT_VISUAL 40869
-#define SPELL_BERSERK 45078
+enum MotherShahraz
+{
+ //Speech'n'Sounds
+ SAY_TAUNT = 0,
+ SAY_AGGRO = 1,
+ SAY_SPELL = 2,
+ SAY_SLAY = 3,
+ SAY_ENRAGE = 4,
+ SAY_DEATH = 5,
+
+ //Spells
+ SPELL_BEAM_SINISTER = 40859,
+ SPELL_BEAM_VILE = 40860,
+ SPELL_BEAM_WICKED = 40861,
+ SPELL_BEAM_SINFUL = 40827,
+ SPELL_ATTRACTION = 40871,
+ SPELL_SILENCING_SHRIEK = 40823,
+ SPELL_ENRAGE = 23537,
+ SPELL_SABER_LASH = 40810,//43267
+ SPELL_SABER_LASH_IMM = 43690,
+ SPELL_TELEPORT_VISUAL = 40869,
+ SPELL_BERSERK = 45078
+};
uint32 PrismaticAuras[]=
{
@@ -142,12 +140,12 @@ public:
instance->SetData(DATA_MOTHERSHAHRAZEVENT, IN_PROGRESS);
DoZoneInCombat();
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
@@ -155,7 +153,7 @@ public:
if (instance)
instance->SetData(DATA_MOTHERSHAHRAZEVENT, DONE);
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void TeleportPlayers()
@@ -185,7 +183,7 @@ public:
{
Enraged = true;
DoCast(me, SPELL_ENRAGE, true);
- DoScriptText(SAY_ENRAGE, me);
+ Talk(SAY_ENRAGE);
}
//Randomly cast one beam.
@@ -236,7 +234,7 @@ public:
TeleportPlayers();
- DoScriptText(RAND(SAY_SPELL2, SAY_SPELL3), me);
+ Talk(SAY_SPELL);
FatalAttractionExplodeTimer = 2000;
FatalAttractionTimer = urand(40, 71) * 1000;
} else FatalAttractionTimer -= diff;
@@ -284,14 +282,14 @@ public:
if (EnrageTimer <= diff)
{
DoCast(me, SPELL_BERSERK);
- DoScriptText(SAY_ENRAGE, me);
+ Talk(SAY_ENRAGE);
} else EnrageTimer -= diff;
}
//Random taunts
if (RandomYellTimer <= diff)
{
- DoScriptText(RAND(SAY_TAUNT1, SAY_TAUNT2, SAY_TAUNT3), me);
+ Talk(SAY_TAUNT);
RandomYellTimer = urand(60, 151) * 1000;
} else RandomYellTimer -= diff;
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 5ab9dcab667..00ea405e109 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp
@@ -28,64 +28,61 @@ EndScriptData */
#include "black_temple.h"
#include "Spell.h"
-//Sound'n'speech
-//Suffering
-#define SUFF_SAY_FREED -1564047
-#define SUFF_SAY_AGGRO -1564048
-#define SUFF_SAY_SLAY1 -1564049
-#define SUFF_SAY_SLAY2 -1564050
-#define SUFF_SAY_SLAY3 -1564051
-#define SUFF_SAY_RECAP -1564052
-#define SUFF_SAY_AFTER -1564053
-#define SUFF_EMOTE_ENRAGE -1564054
-
-//Desire
-#define DESI_SAY_FREED -1564055
-#define DESI_SAY_SLAY1 -1564056
-#define DESI_SAY_SLAY2 -1564057
-#define DESI_SAY_SLAY3 -1564058
-#define DESI_SAY_SPEC -1564059
-#define DESI_SAY_RECAP -1564060
-#define DESI_SAY_AFTER -1564061
-
-//Anger
-#define ANGER_SAY_FREED -1564062
-#define ANGER_SAY_FREED2 -1564063
-#define ANGER_SAY_SLAY1 -1564064
-#define ANGER_SAY_SLAY2 -1564065
-#define ANGER_SAY_SPEC -1564066
-#define ANGER_SAY_BEFORE -1564067
-#define ANGER_SAY_DEATH -1564068
-
-//Spells
-#define AURA_OF_SUFFERING 41292
-#define AURA_OF_SUFFERING_ARMOR 42017 // linked aura, need core support
-#define ESSENCE_OF_SUFFERING_PASSIVE 41296 // periodic trigger 41294
-#define ESSENCE_OF_SUFFERING_PASSIVE2 41623
-#define SPELL_FIXATE_TARGET 41294 // dummy, select target
-#define SPELL_FIXATE_TAUNT 41295 // force taunt
-#define SPELL_ENRAGE 41305
-#define SPELL_SOUL_DRAIN 41303
-
-#define AURA_OF_DESIRE 41350
-#define AURA_OF_DESIRE_DAMAGE 41352
-#define SPELL_RUNE_SHIELD 41431
-#define SPELL_DEADEN 41410
-#define SPELL_SOUL_SHOCK 41426
-
-#define AURA_OF_ANGER 41337
-#define SPELL_SELF_SEETHE 41364 // force cast 41520
-#define SPELL_ENEMY_SEETHE 41520
-#define SPELL_SOUL_SCREAM 41545
-#define SPELL_SPITE_TARGET 41376 // cast 41377 after 6 sec
-#define SPELL_SPITE_DAMAGE 41377
-
-#define ENSLAVED_SOUL_PASSIVE 41535
-#define SPELL_SOUL_RELEASE 41542
-#define SPELL_SUBMERGE 37550 //dropout 'head'
-
-#define CREATURE_ENSLAVED_SOUL 23469
-#define NUMBER_ENSLAVED_SOUL 8
+enum ReliquaryOfSouls
+{
+ //Sound'n'speech
+ //Suffering
+ SUFF_SAY_FREED = 0,
+ SUFF_SAY_AGGRO = 1,
+ SUFF_SAY_SLAY = 2,
+ SUFF_SAY_RECAP = 3,
+ SUFF_SAY_AFTER = 4,
+ SUFF_EMOTE_ENRAGE = 5,
+
+ //Desire
+ DESI_SAY_FREED = 0,
+ DESI_SAY_SLAY = 1,
+ DESI_SAY_SPEC = 2,
+ DESI_SAY_RECAP = 3,
+ DESI_SAY_AFTER = 4,
+
+ //Anger
+ ANGER_SAY_FREED = 0,
+ ANGER_SAY_SLAY = 1,
+ ANGER_SAY_SPEC = 2,
+ ANGER_SAY_BEFORE = 3,
+ ANGER_SAY_DEATH = 4,
+
+ //Spells
+ AURA_OF_SUFFERING = 41292,
+ AURA_OF_SUFFERING_ARMOR = 42017, // linked aura, need core support
+ ESSENCE_OF_SUFFERING_PASSIVE = 41296, // periodic trigger 41294
+ ESSENCE_OF_SUFFERING_PASSIVE2 = 41623,
+ SPELL_FIXATE_TARGET = 41294, // dummy, select target
+ SPELL_FIXATE_TAUNT = 41295, // force taunt
+ SPELL_ENRAGE = 41305,
+ SPELL_SOUL_DRAIN = 41303,
+
+ AURA_OF_DESIRE = 41350,
+ AURA_OF_DESIRE_DAMAGE = 41352,
+ SPELL_RUNE_SHIELD = 41431,
+ SPELL_DEADEN = 41410,
+ SPELL_SOUL_SHOCK = 41426,
+
+ AURA_OF_ANGER = 41337,
+ SPELL_SELF_SEETHE = 41364, // force cast 41520
+ SPELL_ENEMY_SEETHE = 41520,
+ SPELL_SOUL_SCREAM = 41545,
+ SPELL_SPITE_TARGET = 41376, // cast 41377 after 6 sec
+ SPELL_SPITE_DAMAGE = 41377,
+
+ ENSLAVED_SOUL_PASSIVE = 41535,
+ SPELL_SOUL_RELEASE = 41542,
+ SPELL_SUBMERGE = 37550, //dropout 'head'
+
+ CREATURE_ENSLAVED_SOUL = 23469,
+ NUMBER_ENSLAVED_SOUL = 8
+};
struct Position2d
{
@@ -337,11 +334,11 @@ public:
case 5:
if (Phase == 1)
{
- DoScriptText(SUFF_SAY_AFTER, Essence);
+ Essence->AI()->Talk(SUFF_SAY_AFTER);
}
else
{
- DoScriptText(DESI_SAY_AFTER, Essence);
+ Essence->AI()->Talk(DESI_SAY_AFTER);
}
Essence->DespawnOrUnsummon();
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);
@@ -425,7 +422,7 @@ public:
damage = 0;
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->Yell(SUFF_SAY_RECAP, LANG_UNIVERSAL, 0);
- DoScriptText(SUFF_SAY_RECAP, me);
+ Talk(SUFF_SAY_RECAP);
me->SetReactState(REACT_PASSIVE);
}
}
@@ -434,7 +431,7 @@ public:
{
if (!me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE))
{
- DoScriptText(SUFF_SAY_FREED, me);
+ Talk(SUFF_SAY_FREED);
DoZoneInCombat();
DoCast(me, AURA_OF_SUFFERING, true); // linked aura need core support
DoCast(me, ESSENCE_OF_SUFFERING_PASSIVE, true);
@@ -445,7 +442,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SUFF_SAY_SLAY1, SUFF_SAY_SLAY2, SUFF_SAY_SLAY3), me);
+ Talk(SUFF_SAY_SLAY);
}
void CastFixate()
@@ -483,7 +480,7 @@ public:
FixateTimer = 5000;
if (!(rand()%16))
{
- DoScriptText(SUFF_SAY_AGGRO, me);
+ Talk(SUFF_SAY_AGGRO);
}
} else FixateTimer -= diff;
}
@@ -496,7 +493,7 @@ public:
{
DoCast(me, SPELL_ENRAGE);
EnrageTimer = 60000;
- DoScriptText(SUFF_EMOTE_ENRAGE, me);
+ Talk(SUFF_EMOTE_ENRAGE);
} else EnrageTimer -= diff;
if (SoulDrainTimer <= diff)
@@ -545,7 +542,7 @@ public:
{
damage = 0;
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- DoScriptText(SUFF_SAY_RECAP, me);
+ Talk(SUFF_SAY_RECAP);
me->SetReactState(REACT_PASSIVE);
}
else
@@ -567,14 +564,14 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(DESI_SAY_FREED, me);
+ Talk(DESI_SAY_FREED);
DoZoneInCombat();
DoCast(me, AURA_OF_DESIRE, true);
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(DESI_SAY_SLAY1, DESI_SAY_SLAY2, DESI_SAY_SLAY3), me);
+ Talk(DESI_SAY_SLAY);
}
void UpdateAI(const uint32 diff)
@@ -604,7 +601,7 @@ public:
DeadenTimer = urand(25000, 35000);
if (!(rand()%2))
{
- DoScriptText(DESI_SAY_SPEC, me);
+ Talk(DESI_SAY_SPEC);
}
} else DeadenTimer -= diff;
@@ -652,7 +649,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(ANGER_SAY_FREED, ANGER_SAY_FREED2), me);
+ Talk(ANGER_SAY_FREED);
DoZoneInCombat();
DoCast(me, AURA_OF_ANGER, true);
@@ -660,12 +657,12 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(ANGER_SAY_DEATH, me);
+ Talk(ANGER_SAY_DEATH);
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(ANGER_SAY_SLAY1, ANGER_SAY_SLAY2), me);
+ Talk(ANGER_SAY_SLAY);
}
void UpdateAI(const uint32 diff)
@@ -684,7 +681,7 @@ public:
{
if (me->getVictim()->GetGUID() != AggroTargetGUID)
{
- DoScriptText(ANGER_SAY_BEFORE, me);
+ Talk(ANGER_SAY_BEFORE);
DoCast(me, SPELL_SELF_SEETHE, true);
AggroTargetGUID = me->getVictim()->GetGUID();
}
@@ -697,7 +694,7 @@ public:
SoulScreamTimer = urand(9000, 11000);
if (!(rand()%3))
{
- DoScriptText(ANGER_SAY_SPEC, me);
+ Talk(ANGER_SAY_SPEC);
}
} else SoulScreamTimer -= diff;
@@ -705,7 +702,7 @@ public:
{
DoCast(me, SPELL_SPITE_TARGET);
SpiteTimer = 30000;
- DoScriptText(ANGER_SAY_SPEC, me);
+ Talk(ANGER_SAY_SPEC);
} else SpiteTimer -= diff;
DoMeleeAttackIfReady();
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 6e770249cf0..0180281cde3 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
@@ -29,12 +29,15 @@ EndScriptData */
#include "black_temple.h"
#include "Player.h"
-#define SAY_DEATH -1564013
-#define SAY_LOW_HEALTH -1564014
-// Ending cinematic text
-#define SAY_FREE -1564015
-#define SAY_BROKEN_FREE_01 -1564016
-#define SAY_BROKEN_FREE_02 -1564017
+enum ShadeOfAkama
+{
+ SAY_DEATH = 0,
+ SAY_LOW_HEALTH = 1,
+ // Ending cinematic text
+ SAY_FREE = 2,
+ SAY_BROKEN_FREE_01 = 0,
+ SAY_BROKEN_FREE_02 = 1
+};
#define GOSSIP_ITEM "We are ready to fight alongside you, Akama"
@@ -704,7 +707,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
EventBegun = false;
ShadeHasDied = false;
StartCombat = false;
@@ -729,7 +732,7 @@ public:
if (HealthBelowPct(15) && !HasYelledOnce)
{
- DoScriptText(SAY_LOW_HEALTH, me);
+ Talk(SAY_LOW_HEALTH);
HasYelledOnce = true;
}
@@ -825,7 +828,7 @@ public:
SummonBrokenTimer = 1;
break;
case 1:
- DoScriptText(SAY_FREE, me);
+ Talk(SAY_FREE);
++EndingTalkCount;
SoulRetrieveTimer = 25000;
break;
@@ -838,7 +841,7 @@ public:
{
if (!Yelled)
{
- DoScriptText(SAY_BROKEN_FREE_01, unit);
+ unit->AI()->Talk(SAY_BROKEN_FREE_01);
Yelled = true;
}
unit->HandleEmoteCommand(EMOTE_ONESHOT_KNEEL);
@@ -863,7 +866,7 @@ public:
{
for (std::list<uint64>::const_iterator itr = BrokenList.begin(); itr != BrokenList.end(); ++itr)
if (Creature* unit = Unit::GetCreature((*me), *itr))
- unit->MonsterYell(SAY_BROKEN_FREE_02, LANG_UNIVERSAL, 0);
+ unit->AI()->Talk(SAY_BROKEN_FREE_02);
}
SoulRetrieveTimer = 0;
break;
diff --git a/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp b/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp
index 77d1c86951b..388052f0a5e 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp
@@ -28,32 +28,35 @@ EndScriptData */
#include "PassiveAI.h"
#include "black_temple.h"
-#define EMOTE_NEW_TARGET -1564010
-#define EMOTE_PUNCH_GROUND -1564011 //DoScriptText(EMOTE_PUNCH_GROUND, me);
-#define EMOTE_GROUND_CRACK -1564012
-
-//Spells
-#define SPELL_MOLTEN_PUNCH 40126
-#define SPELL_HATEFUL_STRIKE 41926
-#define SPELL_MOLTEN_FLAME 40980
-#define SPELL_VOLCANIC_ERUPTION 40117
-#define SPELL_VOLCANIC_SUMMON 40276
-#define SPELL_BERSERK 45078
-
-#define CREATURE_VOLCANO 23085
-#define CREATURE_STALKER 23095
-
-#define PHASE_STRIKE 1
-#define PHASE_CHASE 2
-
-#define EVENT_BERSERK 1
-#define EVENT_SWITCH_PHASE 2
-#define EVENT_FLAME 3
-#define EVENT_VOLCANO 4
-#define EVENT_SWITCH_TARGET 5
-#define EVENT_HATEFUL_STRIKE 6
-
-#define GCD_CAST 1
+enum Supremus
+{
+ EMOTE_NEW_TARGET = 0,
+ EMOTE_PUNCH_GROUND = 1, //Talk(EMOTE_PUNCH_GROUND);
+ EMOTE_GROUND_CRACK = 2,
+
+ //Spells
+ SPELL_MOLTEN_PUNCH = 40126,
+ SPELL_HATEFUL_STRIKE = 41926,
+ SPELL_MOLTEN_FLAME = 40980,
+ SPELL_VOLCANIC_ERUPTION = 40117,
+ SPELL_VOLCANIC_SUMMON = 40276,
+ SPELL_BERSERK = 45078,
+
+ CREATURE_VOLCANO = 23085,
+ CREATURE_STALKER = 23095,
+
+ PHASE_STRIKE = 1,
+ PHASE_CHASE = 2,
+
+ EVENT_BERSERK = 1,
+ EVENT_SWITCH_PHASE = 2,
+ EVENT_FLAME = 3,
+ EVENT_VOLCANO = 4,
+ EVENT_SWITCH_TARGET = 5,
+ EVENT_HATEFUL_STRIKE = 6,
+
+ GCD_CAST = 1
+};
class molten_flame : public CreatureScript
{
@@ -230,7 +233,7 @@ public:
{
DoResetThreat();
me->AddThreat(target, 5000000.0f);
- DoScriptText(EMOTE_NEW_TARGET, me);
+ Talk(EMOTE_NEW_TARGET);
}
events.ScheduleEvent(EVENT_SWITCH_TARGET, 10000, 0, PHASE_CHASE);
break;
@@ -242,7 +245,7 @@ public:
{
//DoCast(target, SPELL_VOLCANIC_SUMMON);//movement bugged
me->SummonCreature(CREATURE_VOLCANO, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 30000);
- DoScriptText(EMOTE_GROUND_CRACK, me);
+ Talk(EMOTE_GROUND_CRACK);
events.DelayEvents(1500, GCD_CAST);
}
events.ScheduleEvent(EVENT_VOLCANO, 10000, GCD_CAST, PHASE_CHASE);
diff --git a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp
index 9a200d07d2b..ce17ac48cf5 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp
@@ -27,30 +27,29 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "black_temple.h"
- //Speech'n'sound
-#define SAY_INTRO -1564037
-#define SAY_AGGRO -1564038
-#define SAY_SLAY1 -1564039
-#define SAY_SLAY2 -1564040
-#define SAY_SPELL1 -1564041
-#define SAY_SPELL2 -1564042
-#define SAY_SPECIAL1 -1564043
-#define SAY_SPECIAL2 -1564044
-#define SAY_ENRAGE -1564045
-#define SAY_DEATH -1564046
-
-//Spells
-#define SPELL_INCINERATE 40239
-#define SPELL_CRUSHING_SHADOWS 40243
-#define SPELL_SHADOWBOLT 40185
-#define SPELL_PASSIVE_SHADOWFORM 40326
-#define SPELL_SHADOW_OF_DEATH 40251
-#define SPELL_BERSERK 45078
-
-#define SPELL_ATROPHY 40327 // Shadowy Constructs use this when they get within melee range of a player
-
-#define CREATURE_DOOM_BLOSSOM 23123
-#define CREATURE_SHADOWY_CONSTRUCT 23111
+enum DoomBlossom
+{
+ //Speech'n'sound
+ SAY_INTRO = 0,
+ SAY_AGGRO = 1,
+ SAY_SLAY = 2,
+ SAY_SPELL = 3,
+ SAY_SPECIAL = 4,
+ SAY_ENRAGE = 5,
+ SAY_DEATH = 6,
+
+ //Spells
+ SPELL_INCINERATE = 40239,
+ SPELL_CRUSHING_SHADOWS = 40243,
+ SPELL_SHADOWBOLT = 40185,
+ SPELL_PASSIVE_SHADOWFORM = 40326,
+ SPELL_SHADOW_OF_DEATH = 40251,
+ SPELL_BERSERK = 45078,
+ SPELL_ATROPHY = 40327, // Shadowy Constructs use this when they get within melee range of a player
+
+ CREATURE_DOOM_BLOSSOM = 23123,
+ CREATURE_SHADOWY_CONSTRUCT = 23111
+};
class mob_doom_blossom : public CreatureScript
{
@@ -278,7 +277,7 @@ public:
me->GetMotionMaster()->Clear(false);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- DoScriptText(SAY_INTRO, me);
+ Talk(SAY_INTRO);
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_TALK);
AggroTargetGUID = who->GetGUID();
Intro = true;
@@ -290,7 +289,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
@@ -298,7 +297,7 @@ public:
if (instance)
instance->SetData(DATA_TERONGOREFIENDEVENT, DONE);
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
float CalculateRandomLocation(float Loc, uint32 radius)
@@ -387,7 +386,7 @@ public:
{
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE);
Done = true;
if (AggroTargetGUID)
@@ -461,7 +460,7 @@ public:
if (target)
{
- DoScriptText(RAND(SAY_SPECIAL1, SAY_SPECIAL2), me);
+ Talk(SAY_SPECIAL);
DoCast(target, SPELL_INCINERATE);
IncinerateTimer = urand(20, 51) * 1000;
}
@@ -494,7 +493,7 @@ public:
if (RandomYellTimer <= diff)
{
- DoScriptText(RAND(SAY_SPELL1, SAY_SPELL2), me);
+ Talk(SAY_SPELL);
RandomYellTimer = urand(50, 101) * 1000;
} else RandomYellTimer -= diff;
@@ -503,7 +502,7 @@ public:
if (EnrageTimer <= diff)
{
DoCast(me, SPELL_BERSERK);
- DoScriptText(SAY_ENRAGE, me);
+ Talk(SAY_ENRAGE);
} else EnrageTimer -= diff;
}
diff --git a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp
index 9924bf1ffab..f56d55c36e3 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp
@@ -31,16 +31,12 @@ EndScriptData */
enum eEnums
{
- SAY_AGGRO = -1564000,
- SAY_NEEDLE1 = -1564001,
- SAY_NEEDLE2 = -1564002,
- SAY_SLAY1 = -1564003,
- SAY_SLAY2 = -1564004,
- SAY_SPECIAL1 = -1564005,
- SAY_SPECIAL2 = -1564006,
- SAY_ENRAGE1 = -1564007, //is this text actually in use?
- SAY_ENRAGE2 = -1564008,
- SAY_DEATH = -1564009,
+ SAY_AGGRO = 0,
+ SAY_NEEDLE = 1,
+ SAY_SLAY = 2,
+ SAY_SPECIAL = 3,
+ SAY_ENRAGE = 4,
+ SAY_DEATH = 5,
//Spells
SPELL_NEEDLE_SPINE = 39992,
@@ -97,7 +93,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, me);
+ Talk(SAY_SLAY);
events.DelayEvents(5000, GCD_YELL);
}
@@ -106,7 +102,7 @@ public:
if (instance)
instance->SetData(DATA_HIGHWARLORDNAJENTUSEVENT, DONE);
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell)
@@ -124,7 +120,7 @@ public:
if (instance)
instance->SetData(DATA_HIGHWARLORDNAJENTUSEVENT, IN_PROGRESS);
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
DoZoneInCombat();
events.ScheduleEvent(EVENT_BERSERK, 480000, GCD_CAST);
events.ScheduleEvent(EVENT_YELL, 45000 + (rand()%76)*1000, GCD_YELL);
@@ -166,7 +162,7 @@ public:
ResetTimer(45000);
break;
case EVENT_BERSERK:
- DoScriptText(SAY_ENRAGE2, me);
+ Talk(SAY_ENRAGE);
DoCast(me, SPELL_BERSERK, true);
events.DelayEvents(15000, GCD_YELL);
break;
@@ -180,7 +176,7 @@ public:
SpineTargetGUID = target->GetGUID();
//must let target summon, otherwise you cannot click the spine
target->SummonGameObject(GOBJECT_SPINE, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), me->GetOrientation(), 0, 0, 0, 0, 30);
- DoScriptText(urand(0, 1) ? SAY_NEEDLE1 : SAY_NEEDLE2, me);
+ Talk(SAY_NEEDLE);
events.DelayEvents(1500, GCD_CAST);
events.DelayEvents(15000, GCD_YELL);
}
@@ -199,7 +195,7 @@ public:
return;
}
case EVENT_YELL:
- DoScriptText(RAND(SAY_SPECIAL1, SAY_SPECIAL2), me);
+ Talk(SAY_SPECIAL);
events.ScheduleEvent(EVENT_YELL, urand(25000, 100000), GCD_YELL);
events.DelayEvents(15000, GCD_YELL);
break;
diff --git a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
index 673d4bcc96f..dcbbb76162d 100644
--- a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
+++ b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
@@ -29,35 +29,69 @@ EndScriptData */
#include "SpellAuraEffects.h"
#include "black_temple.h"
-//Speech'n'Sounds
-#define SAY_GATH_SLAY -1564085
-#define SAY_GATH_SLAY_COMNT -1564089
-#define SAY_GATH_DEATH -1564093
-#define SAY_GATH_SPECIAL1 -1564077
-#define SAY_GATH_SPECIAL2 -1564081
-
-#define SAY_VERA_SLAY -1564086
-#define SAY_VERA_COMNT -1564089 //signed for 22949
-#define SAY_VERA_DEATH -1564094
-#define SAY_VERA_SPECIAL1 -1564078
-#define SAY_VERA_SPECIAL2 -1564082
-
-#define SAY_MALA_SLAY -1564087
-#define SAY_MALA_COMNT -1564090
-#define SAY_MALA_DEATH -1564095
-#define SAY_MALA_SPECIAL1 -1564079
-#define SAY_MALA_SPECIAL2 -1564083
-
-#define SAY_ZERE_SLAY -1564088
-#define SAY_ZERE_COMNT -1564091
-#define SAY_ZERE_DEATH -1564096
-#define SAY_ZERE_SPECIAL1 -1564080
-#define SAY_ZERE_SPECIAL2 -1564084
+enum IllidariCouncil
+{
+ //Speech'n'Sounds
+ SAY_GATH_SPECIAL1 = 2,
+ SAY_GATH_SPECIAL2 = 3,
+ SAY_GATH_SLAY = 4,
+ SAY_GATH_COMNT = 5,
+ SAY_GATH_DEATH = 6,
+
+ SAY_MALA_SPECIAL1 = 2,
+ SAY_MALA_SPECIAL2 = 3,
+ SAY_MALA_SLAY = 4,
+ SAY_MALA_COMNT = 5,
+ SAY_MALA_DEATH = 6,
+
+ SAY_ZERE_SPECIAL1 = 2,
+ SAY_ZERE_SPECIAL2 = 3,
+ SAY_ZERE_SLAY = 4,
+ SAY_ZERE_COMNT = 5,
+ SAY_ZERE_DEATH = 6,
+
+ SAY_VERA_SPECIAL1 = 2,
+ SAY_VERA_SPECIAL2 = 3,
+ SAY_VERA_SLAY = 4,
+ SAY_VERA_COMNT = 5,
+ SAY_VERA_DEATH = 6,
+
+ AKAMAID = 23089,
+
+ // High Nethermancer Zerevor's spells
+ SPELL_FLAMESTRIKE = 41481,
+ SPELL_BLIZZARD = 41482,
+ SPELL_ARCANE_BOLT = 41483,
+ SPELL_ARCANE_EXPLOSION = 41524,
+ SPELL_DAMPEN_MAGIC = 41478,
+
+ // Lady Malande's spells
+ SPELL_EMPOWERED_SMITE = 41471,
+ SPELL_CIRCLE_OF_HEALING = 41455,
+ SPELL_REFLECTIVE_SHIELD = 41475,
+ SPELL_REFLECTIVE_SHIELD_T = 33619,
+ SPELL_DIVINE_WRATH = 41472,
+ SPELL_HEAL_VISUAL = 24171,
+
+ // Gathios the Shatterer's spells
+ SPELL_BLESS_PROTECTION = 41450,
+ SPELL_BLESS_SPELLWARD = 41451,
+ SPELL_CONSECRATION = 41541,
+ SPELL_HAMMER_OF_JUSTICE = 41468,
+ SPELL_SEAL_OF_COMMAND = 41469,
+ SPELL_SEAL_OF_BLOOD = 41459,
+ SPELL_CHROMATIC_AURA = 41453,
+ SPELL_DEVOTION_AURA = 41452,
+
+ // Veras Darkshadow's spells
+ SPELL_DEADLY_POISON = 41485,
+ SPELL_ENVENOM = 41487,
+ SPELL_VANISH = 41479,
+ SPELL_BERSERK = 45078
+};
#define ERROR_INST_DATA "SD2 ERROR: Instance Data for Black Temple not set properly; Illidari Council event will not function properly."
-#define AKAMAID 23089
-
struct CouncilYells
{
int32 entry;
@@ -66,53 +100,21 @@ struct CouncilYells
static CouncilYells CouncilAggro[]=
{
- {-1564069, 5000}, // Gathios
- {-1564070, 5500}, // Veras
- {-1564071, 5000}, // Malande
- {-1564072, 0}, // Zerevor
+ {0, 5000}, // Gathios
+ {0, 5500}, // Veras
+ {0, 5000}, // Malande
+ {0, 0}, // Zerevor
};
// Need to get proper timers for this later
static CouncilYells CouncilEnrage[]=
{
- {-1564073, 2000}, // Gathios
- {-1564074, 6000}, // Veras
- {-1564075, 5000}, // Malande
- {-1564076, 0}, // Zerevor
+ {1, 2000}, // Gathios
+ {1, 6000}, // Veras
+ {1, 5000}, // Malande
+ {1, 0}, // Zerevor
};
-// High Nethermancer Zerevor's spells
-#define SPELL_FLAMESTRIKE 41481
-#define SPELL_BLIZZARD 41482
-#define SPELL_ARCANE_BOLT 41483
-#define SPELL_ARCANE_EXPLOSION 41524
-#define SPELL_DAMPEN_MAGIC 41478
-
-// Lady Malande's spells
-#define SPELL_EMPOWERED_SMITE 41471
-#define SPELL_CIRCLE_OF_HEALING 41455
-#define SPELL_REFLECTIVE_SHIELD 41475
-#define SPELL_REFLECTIVE_SHIELD_T 33619
-#define SPELL_DIVINE_WRATH 41472
-#define SPELL_HEAL_VISUAL 24171
-
-// Gathios the Shatterer's spells
-#define SPELL_BLESS_PROTECTION 41450
-#define SPELL_BLESS_SPELLWARD 41451
-#define SPELL_CONSECRATION 41541
-#define SPELL_HAMMER_OF_JUSTICE 41468
-#define SPELL_SEAL_OF_COMMAND 41469
-#define SPELL_SEAL_OF_BLOOD 41459
-#define SPELL_CHROMATIC_AURA 41453
-#define SPELL_DEVOTION_AURA 41452
-
-// Veras Darkshadow's spells
-#define SPELL_DEADLY_POISON 41485
-#define SPELL_ENVENOM 41487
-#define SPELL_VANISH 41479
-
-#define SPELL_BERSERK 45078
-
class mob_blood_elf_council_voice_trigger : public CreatureScript
{
public:
@@ -179,9 +181,9 @@ public:
{
if (AggroYellTimer <= diff)
{
- if (Unit* pMember = Unit::GetUnit(*me, Council[YellCounter]))
+ if (Creature* pMember = Creature::GetCreature(*me, Council[YellCounter]))
{
- DoScriptText(CouncilAggro[YellCounter].entry, pMember);
+ pMember->AI()->Talk(CouncilAggro[YellCounter].entry);
AggroYellTimer = CouncilAggro[YellCounter].timer;
}
++YellCounter;
@@ -194,10 +196,10 @@ public:
{
if (EnrageTimer <= diff)
{
- if (Unit* pMember = Unit::GetUnit(*me, Council[YellCounter]))
+ if (Creature* pMember = Creature::GetCreature(*me, Council[YellCounter]))
{
pMember->CastSpell(pMember, SPELL_BERSERK, true);
- DoScriptText(CouncilEnrage[YellCounter].entry, pMember);
+ pMember->AI()->Talk(CouncilEnrage[YellCounter].entry);
EnrageTimer = CouncilEnrage[YellCounter].timer;
}
++YellCounter;
@@ -497,12 +499,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(SAY_GATH_SLAY, me);
+ Talk(SAY_GATH_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_GATH_DEATH, me);
+ Talk(SAY_GATH_DEATH);
}
Unit* SelectCouncilMember()
@@ -631,12 +633,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(SAY_ZERE_SLAY, me);
+ Talk(SAY_ZERE_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_ZERE_DEATH, me);
+ Talk(SAY_ZERE_DEATH);
}
void UpdateAI(const uint32 diff)
@@ -731,12 +733,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(SAY_MALA_SLAY, me);
+ Talk(SAY_MALA_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_MALA_DEATH, me);
+ Talk(SAY_MALA_DEATH);
}
void UpdateAI(const uint32 diff)
@@ -817,12 +819,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(SAY_VERA_SLAY, me);
+ Talk(SAY_VERA_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_VERA_DEATH, me);
+ Talk(SAY_VERA_DEATH);
}
void UpdateAI(const uint32 diff)
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 a5737714e71..5a26ffd9acd 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp
@@ -28,64 +28,62 @@ EndScriptData */
#include "serpent_shrine.h"
#include "ScriptedEscortAI.h"
-#define SAY_AGGRO -1548021
-#define SAY_GAIN_BLESSING -1548022
-#define SAY_GAIN_ABILITY1 -1548023
-#define SAY_GAIN_ABILITY2 -1548024
-#define SAY_GAIN_ABILITY3 -1548025
-#define SAY_SLAY1 -1548026
-#define SAY_SLAY2 -1548027
-#define SAY_SLAY3 -1548028
-#define SAY_DEATH -1548029
-
-//Karathress spells
-#define SPELL_CATACLYSMIC_BOLT 38441
-#define SPELL_POWER_OF_SHARKKIS 38455
-#define SPELL_POWER_OF_TIDALVESS 38452
-#define SPELL_POWER_OF_CARIBDIS 38451
-#define SPELL_ENRAGE 24318
-#define SPELL_SEAR_NOVA 38445
-#define SPELL_BLESSING_OF_THE_TIDES 38449
-
-//Sharkkis spells
-#define SPELL_LEECHING_THROW 29436
-#define SPELL_THE_BEAST_WITHIN 38373
-#define SPELL_MULTISHOT 38366
-#define SPELL_SUMMON_FATHOM_LURKER 38433
-#define SPELL_SUMMON_FATHOM_SPOREBAT 38431
-#define SPELL_PET_ENRAGE 19574
-
-//Tidalvess spells
-#define SPELL_FROST_SHOCK 38234
-#define SPELL_SPITFIRE_TOTEM 38236
-#define SPELL_POISON_CLEANSING_TOTEM 38306
-// Spell obsolete
-// #define SPELL_POISON_CLEANSING_EFFECT 8167
-#define SPELL_EARTHBIND_TOTEM 38304
-#define SPELL_EARTHBIND_TOTEM_EFFECT 6474
-#define SPELL_WINDFURY_WEAPON 38184
-
-//Caribdis Spells
-#define SPELL_WATER_BOLT_VOLLEY 38335
-#define SPELL_TIDAL_SURGE 38358
-#define SPELL_TIDAL_SURGE_FREEZE 38357
-#define SPELL_HEAL 38330
-#define SPELL_SUMMON_CYCLONE 38337
-#define SPELL_CYCLONE_CYCLONE 29538
-
-//Yells and Quotes
-#define SAY_GAIN_BLESSING_OF_TIDES "Your overconfidence will be your undoing! Guards, lend me your strength!"
-#define SOUND_GAIN_BLESSING_OF_TIDES 11278
-#define SAY_MISC "Alana be'lendor!" //don't know what use this
-#define SOUND_MISC 11283
-
-//Summoned Unit GUIDs
-#define CREATURE_CYCLONE 22104
-#define CREATURE_FATHOM_SPOREBAT 22120
-#define CREATURE_FATHOM_LURKER 22119
-#define CREATURE_SPITFIRE_TOTEM 22091
-#define CREATURE_EARTHBIND_TOTEM 22486
-#define CREATURE_POISON_CLEANSING_TOTEM 22487
+enum FathomlordKarathress
+{
+ SAY_AGGRO = 0,
+ SAY_GAIN_BLESSING = 1,
+ SAY_GAIN_ABILITY1 = 2,
+ SAY_GAIN_ABILITY2 = 3,
+ SAY_GAIN_ABILITY3 = 4,
+ SAY_SLAY = 5,
+ SAY_DEATH = 6,
+
+ //Karathress spells
+ SPELL_CATACLYSMIC_BOLT = 38441,
+ SPELL_POWER_OF_SHARKKIS = 38455,
+ SPELL_POWER_OF_TIDALVESS = 38452,
+ SPELL_POWER_OF_CARIBDIS = 38451,
+ SPELL_ENRAGE = 24318,
+ SPELL_SEAR_NOVA = 38445,
+ SPELL_BLESSING_OF_THE_TIDES = 38449,
+
+ //Sharkkis spells
+ SPELL_LEECHING_THROW = 29436,
+ SPELL_THE_BEAST_WITHIN = 38373,
+ SPELL_MULTISHOT = 38366,
+ SPELL_SUMMON_FATHOM_LURKER = 38433,
+ SPELL_SUMMON_FATHOM_SPOREBAT = 38431,
+ SPELL_PET_ENRAGE = 19574,
+
+ //Tidalvess spells
+ SPELL_FROST_SHOCK = 38234,
+ SPELL_SPITFIRE_TOTEM = 38236,
+ SPELL_POISON_CLEANSING_TOTEM = 38306,
+ // Spell obsolete
+ SPELL_EARTHBIND_TOTEM = 38304,
+ SPELL_EARTHBIND_TOTEM_EFFECT = 6474,
+ SPELL_WINDFURY_WEAPON = 38184,
+
+ //Caribdis Spells
+ SPELL_WATER_BOLT_VOLLEY = 38335,
+ SPELL_TIDAL_SURGE = 38358,
+ SPELL_TIDAL_SURGE_FREEZE = 38357,
+ SPELL_HEAL = 38330,
+ SPELL_SUMMON_CYCLONE = 38337,
+ SPELL_CYCLONE_CYCLONE = 29538,
+
+ //Yells and Quotes
+ SOUND_GAIN_BLESSING_OF_TIDES = 11278,
+ SOUND_MISC = 11283,
+
+ //Summoned Unit GUIDs
+ CREATURE_CYCLONE = 22104,
+ CREATURE_FATHOM_SPOREBAT = 22120,
+ CREATURE_FATHOM_LURKER = 22119,
+ CREATURE_SPITFIRE_TOTEM = 22091,
+ CREATURE_EARTHBIND_TOTEM = 22486,
+ CREATURE_POISON_CLEANSING_TOTEM = 22487,
+};
//entry and position for Seer Olum
#define SEER_OLUM 22820
@@ -94,6 +92,9 @@ EndScriptData */
#define OLUM_Z -7.54773f
#define OLUM_O 0.401581f
+#define SAY_GAIN_BLESSING_OF_TIDES "Your overconfidence will be your undoing! Guards, lend me your strength!"
+#define SAY_MISC "Alana be'lendor!" //don't know what use this
+
#define MAX_ADVISORS 3
//Fathom-Lord Karathress AI
class boss_fathomlord_karathress : public CreatureScript
@@ -160,19 +161,19 @@ public:
void EventSharkkisDeath()
{
- DoScriptText(SAY_GAIN_ABILITY1, me);
+ Talk(SAY_GAIN_ABILITY1);
DoCast(me, SPELL_POWER_OF_SHARKKIS);
}
void EventTidalvessDeath()
{
- DoScriptText(SAY_GAIN_ABILITY2, me);
+ Talk(SAY_GAIN_ABILITY2);
DoCast(me, SPELL_POWER_OF_TIDALVESS);
}
void EventCaribdisDeath()
{
- DoScriptText(SAY_GAIN_ABILITY3, me);
+ Talk(SAY_GAIN_ABILITY3);
DoCast(me, SPELL_POWER_OF_CARIBDIS);
}
@@ -193,7 +194,7 @@ public:
GetAdvisors();
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
DoZoneInCombat();
instance->SetData64(DATA_KARATHRESSEVENT_STARTER, who->GetGUID());
@@ -202,12 +203,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_FATHOMLORDKARATHRESSEVENT, DONE);
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 bad10752db3..c8589cc05d8 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
@@ -27,43 +27,45 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "serpent_shrine.h"
-#define SAY_AGGRO -1548000
-#define SAY_SWITCH_TO_CLEAN -1548001
-#define SAY_CLEAN_SLAY1 -1548002
-#define SAY_CLEAN_SLAY2 -1548003
-#define SAY_CLEAN_DEATH -1548004
-#define SAY_SWITCH_TO_CORRUPT -1548005
-#define SAY_CORRUPT_SLAY1 -1548006
-#define SAY_CORRUPT_SLAY2 -1548007
-#define SAY_CORRUPT_DEATH -1548008
-
-#define SWITCH_RADIUS 18
-
-#define MODEL_CORRUPT 20609
-#define MODEL_CLEAN 20162
-
-#define SPELL_WATER_TOMB 38235
-#define SPELL_MARK_OF_HYDROSS1 38215
-#define SPELL_MARK_OF_HYDROSS2 38216
-#define SPELL_MARK_OF_HYDROSS3 38217
-#define SPELL_MARK_OF_HYDROSS4 38218
-#define SPELL_MARK_OF_HYDROSS5 38231
-#define SPELL_MARK_OF_HYDROSS6 40584
-#define SPELL_MARK_OF_CORRUPTION1 38219
-#define SPELL_MARK_OF_CORRUPTION2 38220
-#define SPELL_MARK_OF_CORRUPTION3 38221
-#define SPELL_MARK_OF_CORRUPTION4 38222
-#define SPELL_MARK_OF_CORRUPTION5 38230
-#define SPELL_MARK_OF_CORRUPTION6 40583
-#define SPELL_VILE_SLUDGE 38246
-#define SPELL_ENRAGE 27680 //this spell need verification
-#define SPELL_SUMMON_WATER_ELEMENT 36459 //not in use yet(in use ever?)
-#define SPELL_ELEMENTAL_SPAWNIN 25035
-#define SPELL_BLUE_BEAM 40227 //channeled Hydross Beam Helper (not in use yet)
-
-#define ENTRY_PURE_SPAWN 22035
-#define ENTRY_TAINTED_SPAWN 22036
-#define ENTRY_BEAM_DUMMY 21934
+enum HydrossTheUnstable
+{
+ SAY_AGGRO = 0,
+ SAY_SWITCH_TO_CLEAN = 1,
+ SAY_CLEAN_SLAY = 2,
+ SAY_CLEAN_DEATH = 3,
+ SAY_SWITCH_TO_CORRUPT = 4,
+ SAY_CORRUPT_SLAY = 5,
+ SAY_CORRUPT_DEATH = 6,
+
+ SWITCH_RADIUS = 18,
+
+ MODEL_CORRUPT = 20609,
+ MODEL_CLEAN = 20162,
+
+ SPELL_WATER_TOMB = 38235,
+ SPELL_MARK_OF_HYDROSS1 = 38215,
+ SPELL_MARK_OF_HYDROSS2 = 38216,
+ SPELL_MARK_OF_HYDROSS3 = 38217,
+ SPELL_MARK_OF_HYDROSS4 = 38218,
+ SPELL_MARK_OF_HYDROSS5 = 38231,
+ SPELL_MARK_OF_HYDROSS6 = 40584,
+ SPELL_MARK_OF_CORRUPTION1 = 38219,
+ SPELL_MARK_OF_CORRUPTION2 = 38220,
+ SPELL_MARK_OF_CORRUPTION3 = 38221,
+ SPELL_MARK_OF_CORRUPTION4 = 38222,
+ SPELL_MARK_OF_CORRUPTION5 = 38230,
+ SPELL_MARK_OF_CORRUPTION6 = 40583,
+ SPELL_VILE_SLUDGE = 38246,
+ SPELL_ENRAGE = 27680, //this spell need verification
+ SPELL_SUMMON_WATER_ELEMENT = 36459, //not in use yet(in use ever?)
+ SPELL_ELEMENTAL_SPAWNIN = 25035,
+ SPELL_BLUE_BEAM = 40227, //channeled Hydross Beam Helper (not in use yet)
+
+ ENTRY_PURE_SPAWN = 22035,
+ ENTRY_TAINTED_SPAWN = 22036,
+ ENTRY_BEAM_DUMMY = 21934
+};
+
#define HYDROSS_X -239.439f
#define HYDROSS_Y -363.481f
@@ -169,7 +171,7 @@ public:
}
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, IN_PROGRESS);
@@ -177,10 +179,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- if (CorruptedForm)
- DoScriptText(RAND(SAY_CORRUPT_SLAY1, SAY_CORRUPT_SLAY2), me);
- else
- DoScriptText(RAND(SAY_CLEAN_SLAY1, SAY_CLEAN_SLAY2), me);
+ Talk(CorruptedForm ? SAY_CORRUPT_SLAY : SAY_CLEAN_SLAY);
}
void JustSummoned(Creature* summoned)
@@ -206,10 +205,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- if (CorruptedForm)
- DoScriptText(SAY_CORRUPT_DEATH, me);
- else
- DoScriptText(SAY_CLEAN_DEATH, me);
+ Talk(CorruptedForm ? SAY_CORRUPT_DEATH : SAY_CLEAN_DEATH);
if (instance)
instance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, DONE);
@@ -293,7 +289,7 @@ public:
CorruptedForm = false;
MarkOfHydross_Count = 0;
- DoScriptText(SAY_SWITCH_TO_CLEAN, me);
+ Talk(SAY_SWITCH_TO_CLEAN);
DoResetThreat();
SummonBeams();
@@ -377,7 +373,7 @@ public:
MarkOfCorruption_Count = 0;
CorruptedForm = true;
- DoScriptText(SAY_SWITCH_TO_CORRUPT, me);
+ Talk(SAY_SWITCH_TO_CORRUPT);
DoResetThreat();
DeSummonBeams();
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 a934d03349c..6c4c51b03fe 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp
@@ -30,48 +30,47 @@ EndScriptData */
#include "Player.h"
#include "WorldSession.h"
-#define SAY_INTRO -1548042
-#define SAY_AGGRO1 -1548043
-#define SAY_AGGRO2 -1548044
-#define SAY_AGGRO3 -1548045
-#define SAY_AGGRO4 -1548046
-#define SAY_PHASE1 -1548047
-#define SAY_PHASE2 -1548048
-#define SAY_PHASE3 -1548049
-#define SAY_BOWSHOT1 -1548050
-#define SAY_BOWSHOT2 -1548051
-#define SAY_SLAY1 -1548052
-#define SAY_SLAY2 -1548053
-#define SAY_SLAY3 -1548054
-#define SAY_DEATH -1548055
-
-#define SPELL_SURGE 38044
-#define SPELL_MULTI_SHOT 38310
-#define SPELL_SHOCK_BLAST 38509
-#define SPELL_ENTANGLE 38316
-#define SPELL_STATIC_CHARGE_TRIGGER 38280
-#define SPELL_FORKED_LIGHTNING 40088
-#define SPELL_SHOOT 40873
-#define SPELL_POISON_BOLT 40095
-#define SPELL_TOXIC_SPORES 38575
-#define SPELL_MAGIC_BARRIER 38112
-
-#define MIDDLE_X 30.134f
-#define MIDDLE_Y -923.65f
-#define MIDDLE_Z 42.9f
-
-#define SPOREBAT_X 30.977156f
+enum LadyVashj
+{
+ SAY_INTRO = 0,
+ SAY_AGGRO = 1,
+ SAY_PHASE1 = 2,
+ SAY_PHASE2 = 3,
+ SAY_PHASE3 = 4,
+ SAY_BOWSHOT = 5,
+ SAY_SLAY = 6,
+ SAY_DEATH = 7,
+
+ SPELL_SURGE = 38044,
+ SPELL_MULTI_SHOT = 38310,
+ SPELL_SHOCK_BLAST = 38509,
+ SPELL_ENTANGLE = 38316,
+ SPELL_STATIC_CHARGE_TRIGGER = 38280,
+ SPELL_FORKED_LIGHTNING = 40088,
+ SPELL_SHOOT = 40873,
+ SPELL_POISON_BOLT = 40095,
+ SPELL_TOXIC_SPORES = 38575,
+ SPELL_MAGIC_BARRIER = 38112,
+
+ SHIED_GENERATOR_CHANNEL = 19870,
+ ENCHANTED_ELEMENTAL = 21958,
+ TAINTED_ELEMENTAL = 22009,
+ COILFANG_STRIDER = 22056,
+ COILFANG_ELITE = 22055,
+ TOXIC_SPOREBAT = 22140,
+ TOXIC_SPORES_TRIGGER = 22207
+};
+
+#define MIDDLE_X 30.134f
+#define MIDDLE_Y -923.65f
+#define MIDDLE_Z 42.9f
+
+#define SPOREBAT_X 30.977156f
#define SPOREBAT_Y -925.297761f
#define SPOREBAT_Z 77.176567f
#define SPOREBAT_O 5.223932f
-#define SHIED_GENERATOR_CHANNEL 19870
-#define ENCHANTED_ELEMENTAL 21958
-#define TAINTED_ELEMENTAL 22009
-#define COILFANG_STRIDER 22056
-#define COILFANG_ELITE 22055
-#define TOXIC_SPOREBAT 22140
-#define TOXIC_SPORES_TRIGGER 22207
+
#define TEXT_NOT_INITIALIZED "Instance script not initialized"
#define TEXT_ALREADY_DEACTIVATED "Already deactivated"
@@ -226,12 +225,12 @@ public:
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_LADYVASHJEVENT, DONE);
@@ -239,7 +238,7 @@ public:
void StartEvent()
{
- DoScriptText(RAND(SAY_AGGRO1, SAY_AGGRO2, SAY_AGGRO3, SAY_AGGRO4), me);
+ Talk(SAY_AGGRO);
Phase = 1;
@@ -269,7 +268,7 @@ public:
if (!Intro)
{
Intro = true;
- DoScriptText(SAY_INTRO, me);
+ Talk(SAY_INTRO);
}
if (!CanAttack)
return;
@@ -307,7 +306,7 @@ public:
}
if (rand()%3)
{
- DoScriptText(RAND(SAY_BOWSHOT1, SAY_BOWSHOT2), me);
+ Talk(SAY_BOWSHOT);
}
}
@@ -397,7 +396,7 @@ public:
if (Creature* creature = me->SummonCreature(SHIED_GENERATOR_CHANNEL, ShieldGeneratorChannelPos[i][0], ShieldGeneratorChannelPos[i][1], ShieldGeneratorChannelPos[i][2], ShieldGeneratorChannelPos[i][3], TEMPSUMMON_CORPSE_DESPAWN, 0))
ShieldGeneratorChannel[i] = creature->GetGUID();
- DoScriptText(SAY_PHASE2, me);
+ Talk(SAY_PHASE2);
}
}
// Phase 3
@@ -527,7 +526,7 @@ public:
me->RemoveAurasDueToSpell(SPELL_MAGIC_BARRIER);
- DoScriptText(SAY_PHASE3, me);
+ Talk(SAY_PHASE3);
Phase = 3;
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 1221e59b96e..157473463af 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
@@ -28,47 +28,46 @@ EndScriptData */
#include "serpent_shrine.h"
#include "Player.h"
-// --- Spells used by Leotheras The Blind
-#define SPELL_WHIRLWIND 37640
-#define SPELL_CHAOS_BLAST 37674
-#define SPELL_BERSERK 26662
-#define SPELL_INSIDIOUS_WHISPER 37676
-#define SPELL_DUAL_WIELD 42459
-
-// --- Spells used in banish phase ---
-#define BANISH_BEAM 38909
-#define AURA_BANISH 37833
-
-// --- Spells used by Greyheart Spellbinders
-#define SPELL_EARTHSHOCK 39076
-#define SPELL_MINDBLAST 37531
-
-// --- Spells used by Inner Demons and Creature ID
-#define INNER_DEMON_ID 21857
-#define AURA_DEMONIC_ALIGNMENT 37713
-#define SPELL_SHADOWBOLT 39309
-#define SPELL_SOUL_LINK 38007
-#define SPELL_CONSUMING_MADNESS 37749 //not supported by core yet
-
-//Misc.
-#define MODEL_DEMON 20125
-#define MODEL_NIGHTELF 20514
-#define DEMON_FORM 21875
-#define MOB_SPELLBINDER 21806
-#define INNER_DEMON_VICTIM 1
-
-#define SAY_AGGRO -1548009
-#define SAY_SWITCH_TO_DEMON -1548010
-#define SAY_INNER_DEMONS -1548011
-#define SAY_DEMON_SLAY1 -1548012
-#define SAY_DEMON_SLAY2 -1548013
-#define SAY_DEMON_SLAY3 -1548014
-#define SAY_NIGHTELF_SLAY1 -1548015
-#define SAY_NIGHTELF_SLAY2 -1548016
-#define SAY_NIGHTELF_SLAY3 -1548017
-#define SAY_FINAL_FORM -1548018
-#define SAY_FREE -1548019
-#define SAY_DEATH -1548020
+enum LeotherasTheBlind
+{
+ // Spells used by Leotheras The Blind
+ SPELL_WHIRLWIND = 37640,
+ SPELL_CHAOS_BLAST = 37674,
+ SPELL_BERSERK = 26662,
+ SPELL_INSIDIOUS_WHISPER = 37676,
+ SPELL_DUAL_WIELD = 42459,
+
+ // Spells used in banish phase
+ BANISH_BEAM = 38909,
+ AURA_BANISH = 37833,
+
+ // Spells used by Greyheart Spellbinders
+ SPELL_EARTHSHOCK = 39076,
+ SPELL_MINDBLAST = 37531,
+
+ // Spells used by Inner Demons and Creature ID
+ INNER_DEMON_ID = 21857,
+ AURA_DEMONIC_ALIGNMENT = 37713,
+ SPELL_SHADOWBOLT = 39309,
+ SPELL_SOUL_LINK = 38007,
+ SPELL_CONSUMING_MADNESS = 37749,
+
+ //Misc.
+ MODEL_DEMON = 20125,
+ MODEL_NIGHTELF = 20514,
+ DEMON_FORM = 21875,
+ MOB_SPELLBINDER = 21806,
+ INNER_DEMON_VICTIM = 1,
+
+ SAY_AGGRO = 0,
+ SAY_SWITCH_TO_DEMON = 1,
+ SAY_INNER_DEMONS = 2,
+ SAY_DEMON_SLAY = 3,
+ SAY_NIGHTELF_SLAY = 4,
+ SAY_FINAL_FORM = 5,
+ SAY_FREE = 6,
+ SAY_DEATH = 7
+};
class mob_inner_demon : public CreatureScript
{
@@ -289,7 +288,7 @@ public:
void StartEvent()
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_LEOTHERASTHEBLINDEVENT, IN_PROGRESS);
}
@@ -389,19 +388,12 @@ public:
if (victim->GetTypeId() != TYPEID_PLAYER)
return;
- if (DemonForm)
- {
- DoScriptText(RAND(SAY_DEMON_SLAY1, SAY_DEMON_SLAY2, SAY_DEMON_SLAY3), me);
- }
- else
- {
- DoScriptText(RAND(SAY_NIGHTELF_SLAY1, SAY_NIGHTELF_SLAY2, SAY_NIGHTELF_SLAY3), me);
- }
+ Talk(DemonForm ? SAY_DEMON_SLAY : SAY_NIGHTELF_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
//despawn copy
if (Demon)
@@ -493,7 +485,7 @@ public:
//switch to demon form
me->RemoveAurasDueToSpell(SPELL_WHIRLWIND, 0);
me->SetDisplayId(MODEL_DEMON);
- DoScriptText(SAY_SWITCH_TO_DEMON, me);
+ Talk(SAY_SWITCH_TO_DEMON);
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID , 0);
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0);
DemonForm = true;
@@ -556,7 +548,7 @@ public:
}
}
}
- DoScriptText(SAY_INNER_DEMONS, me);
+ Talk(SAY_INNER_DEMONS);
InnerDemons_Timer = 999999;
} else InnerDemons_Timer -= diff;
@@ -595,7 +587,7 @@ public:
IsFinalForm = true;
DemonForm = false;
- DoScriptText(SAY_FINAL_FORM, me);
+ Talk(SAY_FINAL_FORM);
me->SetDisplayId(MODEL_NIGHTELF);
me->LoadEquipment(me->GetEquipmentId());
}
@@ -629,7 +621,7 @@ public:
void StartEvent()
{
- DoScriptText(SAY_FREE, me);
+ Talk(SAY_FREE);
}
void KilledUnit(Unit* victim)
@@ -637,7 +629,7 @@ public:
if (victim->GetTypeId() != TYPEID_PLAYER)
return;
- DoScriptText(RAND(SAY_DEMON_SLAY1, SAY_DEMON_SLAY2, SAY_DEMON_SLAY3), me);
+ Talk(SAY_DEMON_SLAY);
}
void JustDied(Unit* /*killer*/)
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp
index 32f03d4d1f9..9c7fdadc18a 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp
@@ -30,37 +30,33 @@ EndScriptData */
enum eEnums
{
// Yell
- SAY_AGGRO = -1548030,
- SAY_SUMMON1 = -1548031,
- SAY_SUMMON2 = -1548032,
- SAY_SUMMON_BUBL1 = -1548033,
- SAY_SUMMON_BUBL2 = -1548034,
- SAY_SLAY1 = -1548035,
- SAY_SLAY2 = -1548036,
- SAY_SLAY3 = -1548037,
- SAY_DEATH = -1548038,
+ SAY_AGGRO = 0,
+ SAY_SUMMON = 1,
+ SAY_SUMMON_BUBL = 2,
+ SAY_SLAY = 3,
+ SAY_DEATH = 4,
// Emotes
- EMOTE_WATERY_GRAVE = -1548039,
- EMOTE_EARTHQUAKE = -1548040,
- EMOTE_WATERY_GLOBULES = -1548041,
+ EMOTE_WATERY_GRAVE = 5,
+ EMOTE_EARTHQUAKE = 6,
+ EMOTE_WATERY_GLOBULES = 7,
// Spells
- SPELL_TIDAL_WAVE = 37730,
- SPELL_WATERY_GRAVE = 38049,
- SPELL_EARTHQUAKE = 37764,
- SPELL_WATERY_GRAVE_EXPLOSION = 37852,
-
- SPELL_WATERY_GRAVE_1 = 38023,
- SPELL_WATERY_GRAVE_2 = 38024,
- SPELL_WATERY_GRAVE_3 = 38025,
- SPELL_WATERY_GRAVE_4 = 37850,
-
- SPELL_SUMMON_WATER_GLOBULE_1 = 37854,
- SPELL_SUMMON_WATER_GLOBULE_2 = 37858,
- SPELL_SUMMON_WATER_GLOBULE_3 = 37860,
- SPELL_SUMMON_WATER_GLOBULE_4 = 37861,
+ SPELL_TIDAL_WAVE = 37730,
+ SPELL_WATERY_GRAVE = 38049,
+ SPELL_EARTHQUAKE = 37764,
+ SPELL_WATERY_GRAVE_EXPLOSION = 37852,
+
+ SPELL_WATERY_GRAVE_1 = 38023,
+ SPELL_WATERY_GRAVE_2 = 38024,
+ SPELL_WATERY_GRAVE_3 = 38025,
+ SPELL_WATERY_GRAVE_4 = 37850,
+
+ SPELL_SUMMON_WATER_GLOBULE_1 = 37854,
+ SPELL_SUMMON_WATER_GLOBULE_2 = 37858,
+ SPELL_SUMMON_WATER_GLOBULE_3 = 37860,
+ SPELL_SUMMON_WATER_GLOBULE_4 = 37861,
// Creatures
- NPC_WATER_GLOBULE = 21913,
- NPC_TIDEWALKER_LURKER = 21920,
+ NPC_WATER_GLOBULE = 21913,
+ NPC_TIDEWALKER_LURKER = 21920
};
float MurlocCords[10][4] =
@@ -130,7 +126,7 @@ public:
void StartEvent()
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, IN_PROGRESS);
@@ -138,12 +134,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, DONE);
@@ -184,7 +180,7 @@ public:
}
else
{
- DoScriptText(RAND(SAY_SUMMON1, SAY_SUMMON2), me);
+ Talk(SAY_SUMMON);
for (uint8 i = 0; i < 10; ++i)
{
@@ -193,7 +189,7 @@ public:
if (target && Murloc)
Murloc->AI()->AttackStart(target);
}
- DoScriptText(EMOTE_EARTHQUAKE, me);
+ Talk(EMOTE_EARTHQUAKE);
Earthquake = false;
Earthquake_Timer = 40000+rand()%5000;
}
@@ -235,9 +231,9 @@ public:
}
}
- DoScriptText(RAND(SAY_SUMMON_BUBL1, SAY_SUMMON_BUBL2), me);
+ Talk(SAY_SUMMON_BUBL);
- DoScriptText(EMOTE_WATERY_GRAVE, me);
+ Talk(EMOTE_WATERY_GRAVE);
WateryGrave_Timer = 30000;
} else WateryGrave_Timer -= diff;
@@ -271,7 +267,7 @@ public:
pGlobuleTarget->CastSpell(pGlobuleTarget, globulespell[g], true);
}
}
- DoScriptText(EMOTE_WATERY_GLOBULES, me);
+ Talk(EMOTE_WATERY_GLOBULES);
WateryGlobules_Timer = 25000;
} else WateryGlobules_Timer -= diff;
}
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp
index 038300213a4..e2d581128fd 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp
@@ -32,20 +32,20 @@ EndContentData */
#include "ScriptedCreature.h"
#include "steam_vault.h"
-#define SAY_SUMMON -1545000
-#define SAY_AGGRO_1 -1545001
-#define SAY_AGGRO_2 -1545002
-#define SAY_AGGRO_3 -1545003
-#define SAY_SLAY_1 -1545004
-#define SAY_SLAY_2 -1545005
-#define SAY_DEAD -1545006
+enum HydromancerThespia
+{
+ SAY_SUMMON = 0,
+ SAY_AGGRO = 1,
+ SAY_SLAY = 2,
+ SAY_DEAD = 3,
-#define SPELL_LIGHTNING_CLOUD 25033
-#define SPELL_LUNG_BURST 31481
-#define SPELL_ENVELOPING_WINDS 31718
+ SPELL_LIGHTNING_CLOUD = 25033,
+ SPELL_LUNG_BURST = 31481,
+ SPELL_ENVELOPING_WINDS = 31718,
-#define SPELL_WATER_BOLT_VOLLEY 34449
-#define H_SPELL_WATER_BOLT_VOLLEY 37924
+ SPELL_WATER_BOLT_VOLLEY = 34449,
+ H_SPELL_WATER_BOLT_VOLLEY = 37924
+};
class boss_hydromancer_thespia : public CreatureScript
{
@@ -82,7 +82,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEAD, me);
+ Talk(SAY_DEAD);
if (instance)
instance->SetData(TYPE_HYDROMANCER_THESPIA, DONE);
@@ -90,12 +90,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(TYPE_HYDROMANCER_THESPIA, IN_PROGRESS);
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp
index 50cc913c669..6a70cb97759 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp
@@ -32,22 +32,19 @@ EndContentData */
#include "ScriptedCreature.h"
#include "steam_vault.h"
-#define SAY_MECHANICS -1545007
-#define SAY_AGGRO_1 -1545008
-#define SAY_AGGRO_2 -1545009
-#define SAY_AGGRO_3 -1545010
-#define SAY_AGGRO_4 -1545011
-#define SAY_SLAY_1 -1545012
-#define SAY_SLAY_2 -1545013
-#define SAY_SLAY_3 -1545014
-#define SAY_DEATH -1545015
-
-#define SPELL_SUPER_SHRINK_RAY 31485
-#define SPELL_SAW_BLADE 31486
-#define SPELL_ELECTRIFIED_NET 35107
-#define H_SPELL_ENRAGE 1 //corrent enrage spell not known
-
-#define ENTRY_STREAMRIGGER_MECHANIC 17951
+enum MekgineerSteamrigger
+{
+ SAY_MECHANICS = 0,
+ SAY_AGGRO = 1,
+ SAY_SLAY = 2,
+ SAY_DEATH = 3,
+
+ SPELL_SUPER_SHRINK_RAY = 31485,
+ SPELL_SAW_BLADE = 31486,
+ SPELL_ELECTRIFIED_NET = 35107,
+
+ ENTRY_STREAMRIGGER_MECHANIC = 17951
+};
class boss_mekgineer_steamrigger : public CreatureScript
{
@@ -91,7 +88,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(TYPE_MEKGINEER_STEAMRIGGER, DONE);
@@ -99,12 +96,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me);
+ Talk(SAY_SLAY);
}
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(TYPE_MEKGINEER_STEAMRIGGER, IN_PROGRESS);
@@ -113,7 +110,7 @@ public:
//no known summon spells exist
void SummonMechanichs()
{
- DoScriptText(SAY_MECHANICS, me);
+ Talk(SAY_MECHANICS);
DoSpawnCreature(ENTRY_STREAMRIGGER_MECHANIC, 5, 5, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000);
DoSpawnCreature(ENTRY_STREAMRIGGER_MECHANIC, -5, 5, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000);
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp
index ac730292545..51c477365a3 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp
@@ -28,21 +28,21 @@ EndScriptData */
#include "steam_vault.h"
#include "SpellInfo.h"
-#define SAY_INTRO -1545016
-#define SAY_REGEN -1545017
-#define SAY_AGGRO1 -1545018
-#define SAY_AGGRO2 -1545019
-#define SAY_AGGRO3 -1545020
-#define SAY_SLAY1 -1545021
-#define SAY_SLAY2 -1545022
-#define SAY_DEATH -1545023
-
-#define SPELL_SPELL_REFLECTION 31534
-#define SPELL_IMPALE 39061
-#define SPELL_WARLORDS_RAGE 37081
-#define SPELL_WARLORDS_RAGE_NAGA 31543
-
-#define SPELL_WARLORDS_RAGE_PROC 36453
+enum NagaDistiller
+{
+ SAY_INTRO = 0,
+ SAY_REGEN = 1,
+ SAY_AGGRO = 2,
+ SAY_SLAY = 3,
+ SAY_DEATH = 4,
+
+ SPELL_SPELL_REFLECTION = 31534,
+ SPELL_IMPALE = 39061,
+ SPELL_WARLORDS_RAGE = 37081,
+ SPELL_WARLORDS_RAGE_NAGA = 31543,
+
+ SPELL_WARLORDS_RAGE_PROC = 36453
+};
class mob_naga_distiller : public CreatureScript
{
@@ -139,7 +139,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO1, SAY_AGGRO2, SAY_AGGRO3), me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(TYPE_WARLORD_KALITHRESH, IN_PROGRESS);
@@ -147,7 +147,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me);
+ Talk(SAY_SLAY);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell)
@@ -161,7 +161,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(TYPE_WARLORD_KALITHRESH, DONE);
@@ -176,7 +176,7 @@ public:
{
if (Creature* distiller = me->FindNearestCreature(17954, 100.0f))
{
- DoScriptText(SAY_REGEN, me);
+ Talk(SAY_REGEN);
DoCast(me, SPELL_WARLORDS_RAGE);
CAST_AI(mob_naga_distiller::mob_naga_distillerAI, distiller->AI())->StartRageGen(me);
}
diff --git a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp
index 3443103fa70..797d0f0d799 100644
--- a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp
+++ b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp
@@ -30,17 +30,13 @@ EndScriptData */
enum eEnums
{
- SAY_AGGRO = -1565010,
- SAY_SLAM1 = -1565011,
- SAY_SLAM2 = -1565012,
- SAY_SHATTER1 = -1565013,
- SAY_SHATTER2 = -1565014,
- SAY_SLAY1 = -1565015,
- SAY_SLAY2 = -1565016,
- SAY_SLAY3 = -1565017,
- SAY_DEATH = -1565018,
-
- EMOTE_GROW = -1565019,
+ SAY_AGGRO = 0,
+ SAY_SLAM = 1,
+ SAY_SHATTER = 2,
+ SAY_SLAY = 3,
+ SAY_DEATH = 4,
+
+ EMOTE_GROW = 5,
SPELL_GROWTH = 36300,
SPELL_CAVE_IN = 36240,
@@ -100,7 +96,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_GRUULEVENT, IN_PROGRESS);
@@ -108,12 +104,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
{
@@ -172,7 +168,7 @@ public:
// Gruul can cast this spell up to 30 times
if (m_uiGrowth_Timer <= uiDiff)
{
- DoScriptText(EMOTE_GROW, me);
+ Talk(EMOTE_GROW);
DoCast(me, SPELL_GROWTH);
m_uiGrowth_Timer = 30000;
}
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 03089d646f9..2d2c36104a2 100644
--- a/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp
+++ b/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp
@@ -27,46 +27,44 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "gruuls_lair.h"
-#define SAY_AGGRO -1565000
-#define SAY_ENRAGE -1565001
-#define SAY_OGRE_DEATH1 -1565002
-#define SAY_OGRE_DEATH2 -1565003
-#define SAY_OGRE_DEATH3 -1565004
-#define SAY_OGRE_DEATH4 -1565005
-#define SAY_SLAY1 -1565006
-#define SAY_SLAY2 -1565007
-#define SAY_SLAY3 -1565008
-#define SAY_DEATH -1565009
-
-// High King Maulgar
-#define SPELL_ARCING_SMASH 39144
-#define SPELL_MIGHTY_BLOW 33230
-#define SPELL_WHIRLWIND 33238
-#define SPELL_BERSERKER_C 26561
-#define SPELL_ROAR 16508
-#define SPELL_FLURRY 33232
-#define SPELL_DUAL_WIELD 29651 //used in phase
-
-// Olm the Summoner
-#define SPELL_DARK_DECAY 33129
-#define SPELL_DEATH_COIL 33130
-#define SPELL_SUMMON_WFH 33131
-
-//Kiggler the Craed
-#define SPELL_GREATER_POLYMORPH 33173
-#define SPELL_LIGHTNING_BOLT 36152
-#define SPELL_ARCANE_SHOCK 33175
-#define SPELL_ARCANE_EXPLOSION 33237
-
-//Blindeye the Seer
-#define SPELL_GREATER_PW_SHIELD 33147
-#define SPELL_HEAL 33144
-#define SPELL_PRAYER_OH 33152
-
-//Krosh Firehand
-#define SPELL_GREATER_FIREBALL 33051
-#define SPELL_SPELLSHIELD 33054
-#define SPELL_BLAST_WAVE 33061
+enum HighKingMaulgar
+{
+ SAY_AGGRO = 0,
+ SAY_ENRAGE = 1,
+ SAY_OGRE_DEATH = 2,
+ SAY_SLAY = 3,
+ SAY_DEATH = 4,
+
+ // High King Maulgar
+ SPELL_ARCING_SMASH = 39144,
+ SPELL_MIGHTY_BLOW = 33230,
+ SPELL_WHIRLWIND = 33238,
+ SPELL_BERSERKER_C = 26561,
+ SPELL_ROAR = 16508,
+ SPELL_FLURRY = 33232,
+ SPELL_DUAL_WIELD = 29651,
+
+ // Olm the Summoner
+ SPELL_DARK_DECAY = 33129,
+ SPELL_DEATH_COIL = 33130,
+ SPELL_SUMMON_WFH = 33131,
+
+ //Kiggler the Craed
+ SPELL_GREATER_POLYMORPH = 33173,
+ SPELL_LIGHTNING_BOLT = 36152,
+ SPELL_ARCANE_SHOCK = 33175,
+ SPELL_ARCANE_EXPLOSION = 33237,
+
+ //Blindeye the Seer
+ SPELL_GREATER_PW_SHIELD = 33147,
+ SPELL_HEAL = 33144,
+ SPELL_PRAYER_OH = 33152,
+
+ //Krosh Firehand
+ SPELL_GREATER_FIREBALL = 33051,
+ SPELL_SPELLSHIELD = 33054,
+ SPELL_BLAST_WAVE = 33061
+};
bool CheckAllBossDied(InstanceScript* instance, Creature* me)
{
@@ -171,12 +169,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (CheckAllBossDied(instance, me))
instance->SetData(DATA_MAULGAREVENT, DONE);
@@ -184,7 +182,7 @@ public:
void AddDeath()
{
- DoScriptText(RAND(SAY_OGRE_DEATH1, SAY_OGRE_DEATH2, SAY_OGRE_DEATH3, SAY_OGRE_DEATH4), me);
+ Talk(SAY_OGRE_DEATH);
}
void EnterCombat(Unit* who)
@@ -211,7 +209,7 @@ public:
GetCouncil();
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
instance->SetData64(DATA_MAULGAREVENT_TANK, who->GetGUID());
instance->SetData(DATA_MAULGAREVENT, IN_PROGRESS);
@@ -269,7 +267,7 @@ public:
if (!Phase2 && HealthBelowPct(50))
{
Phase2 = true;
- DoScriptText(SAY_ENRAGE, me);
+ Talk(SAY_ENRAGE);
DoCast(me, SPELL_DUAL_WIELD, true);
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 0);
diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp
index b42641c5171..4b364d1c0a8 100644
--- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp
@@ -29,7 +29,7 @@ EndScriptData */
enum eEnums
{
- SAY_AGGRO = -1542008,
+ SAY_AGGRO = 0,
SPELL_SLIME_SPRAY = 30913,
SPELL_POISON_CLOUD = 30916,
@@ -73,7 +73,7 @@ class boss_broggok : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void JustSummoned(Creature* summoned)
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 3c07862e0f6..2fe95e1bf4d 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
@@ -35,14 +35,11 @@ EndContentData */
enum eKelidan
{
- SAY_WAKE = -1542000,
- SAY_ADD_AGGRO_1 = -1542001,
- SAY_ADD_AGGRO_2 = -1542002,
- SAY_ADD_AGGRO_3 = -1542003,
- SAY_KILL_1 = -1542004,
- SAY_KILL_2 = -1542005,
- SAY_NOVA = -1542006,
- SAY_DIE = -1542007,
+ SAY_WAKE = 0,
+ SAY_ADD_AGGRO = 1,
+ SAY_KILL = 2,
+ SAY_NOVA = 3,
+ SAY_DIE = 4,
SPELL_CORRUPTION = 30938,
SPELL_EVOCATION = 30935,
@@ -117,7 +114,7 @@ class boss_kelidan_the_breaker : public CreatureScript
void EnterCombat(Unit* who)
{
- DoScriptText(SAY_WAKE, me);
+ Talk(SAY_WAKE);
if (me->IsNonMeleeSpellCasted(false))
me->InterruptNonMeleeSpells(true);
DoStartMovement(who);
@@ -130,7 +127,7 @@ class boss_kelidan_the_breaker : public CreatureScript
if (rand()%2)
return;
- DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2), me);
+ Talk(SAY_KILL);
}
void ChannelerEngaged(Unit* who)
@@ -138,7 +135,7 @@ class boss_kelidan_the_breaker : public CreatureScript
if (who && !addYell)
{
addYell = true;
- DoScriptText(RAND(SAY_ADD_AGGRO_1, SAY_ADD_AGGRO_2, SAY_ADD_AGGRO_3), me);
+ Talk(SAY_ADD_AGGRO);
}
for (uint8 i=0; i<5; ++i)
{
@@ -194,7 +191,7 @@ class boss_kelidan_the_breaker : public CreatureScript
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DIE, me);
+ Talk(SAY_DIE);
if (!instance)
return;
@@ -254,7 +251,7 @@ class boss_kelidan_the_breaker : public CreatureScript
if (me->IsNonMeleeSpellCasted(false))
me->InterruptNonMeleeSpells(true);
- DoScriptText(SAY_NOVA, me);
+ Talk(SAY_NOVA);
if (SpellInfo const* nova = sSpellMgr->GetSpellInfo(SPELL_BURNING_NOVA))
{
diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp
index df9aefabe15..4dfd7e8a8e8 100644
--- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp
@@ -29,17 +29,14 @@ EndScriptData */
enum eEnums
{
- SAY_AGGRO_1 = -1542009,
- SAY_AGGRO_2 = -1542010,
- SAY_AGGRO_3 = -1542011,
- SAY_KILL_1 = -1542012,
- SAY_KILL_2 = -1542013,
- SAY_DIE = -1542014,
-
- SPELL_ACID_SPRAY = 38153, // heroic 38973 ??? 38153
+ SAY_AGGRO = 0,
+ SAY_KILL = 1,
+ SAY_DIE = 2,
+
+ SPELL_ACID_SPRAY = 38153,
SPELL_EXPLODING_BREAKER = 30925,
SPELL_KNOCKDOWN = 20276,
- SPELL_DOMINATION = 25772 // ???
+ SPELL_DOMINATION = 25772
};
class boss_the_maker : public CreatureScript
@@ -81,7 +78,7 @@ class boss_the_maker : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me);
+ Talk(SAY_AGGRO);
if (!instance)
return;
@@ -92,12 +89,12 @@ class boss_the_maker : public CreatureScript
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2), me);
+ Talk(SAY_KILL);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DIE, me);
+ Talk(SAY_DIE);
if (!instance)
return;
diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp
index 56365216be5..a40c2e480bd 100644
--- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp
@@ -29,14 +29,12 @@ EndScriptData */
enum eSays
{
- SAY_AGGRO_1 = -1543009,
- SAY_AGGRO_2 = -1543010,
- SAY_AGGRO_3 = -1543011,
- SAY_SUMMON = -1543012,
- SAY_CURSE = -1543013,
- SAY_KILL_1 = -1543014,
- SAY_DIE = -1543015,
- SAY_WIPE = -1543016,
+ SAY_AGGRO = 0,
+ SAY_SUMMON = 1,
+ SAY_CURSE = 2,
+ SAY_KILL_1 = 3,
+ SAY_DIE = 4,
+ SAY_WIPE = 5,
};
enum eSpells
@@ -79,7 +77,7 @@ class boss_omor_the_unscarred : public CreatureScript
void Reset()
{
- DoScriptText(SAY_WIPE, me);
+ Talk(SAY_WIPE);
OrbitalStrike_Timer = 25000;
ShadowWhip_Timer = 2000;
@@ -94,7 +92,7 @@ class boss_omor_the_unscarred : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me);
+ Talk(SAY_AGGRO);
}
void KilledUnit(Unit* /*victim*/)
@@ -102,12 +100,12 @@ class boss_omor_the_unscarred : public CreatureScript
if (rand()%2)
return;
- DoScriptText(SAY_KILL_1, me);
+ Talk(SAY_KILL_1);
}
void JustSummoned(Creature* summoned)
{
- DoScriptText(SAY_SUMMON, me);
+ Talk(SAY_SUMMON);
if (Unit* random = SelectTarget(SELECT_TARGET_RANDOM, 0))
summoned->AI()->AttackStart(random);
@@ -117,7 +115,7 @@ class boss_omor_the_unscarred : public CreatureScript
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DIE, me);
+ Talk(SAY_DIE);
}
void UpdateAI(const uint32 diff)
@@ -192,7 +190,7 @@ class boss_omor_the_unscarred : public CreatureScript
if (Aura_Timer <= diff)
{
- DoScriptText(SAY_CURSE, me);
+ Talk(SAY_CURSE);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
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 f0c4330c9a3..5617c69aea9 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
@@ -39,7 +39,7 @@ enum eSpells
SPELL_REVENGE = 19130,
SPELL_REVENGE_H = 40392,
SPELL_KIDNEY_SHOT = 30621,
- SPELL_FIRE_NOVA_VISUAL = 19823,
+ SPELL_FIRE_NOVA_VISUAL = 19823
};
enum eUnits
@@ -50,20 +50,19 @@ enum eUnits
ENTRY_NAZAN = 17536,
ENTRY_LIQUID_FIRE = 22515,
ENTRY_REINFORCED_FEL_IRON_CHEST = 185168,
- ENTRY_REINFORCED_FEL_IRON_CHEST_H = 185169,
+ ENTRY_REINFORCED_FEL_IRON_CHEST_H = 185169
};
-enum eSays
+enum Says
{
- SAY_INTRO = -1543017,
- SAY_WIPE = -1543018,
- SAY_AGGRO_1 = -1543019,
- SAY_AGGRO_2 = -1543020,
- SAY_AGGRO_3 = -1543021,
- SAY_KILL_1 = -1543022,
- SAY_KILL_2 = -1543023,
- SAY_DIE = -1543024,
- EMOTE = -1543025,
+ SAY_INTRO = 0,
+
+ SAY_WIPE = 0,
+ SAY_AGGRO = 1,
+ SAY_KILL = 2,
+ SAY_DIE = 3,
+
+ EMOTE = 0
};
const float VazrudenMiddle[3] = {-1406.5f, 1746.5f, 81.2f};
@@ -153,7 +152,7 @@ class boss_nazan : public CreatureScript
if (Unit* victim = SelectTarget(SELECT_TARGET_NEAREST, 0))
me->AI()->AttackStart(victim);
DoStartMovement(me->getVictim());
- DoScriptText(EMOTE, me);
+ Talk(EMOTE);
return;
}
else
@@ -229,19 +228,19 @@ class boss_vazruden : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me);
+ Talk(SAY_AGGRO);
}
void KilledUnit(Unit* who)
{
if (who && who->GetEntry() != ENTRY_VAZRUDEN)
- DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2), me);
+ Talk(SAY_KILL);
}
void JustDied(Unit* killer)
{
if (killer && killer != me)
- DoScriptText(SAY_DIE, me);
+ Talk(SAY_DIE);
}
void UpdateAI(const uint32 diff)
@@ -252,7 +251,7 @@ class boss_vazruden : public CreatureScript
{
if (!WipeSaid)
{
- DoScriptText(SAY_WIPE, me);
+ Talk(SAY_WIPE);
WipeSaid = true;
}
me->DisappearAndDie();
@@ -364,7 +363,7 @@ class boss_vazruden_the_herald : public CreatureScript
{
phase = 1;
check = 0;
- DoScriptText(SAY_INTRO, me);
+ Talk(SAY_INTRO);
}
}
diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp
index 1d2ecccf3c7..156d5cbae2c 100644
--- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp
@@ -28,15 +28,12 @@ EndScriptData */
enum eSays
{
- SAY_TAUNT = -1543000,
- SAY_HEAL = -1543001,
- SAY_SURGE = -1543002,
- SAY_AGGRO_1 = -1543003,
- SAY_AGGRO_2 = -1543004,
- SAY_AGGRO_3 = -1543005,
- SAY_KILL_1 = -1543006,
- SAY_KILL_2 = -1543007,
- SAY_DIE = -1543008,
+ SAY_TAUNT = 0,
+ SAY_HEAL = 1,
+ SAY_SURGE = 2,
+ SAY_AGGRO = 3,
+ SAY_KILL = 4,
+ SAY_DIE = 5
};
enum eSpells
@@ -81,7 +78,7 @@ class boss_watchkeeper_gargolmar : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me);
+ Talk(SAY_AGGRO);
}
void MoveInLineOfSight(Unit* who)
@@ -99,7 +96,7 @@ class boss_watchkeeper_gargolmar : public CreatureScript
}
else if (!HasTaunted && me->IsWithinDistInMap(who, 60.0f))
{
- DoScriptText(SAY_TAUNT, me);
+ Talk(SAY_TAUNT);
HasTaunted = true;
}
}
@@ -107,12 +104,12 @@ class boss_watchkeeper_gargolmar : public CreatureScript
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2), me);
+ Talk(SAY_KILL);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DIE, me);
+ Talk(SAY_DIE);
}
void UpdateAI(const uint32 diff)
@@ -130,7 +127,7 @@ class boss_watchkeeper_gargolmar : public CreatureScript
if (Surge_Timer <= diff)
{
- DoScriptText(SAY_SURGE, me);
+ Talk(SAY_SURGE);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(target, SPELL_SURGE);
@@ -155,7 +152,7 @@ class boss_watchkeeper_gargolmar : public CreatureScript
{
if (HealthBelowPct(40))
{
- DoScriptText(SAY_HEAL, me);
+ Talk(SAY_HEAL);
YelledForHeal = true;
}
}
diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
index 94272e4a50f..c5f79a2babd 100644
--- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
@@ -29,36 +29,22 @@ EndScriptData */
#include "Player.h"
#include "SpellInfo.h"
-struct Yell
-{
- int32 id;
-};
-
-static Yell RandomTaunt[]=
-{
- {-1544000},
- {-1544001},
- {-1544002},
- {-1544003},
- {-1544004},
- {-1544005},
-};
-
enum eSays
{
- SAY_FREED = -1544006,
- SAY_AGGRO = -1544007,
- SAY_BANISH = -1544008,
- SAY_CHAMBER_DESTROY = -1544009,
- SAY_PLAYER_KILLED = -1544010,
- SAY_DEATH = -1544011,
+ SAY_TAUNT = 0,
+ SAY_FREED = 1,
+ SAY_AGGRO = 2,
+ SAY_BANISH = 3,
+ SAY_CHAMBER_DESTROY = 4,
+ SAY_PLAYER_KILLED = 5,
+ SAY_DEATH = 6
};
enum eEmotes
{
- EMOTE_BERSERK = -1544012,
- EMOTE_BLASTNOVA = -1544013,
- EMOTE_BEGIN = -1544014,
+ EMOTE_BERSERK = 7,
+ EMOTE_BLASTNOVA = 8,
+ EMOTE_BEGIN = 9
};
enum eCreatures
@@ -309,7 +295,7 @@ class boss_magtheridon : public CreatureScript
// if 5 clickers from other cubes apply shadow cage
if (ClickerNum >= CLICKERS_COUNT && !me->HasAura(SPELL_SHADOW_CAGE))
{
- DoScriptText(SAY_BANISH, me);
+ Talk(SAY_BANISH);
DoCast(me, SPELL_SHADOW_CAGE, true);
}
else
@@ -322,7 +308,7 @@ class boss_magtheridon : public CreatureScript
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(SAY_PLAYER_KILLED, me);
+ Talk(SAY_PLAYER_KILLED);
}
void JustDied(Unit* /*killer*/)
@@ -330,7 +316,7 @@ class boss_magtheridon : public CreatureScript
if (instance)
instance->SetData(DATA_MAGTHERIDON_EVENT, DONE);
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void MoveInLineOfSight(Unit* /*who*/) {}
@@ -350,7 +336,7 @@ class boss_magtheridon : public CreatureScript
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->RemoveAurasDueToSpell(SPELL_SHADOW_CAGE_C);
- DoScriptText(SAY_FREED, me);
+ Talk(SAY_FREED);
}
void UpdateAI(const uint32 diff)
@@ -359,7 +345,7 @@ class boss_magtheridon : public CreatureScript
{
if (RandChat_Timer <= diff)
{
- DoScriptText(RandomTaunt[rand()%6].id, me);
+ Talk(SAY_TAUNT);
RandChat_Timer = 90000;
}
else
@@ -374,7 +360,7 @@ class boss_magtheridon : public CreatureScript
if (Berserk_Timer <= diff)
{
DoCast(me, SPELL_BERSERK, true);
- DoScriptText(EMOTE_BERSERK, me);
+ Talk(EMOTE_BERSERK);
Berserk_Timer = 60000;
}
else
@@ -393,7 +379,7 @@ class boss_magtheridon : public CreatureScript
// to avoid earthquake interruption
if (!me->HasUnitState(UNIT_STATE_STUNNED))
{
- DoScriptText(EMOTE_BLASTNOVA, me);
+ Talk(EMOTE_BLASTNOVA);
DoCast(me, SPELL_BLASTNOVA);
BlastNova_Timer = 60000;
}
@@ -437,7 +423,7 @@ class boss_magtheridon : public CreatureScript
&& !me->HasUnitState(UNIT_STATE_STUNNED)) // shadow cage and earthquake
{
Phase3 = true;
- DoScriptText(SAY_CHAMBER_DESTROY, me);
+ Talk(SAY_CHAMBER_DESTROY);
DoCast(me, SPELL_CAMERA_SHAKE, true);
DoCast(me, SPELL_DEBRIS_KNOCKDOWN, true);
diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp
index c6434d9a989..e5b6ea71eb0 100644
--- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp
@@ -33,38 +33,15 @@ EndContentData */
#include "ScriptedCreature.h"
#include "shattered_halls.h"
-struct Say
-{
- int32 id;
-};
-
-static Say PeonAttacked[]=
-{
- {-1540001},
- {-1540002},
- {-1540003},
- {-1540004},
-};
-static Say PeonDies[]=
-{
- {-1540005},
- {-1540006},
- {-1540007},
- {-1540008},
-};
-
enum eSays
{
- SAY_INTRO = -1540000,
- SAY_TAUNT_1 = -1540009,
- SAY_TAUNT_2 = -1540010,
- SAY_TAUNT_3 = -1540011,
- SAY_AGGRO_1 = -1540012,
- SAY_AGGRO_2 = -1540013,
- SAY_AGGRO_3 = -1540014,
- SAY_SLAY_1 = -1540015,
- SAY_SLAY_2 = -1540016,
- SAY_DIE = -1540017,
+ SAY_INTRO = 0,
+ SAY_PEON_ATTACKED = 1,
+ SAY_PEON_DIES = 2,
+ SAY_TAUNT = 3,
+ SAY_AGGRO = 4,
+ SAY_SLAY = 5,
+ SAY_DIE = 6
};
enum eSpells
@@ -137,7 +114,7 @@ class boss_grand_warlock_nethekurse : public CreatureScript
if (PeonEngagedCount >= 4)
return;
- DoScriptText(PeonAttacked[PeonEngagedCount].id, me);
+ Talk(SAY_PEON_ATTACKED);
++PeonEngagedCount;
}
@@ -146,7 +123,7 @@ class boss_grand_warlock_nethekurse : public CreatureScript
if (PeonKilledCount >= 4)
return;
- DoScriptText(PeonDies[PeonKilledCount].id, me);
+ Talk(SAY_PEON_DIES);
++PeonKilledCount;
if (PeonKilledCount == 4)
@@ -159,7 +136,7 @@ class boss_grand_warlock_nethekurse : public CreatureScript
void DoTauntPeons()
{
- DoScriptText(RAND(SAY_TAUNT_1, SAY_TAUNT_2, SAY_TAUNT_3), me);
+ Talk(SAY_TAUNT);
//TODO: kill the peons first
IsIntroEvent = false;
@@ -190,7 +167,7 @@ class boss_grand_warlock_nethekurse : public CreatureScript
if (who->GetTypeId() != TYPEID_PLAYER)
return;
- DoScriptText(SAY_INTRO, me);
+ Talk(SAY_INTRO);
IntroOnce = true;
IsIntroEvent = true;
@@ -206,7 +183,7 @@ class boss_grand_warlock_nethekurse : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me);
+ Talk(SAY_AGGRO);
}
void JustSummoned(Creature* summoned)
@@ -222,12 +199,12 @@ class boss_grand_warlock_nethekurse : public CreatureScript
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DIE, me);
+ Talk(SAY_DIE);
if (!instance)
return;
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 3d2d39e9817..5d3ff2abcc5 100644
--- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp
@@ -34,9 +34,9 @@ EndContentData */
enum eEnums
{
- YELL_DIE_L = -1540039,
- YELL_DIE_R = -1540040,
- EMOTE_ENRAGE = -1540041,
+ YELL_DIE_L = 0,
+ YELL_DIE_R = 1,
+ EMOTE_ENRAGE = 2,
SPELL_BLAST_WAVE = 30600,
SPELL_FEAR = 30584,
@@ -57,49 +57,49 @@ struct Yell
static Yell GoCombat[]=
{
- {-1540018, NPC_LEFT_HEAD},
- {-1540019, NPC_LEFT_HEAD},
- {-1540020, NPC_LEFT_HEAD},
+ {0, NPC_LEFT_HEAD},
+ {1, NPC_LEFT_HEAD},
+ {2, NPC_LEFT_HEAD},
};
static Yell GoCombatDelay[]=
{
- {-1540021, NPC_RIGHT_HEAD},
- {-1540022, NPC_RIGHT_HEAD},
- {-1540023, NPC_RIGHT_HEAD},
+ {0, NPC_RIGHT_HEAD},
+ {1, NPC_RIGHT_HEAD},
+ {2, NPC_RIGHT_HEAD},
};
static Yell Threat[]=
{
- {-1540024, NPC_LEFT_HEAD},
- {-1540025, NPC_RIGHT_HEAD},
- {-1540026, NPC_LEFT_HEAD},
- {-1540027, NPC_LEFT_HEAD},
+ {3, NPC_LEFT_HEAD},
+ {3, NPC_RIGHT_HEAD},
+ {4, NPC_LEFT_HEAD},
+ {5, NPC_LEFT_HEAD},
};
static Yell ThreatDelay1[]=
{
- {-1540028, NPC_RIGHT_HEAD},
- {-1540029, NPC_LEFT_HEAD},
- {-1540030, NPC_RIGHT_HEAD},
- {-1540031, NPC_RIGHT_HEAD},
+ {4, NPC_RIGHT_HEAD},
+ {6, NPC_LEFT_HEAD},
+ {5, NPC_RIGHT_HEAD},
+ {6, NPC_RIGHT_HEAD},
};
static Yell ThreatDelay2[]=
{
- {-1540032, NPC_LEFT_HEAD},
- {-1540033, NPC_RIGHT_HEAD},
- {-1540034, NPC_LEFT_HEAD},
- {-1540035, NPC_LEFT_HEAD},
+ {7, NPC_LEFT_HEAD},
+ {7, NPC_RIGHT_HEAD},
+ {8, NPC_LEFT_HEAD},
+ {9, NPC_LEFT_HEAD},
};
static Yell Killing[]=
{
- {-1540036, NPC_LEFT_HEAD},
- {-1540037, NPC_RIGHT_HEAD},
+ {10, NPC_LEFT_HEAD},
+ {8, NPC_RIGHT_HEAD},
};
static Yell KillingDelay[]=
{
- {-1540038, NPC_RIGHT_HEAD},
- {-1000000, NPC_LEFT_HEAD},
+ {9, NPC_RIGHT_HEAD},
+ {11, NPC_LEFT_HEAD},
};
class mob_omrogg_heads : public CreatureScript
@@ -137,7 +137,7 @@ class mob_omrogg_heads : public CreatureScript
if (Death_Timer <= diff)
{
- DoScriptText(YELL_DIE_R, me);
+ Talk(YELL_DIE_R);
Death_Timer = false;
me->setDeathState(JUST_DIED);
} else Death_Timer -= diff;
@@ -222,17 +222,17 @@ class boss_warbringer_omrogg : public CreatureScript
void DoYellForThreat()
{
- Unit* pLeftHead = Unit::GetUnit(*me, LeftHeadGUID);
- Unit* pRightHead = Unit::GetUnit(*me, RightHeadGUID);
+ Creature* pLeftHead = Creature::GetCreature(*me, LeftHeadGUID);
+ Creature* pRightHead = Unit::GetCreature(*me, RightHeadGUID);
if (!pLeftHead || !pRightHead)
return;
ithreat = rand()%4;
- Unit* source = (pLeftHead->GetEntry() == Threat[ithreat].creature ? pLeftHead : pRightHead);
+ Creature* source = (pLeftHead->GetEntry() == Threat[ithreat].creature ? pLeftHead : pRightHead);
- DoScriptText(Threat[ithreat].id, source);
+ source->AI()->Talk(Threat[ithreat].id);
Delay_Timer = 3500;
ThreatYell = true;
@@ -243,11 +243,11 @@ 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 (Unit* pLeftHead = Unit::GetUnit(*me, LeftHeadGUID))
+ if (Creature* pLeftHead = Creature::GetCreature(*me, LeftHeadGUID))
{
iaggro = rand()%3;
- DoScriptText(GoCombat[iaggro].id, pLeftHead);
+ pLeftHead->AI()->Talk(GoCombat[iaggro].id);
Delay_Timer = 3500;
AggroYell = true;
@@ -272,25 +272,25 @@ class boss_warbringer_omrogg : public CreatureScript
void KilledUnit(Unit* /*victim*/)
{
- Unit* pLeftHead = Unit::GetUnit(*me, LeftHeadGUID);
- Unit* pRightHead = Unit::GetUnit(*me, RightHeadGUID);
+ Creature* pLeftHead = Creature::GetCreature(*me, LeftHeadGUID);
+ Creature* pRightHead = Creature::GetCreature(*me, RightHeadGUID);
if (!pLeftHead || !pRightHead)
return;
ikilling = rand()%2;
- Unit* source = (pLeftHead->GetEntry() == Killing[ikilling].creature ? pLeftHead : pRightHead);
+ Creature* source = (pLeftHead->GetEntry() == Killing[ikilling].creature ? pLeftHead : pRightHead);
switch (ikilling)
{
case 0:
- DoScriptText(Killing[ikilling].id, source);
+ source->AI()->Talk(Killing[ikilling].id);
Delay_Timer = 3500;
KillingYell = true;
break;
case 1:
- DoScriptText(Killing[ikilling].id, source);
+ source->AI()->Talk(Killing[ikilling].id);
KillingYell = false;
break;
}
@@ -298,13 +298,13 @@ class boss_warbringer_omrogg : public CreatureScript
void JustDied(Unit* /*killer*/)
{
- Unit* pLeftHead = Unit::GetUnit(*me, LeftHeadGUID);
- Unit* pRightHead = Unit::GetUnit(*me, RightHeadGUID);
+ Creature* pLeftHead = Creature::GetCreature(*me, LeftHeadGUID);
+ Creature* pRightHead = Creature::GetCreature(*me, RightHeadGUID);
if (!pLeftHead || !pRightHead)
return;
- DoScriptText(YELL_DIE_L, pLeftHead);
+ pLeftHead->AI()->Talk(YELL_DIE_L);
CAST_AI(mob_omrogg_heads::mob_omrogg_headsAI, CAST_CRE(pRightHead)->AI())->DoDeathYell();
@@ -318,40 +318,40 @@ class boss_warbringer_omrogg : public CreatureScript
{
Delay_Timer = 3500;
- Unit* pLeftHead = Unit::GetUnit(*me, LeftHeadGUID);
- Unit* pRightHead = Unit::GetUnit(*me, RightHeadGUID);
+ Creature* pLeftHead = Creature::GetCreature(*me, LeftHeadGUID);
+ Creature* pRightHead = Creature::GetCreature(*me, RightHeadGUID);
if (!pLeftHead || !pRightHead)
return;
if (AggroYell)
{
- DoScriptText(GoCombatDelay[iaggro].id, pRightHead);
+ pRightHead->AI()->Talk(GoCombatDelay[iaggro].id);
AggroYell = false;
}
if (ThreatYell2)
{
- Unit* source = (pLeftHead->GetEntry() == ThreatDelay2[ithreat].creature ? pLeftHead : pRightHead);
+ Creature* source = (pLeftHead->GetEntry() == ThreatDelay2[ithreat].creature ? pLeftHead : pRightHead);
- DoScriptText(ThreatDelay2[ithreat].id, source);
+ source->AI()->Talk(ThreatDelay2[ithreat].id);
ThreatYell2 = false;
}
if (ThreatYell)
{
- Unit* source = (pLeftHead->GetEntry() == ThreatDelay1[ithreat].creature ? pLeftHead : pRightHead);
+ Creature* source = (pLeftHead->GetEntry() == ThreatDelay1[ithreat].creature ? pLeftHead : pRightHead);
- DoScriptText(ThreatDelay1[ithreat].id, source);
+ source->AI()->Talk(ThreatDelay1[ithreat].id);
ThreatYell = false;
ThreatYell2 = true;
}
if (KillingYell)
{
- Unit* source = (pLeftHead->GetEntry() == KillingDelay[ikilling].creature ? pLeftHead : pRightHead);
+ Creature* source = (pLeftHead->GetEntry() == KillingDelay[ikilling].creature ? pLeftHead : pRightHead);
- DoScriptText(KillingDelay[ikilling].id, source);
+ source->AI()->Talk(KillingDelay[ikilling].id);
KillingYell = false;
}
} else Delay_Timer -= diff;
@@ -373,7 +373,7 @@ class boss_warbringer_omrogg : public CreatureScript
if (BurningMaul_Timer <= diff)
{
- DoScriptText(EMOTE_ENRAGE, me);
+ Talk(EMOTE_ENRAGE);
DoCast(me, SPELL_BURNING_MAUL);
BurningMaul_Timer = 40000;
BlastWave_Timer = 16000;
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 99f7c69aff2..37cd5666f73 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
@@ -32,12 +32,9 @@ EndContentData */
enum eSays
{
- SAY_AGGRO1 = -1540042,
- SAY_AGGRO2 = -1540043,
- SAY_AGGRO3 = -1540044,
- SAY_SLAY1 = -1540045,
- SAY_SLAY2 = -1540046,
- SAY_DEATH = -1540047,
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2
};
enum eSpells
@@ -111,7 +108,7 @@ class boss_warchief_kargath_bladefist : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO1, SAY_AGGRO2, SAY_AGGRO3), me);
+ Talk(SAY_AGGRO);
}
void JustSummoned(Creature* summoned)
@@ -134,13 +131,13 @@ class boss_warchief_kargath_bladefist : public CreatureScript
{
if (victim->GetTypeId() == TYPEID_PLAYER)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me);
+ Talk(SAY_SLAY);
}
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
removeAdds();
}
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
index 5b5c3ff2326..91ff608a6c7 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
@@ -32,15 +32,13 @@ EndScriptData */
enum eEnums
{
- SAY_AGGRO = -1550007,
- SAY_SUMMON1 = -1550008,
- SAY_SUMMON2 = -1550009,
- SAY_KILL1 = -1550010,
- SAY_KILL2 = -1550011,
- SAY_KILL3 = -1550012,
- SAY_DEATH = -1550013,
- SAY_VOIDA = -1550014,
- SAY_VOIDB = -1550015,
+ SAY_AGGRO = 0,
+ SAY_SUMMON1 = 1,
+ SAY_SUMMON2 = 2,
+ SAY_KILL = 3,
+ SAY_DEATH = 4,
+ SAY_VOIDA = 5,
+ SAY_VOIDB = 6,
SPELL_ARCANE_MISSILES = 33031,
SPELL_WRATH_OF_THE_ASTROMANCER = 42783,
@@ -149,21 +147,21 @@ class boss_high_astromancer_solarian : public CreatureScript
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_KILL1, SAY_KILL2, SAY_KILL3), me);
+ Talk(SAY_KILL);
}
void JustDied(Unit* /*killer*/)
{
me->SetObjectScale(defaultsize);
me->SetDisplayId(MODEL_HUMAN);
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_HIGHASTROMANCERSOLARIANEVENT, DONE);
}
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
DoZoneInCombat();
if (instance)
@@ -333,7 +331,7 @@ class boss_high_astromancer_solarian : public CreatureScript
for (int j=1; j <= 4; j++)
SummonMinion(NPC_SOLARIUM_AGENT, Portals[i][0], Portals[i][1], Portals[i][2]);
- DoScriptText(SAY_SUMMON1, me);
+ Talk(SAY_SUMMON1);
Phase2_Timer = 10000;
}
else
@@ -360,7 +358,7 @@ class boss_high_astromancer_solarian : public CreatureScript
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->SetVisible(true);
- DoScriptText(SAY_SUMMON2, me);
+ Talk(SAY_SUMMON2);
AppearDelay = true;
Phase3_Timer = 15000;
}
@@ -394,8 +392,8 @@ class boss_high_astromancer_solarian : public CreatureScript
//To make sure she wont be invisible or not selecatble
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->SetVisible(true);
- DoScriptText(SAY_VOIDA, me);
- DoScriptText(SAY_VOIDB, me);
+ Talk(SAY_VOIDA);
+ Talk(SAY_VOIDB);
me->SetArmor(WV_ARMOR);
me->SetDisplayId(MODEL_VOIDWALKER);
me->SetObjectScale(defaultsize*2.5f);
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
index 2dbfb7b46c5..e87009737f1 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
@@ -32,42 +32,37 @@ EndScriptData */
enum eEnums
{
//kael'thas Speech
- SAY_INTRO = -1550016,
- SAY_INTRO_CAPERNIAN = -1550017,
- SAY_INTRO_TELONICUS = -1550018,
- SAY_INTRO_THALADRED = -1550019,
- SAY_INTRO_SANGUINAR = -1550020,
- SAY_PHASE2_WEAPON = -1550021,
- SAY_PHASE3_ADVANCE = -1550022,
- SAY_PHASE4_INTRO2 = -1550023,
- SAY_PHASE5_NUTS = -1550024,
- SAY_SLAY1 = -1550025,
- SAY_SLAY2 = -1550026,
- SAY_SLAY3 = -1550027,
- SAY_MINDCONTROL1 = -1550028,
- SAY_MINDCONTROL2 = -1550029,
- SAY_GRAVITYLAPSE1 = -1550030,
- SAY_GRAVITYLAPSE2 = -1550031,
- SAY_SUMMON_PHOENIX1 = -1550032,
- SAY_SUMMON_PHOENIX2 = -1550033,
- SAY_DEATH = -1550034,
+ SAY_INTRO = 0,
+ SAY_INTRO_CAPERNIAN = 1,
+ SAY_INTRO_TELONICUS = 2,
+ SAY_INTRO_THALADRED = 3,
+ SAY_INTRO_SANGUINAR = 4,
+ SAY_PHASE2_WEAPON = 5,
+ SAY_PHASE3_ADVANCE = 6,
+ SAY_PHASE4_INTRO2 = 7,
+ SAY_PHASE5_NUTS = 8,
+ SAY_SLAY = 9,
+ SAY_MINDCONTROL = 10,
+ SAY_GRAVITYLAPSE = 11,
+ SAY_SUMMON_PHOENIX = 12,
+ SAY_DEATH = 13,
//Thaladred the Darkener speech
- SAY_THALADRED_AGGRO = -1550035,
- SAY_THALADRED_DEATH = -1550036,
- EMOTE_THALADRED_GAZE = -1550037,
+ SAY_THALADRED_AGGRO = 0,
+ SAY_THALADRED_DEATH = 1,
+ EMOTE_THALADRED_GAZE = 2,
//Lord Sanguinar speech
- SAY_SANGUINAR_AGGRO = -1550038,
- SAY_SANGUINAR_DEATH = -1550039,
+ SAY_SANGUINAR_AGGRO = 0,
+ SAY_SANGUINAR_DEATH = 1,
//Grand Astromancer Capernian speech
- SAY_CAPERNIAN_AGGRO = -1550040,
- SAY_CAPERNIAN_DEATH = -1550041,
+ SAY_CAPERNIAN_AGGRO = 0,
+ SAY_CAPERNIAN_DEATH = 1,
//Master Engineer Telonicus speech
- SAY_TELONICUS_AGGRO = -1550042,
- SAY_TELONICUS_DEATH = -1550043,
+ SAY_TELONICUS_AGGRO = 0,
+ SAY_TELONICUS_DEATH = 1,
//Phase 2 spells
SPELL_SUMMON_WEAPONS = 36976,
@@ -369,7 +364,7 @@ class boss_kaelthas : public CreatureScript
{
sLog->outError(LOG_FILTER_TSCR, "Kael'Thas One or more advisors missing, Skipping Phases 1-3");
- DoScriptText(SAY_PHASE4_INTRO2, me);
+ Talk(SAY_PHASE4_INTRO2);
Phase = 4;
@@ -385,7 +380,7 @@ class boss_kaelthas : public CreatureScript
{
PrepareAdvisors();
- DoScriptText(SAY_INTRO, me);
+ Talk(SAY_INTRO);
instance->SetData(DATA_KAELTHASEVENT, 1);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
@@ -431,7 +426,7 @@ class boss_kaelthas : public CreatureScript
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3), me);
+ Talk(SAY_SLAY);
}
void JustSummoned(Creature* summoned)
@@ -456,7 +451,7 @@ class boss_kaelthas : public CreatureScript
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
summons.DespawnAll();
@@ -487,7 +482,7 @@ class boss_kaelthas : public CreatureScript
case 0:
if (Phase_Timer <= diff)
{
- DoScriptText(SAY_INTRO_THALADRED, me);
+ Talk(SAY_INTRO_THALADRED);
//start advisor within 7 seconds
Phase_Timer = 7000;
@@ -521,7 +516,7 @@ class boss_kaelthas : public CreatureScript
if (Advisor && (Advisor->getStandState() == UNIT_STAND_STATE_DEAD))
{
- DoScriptText(SAY_INTRO_SANGUINAR, me);
+ Talk(SAY_INTRO_SANGUINAR);
//start advisor within 12.5 seconds
Phase_Timer = 12500;
@@ -555,7 +550,7 @@ class boss_kaelthas : public CreatureScript
if (Advisor && (Advisor->getStandState() == UNIT_STAND_STATE_DEAD))
{
- DoScriptText(SAY_INTRO_CAPERNIAN, me);
+ Talk(SAY_INTRO_CAPERNIAN);
//start advisor within 7 seconds
Phase_Timer = 7000;
@@ -589,7 +584,7 @@ class boss_kaelthas : public CreatureScript
if (Advisor && (Advisor->getStandState() == UNIT_STAND_STATE_DEAD))
{
- DoScriptText(SAY_INTRO_TELONICUS, me);
+ Talk(SAY_INTRO_TELONICUS);
//start advisor within 8.4 seconds
Phase_Timer = 8400;
@@ -628,7 +623,7 @@ class boss_kaelthas : public CreatureScript
if (instance)
instance->SetData(DATA_KAELTHASEVENT, 2);
- DoScriptText(SAY_PHASE2_WEAPON, me);
+ Talk(SAY_PHASE2_WEAPON);
PhaseSubphase = 0;
Phase_Timer = 3500;
@@ -669,7 +664,7 @@ class boss_kaelthas : public CreatureScript
{
if (Phase_Timer <= diff)
{
- DoScriptText(SAY_PHASE3_ADVANCE, me);
+ Talk(SAY_PHASE3_ADVANCE);
if (instance)
instance->SetData(DATA_KAELTHASEVENT, 3);
Phase = 3;
@@ -705,7 +700,7 @@ class boss_kaelthas : public CreatureScript
if (Phase_Timer <= diff)
{
- DoScriptText(SAY_PHASE4_INTRO2, me);
+ Talk(SAY_PHASE4_INTRO2);
Phase = 4;
if (instance)
@@ -801,7 +796,7 @@ class boss_kaelthas : public CreatureScript
if (Phoenix_Timer <= diff)
{
DoCast(me, SPELL_PHOENIX_ANIMATION);
- DoScriptText(RAND(SAY_SUMMON_PHOENIX1, SAY_SUMMON_PHOENIX2), me);
+ Talk(SAY_SUMMON_PHOENIX);
Phoenix_Timer = 60000;
}
@@ -818,7 +813,7 @@ class boss_kaelthas : public CreatureScript
Phase = 5;
Phase_Timer = 10000;
- DoScriptText(SAY_PHASE5_NUTS, me);
+ Talk(SAY_PHASE5_NUTS);
me->StopMoving();
me->GetMotionMaster()->Clear();
@@ -913,7 +908,7 @@ class boss_kaelthas : public CreatureScript
break;
case 1:
- DoScriptText(RAND(SAY_GRAVITYLAPSE1, SAY_GRAVITYLAPSE2), me);
+ Talk(SAY_GRAVITYLAPSE);
// 2) At that point he will put a Gravity Lapse debuff on everyone
for (i = threatlist.begin(); i != threatlist.end(); ++i)
@@ -1041,14 +1036,14 @@ class boss_thaladred_the_darkener : public CreatureScript
if (!who || FakeDeath)
return;
- DoScriptText(SAY_THALADRED_AGGRO, me);
+ Talk(SAY_THALADRED_AGGRO);
me->AddThreat(who, 5000000.0f);
}
void JustDied(Unit* /*killer*/)
{
if (instance && instance->GetData(DATA_KAELTHASEVENT) == 3)
- DoScriptText(SAY_THALADRED_DEATH, me);
+ Talk(SAY_THALADRED_DEATH);
}
void UpdateAI(const uint32 diff)
@@ -1070,7 +1065,7 @@ class boss_thaladred_the_darkener : public CreatureScript
{
DoResetThreat();
me->AddThreat(target, 5000000.0f);
- DoScriptText(EMOTE_THALADRED_GAZE, me, target);
+ Talk(EMOTE_THALADRED_GAZE, target->GetGUID());
Gaze_Timer = 8500;
}
}
@@ -1134,13 +1129,13 @@ class boss_lord_sanguinar : public CreatureScript
if (!who || FakeDeath)
return;
- DoScriptText(SAY_SANGUINAR_AGGRO, me);
+ Talk(SAY_SANGUINAR_AGGRO);
}
void JustDied(Unit* /*killer*/)
{
if (instance && instance->GetData(DATA_KAELTHASEVENT) == 3)
- DoScriptText(SAY_SANGUINAR_DEATH, me);
+ Talk(SAY_SANGUINAR_DEATH);
}
void UpdateAI(const uint32 diff)
@@ -1205,7 +1200,7 @@ class boss_grand_astromancer_capernian : public CreatureScript
void JustDied(Unit* /*killer*/)
{
if (instance && instance->GetData(DATA_KAELTHASEVENT) == 3)
- DoScriptText(SAY_CAPERNIAN_DEATH, me);
+ Talk(SAY_CAPERNIAN_DEATH);
}
void AttackStart(Unit* who)
@@ -1249,7 +1244,7 @@ class boss_grand_astromancer_capernian : public CreatureScript
{
if (Yell_Timer <= diff)
{
- DoScriptText(SAY_CAPERNIAN_AGGRO, me);
+ Talk(SAY_CAPERNIAN_AGGRO);
Yell = true;
}
else
@@ -1344,7 +1339,7 @@ class boss_master_engineer_telonicus : public CreatureScript
void JustDied(Unit* /*killer*/)
{
if (instance && instance->GetData(DATA_KAELTHASEVENT) == 3)
- DoScriptText(SAY_TELONICUS_DEATH, me);
+ Talk(SAY_TELONICUS_DEATH);
}
void EnterCombat(Unit* who)
@@ -1355,7 +1350,7 @@ class boss_master_engineer_telonicus : public CreatureScript
if (!who || FakeDeath)
return;
- DoScriptText(SAY_TELONICUS_AGGRO, me);
+ Talk(SAY_TELONICUS_AGGRO);
}
void UpdateAI(const uint32 diff)
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 2c778485131..14895f1d898 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp
@@ -29,13 +29,10 @@ EndScriptData */
enum eEnums
{
- SAY_AGGRO = -1550000,
- SAY_SLAY1 = -1550001,
- SAY_SLAY2 = -1550002,
- SAY_SLAY3 = -1550003,
- SAY_DEATH = -1550004,
- SAY_POUNDING1 = -1550005,
- SAY_POUNDING2 = -1550006,
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_POUNDING = 3,
SPELL_POUNDING = 34162,
SPELL_ARCANE_ORB = 34172,
@@ -83,12 +80,12 @@ class boss_void_reaver : public CreatureScript
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
DoZoneInCombat();
if (instance)
@@ -97,7 +94,7 @@ class boss_void_reaver : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_VOIDREAVEREVENT, IN_PROGRESS);
@@ -111,7 +108,7 @@ class boss_void_reaver : public CreatureScript
if (Pounding_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_POUNDING);
- DoScriptText(RAND(SAY_POUNDING1, SAY_POUNDING2), me);
+ Talk(SAY_POUNDING);
Pounding_Timer = 15000; //cast time(3000) + cooldown time(12000)
}
else
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp
index 83acc1258be..15241e35a4a 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp
@@ -28,13 +28,11 @@ EndScriptData */
enum eSays
{
- SAY_AGGRO_1 = -1554006,
- SAY_HAMMER_1 = -1554007,
- SAY_HAMMER_2 = -1554008,
- SAY_SLAY_1 = -1554009,
- SAY_SLAY_2 = -1554010,
- SAY_DEATH_1 = -1554011,
- EMOTE_HAMMER = -1554012,
+ SAY_AGGRO = 0,
+ SAY_HAMMER = 1,
+ SAY_SLAY = 2,
+ SAY_DEATH = 3,
+ EMOTE_HAMMER = 4
};
enum eSpells
@@ -76,7 +74,7 @@ class boss_gatewatcher_iron_hand : public CreatureScript
}
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO_1, me);
+ Talk(SAY_AGGRO);
}
void KilledUnit(Unit* /*victim*/)
@@ -84,12 +82,12 @@ class boss_gatewatcher_iron_hand : public CreatureScript
if (rand()%2)
return;
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH_1, me);
+ Talk(SAY_DEATH);
//TODO: Add door check/open code
}
@@ -112,14 +110,14 @@ class boss_gatewatcher_iron_hand : public CreatureScript
if (Jackhammer_Timer <= diff)
{
//TODO: expect cast this about 5 times in a row (?), announce it by emote only once
- DoScriptText(EMOTE_HAMMER, me);
+ Talk(EMOTE_HAMMER);
DoCast(me->getVictim(), SPELL_JACKHAMMER);
//chance to yell, but not same time as emote (after spell in fact casted)
if (rand()%2)
- return;
+ return;
- DoScriptText(RAND(SAY_HAMMER_1, SAY_HAMMER_2), me);
+ Talk(SAY_HAMMER);
Jackhammer_Timer = 30000;
}
else
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp
index 02be844711d..1602ea56d93 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp
@@ -29,13 +29,11 @@ EndScriptData */
enum eSays
{
- SAY_AGGRO = -1554013,
- SAY_SUMMON = -1554014,
- SAY_DRAGONS_BREATH_1 = -1554015,
- SAY_DRAGONS_BREATH_2 = -1554016,
- SAY_SLAY1 = -1554017,
- SAY_SLAY2 = -1554018,
- SAY_DEATH = -1554019,
+ SAY_AGGRO = 0,
+ SAY_SUMMON = 1,
+ SAY_DRAGONS_BREATH = 2,
+ SAY_SLAY = 3,
+ SAY_DEATH = 4
};
enum eSpells
@@ -92,19 +90,19 @@ class boss_nethermancer_sepethrea : public CreatureScript
if (instance)
instance->SetData(DATA_NETHERMANCER_EVENT, IN_PROGRESS);
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
DoCast(who, SPELL_SUMMON_RAGIN_FLAMES);
- DoScriptText(SAY_SUMMON, me);
+ Talk(SAY_SUMMON);
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_NETHERMANCER_EVENT, DONE);
}
@@ -140,7 +138,7 @@ class boss_nethermancer_sepethrea : public CreatureScript
{
if (rand()%2)
return;
- DoScriptText(RAND(SAY_DRAGONS_BREATH_1, SAY_DRAGONS_BREATH_2), me);
+ Talk(SAY_DRAGONS_BREATH);
}
dragons_breath_Timer = urand(12000, 22000);
}
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp
index 622e6e6d7e6..adf1aac0639 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp
@@ -28,14 +28,12 @@ EndScriptData */
enum eSays
{
- SAY_AGGRO = -1554020,
- SAY_DOMINATION_1 = -1554021,
- SAY_DOMINATION_2 = -1554022,
- SAY_SUMMON = -1554023,
- SAY_ENRAGE = -1554024,
- SAY_SLAY_1 = -1554025,
- SAY_SLAY_2 = -1554026,
- SAY_DEATH = -1554027,
+ SAY_AGGRO = 0,
+ SAY_DOMINATION = 1,
+ SAY_SUMMON = 2,
+ SAY_ENRAGE = 3,
+ SAY_SLAY = 4,
+ SAY_DEATH = 5
};
// Spells to be casted
enum eSpells
@@ -96,17 +94,17 @@ class boss_pathaleon_the_calculator : public CreatureScript
}
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
summons.DespawnAll();
}
@@ -135,7 +133,7 @@ class boss_pathaleon_the_calculator : public CreatureScript
if (target && Wraith)
Wraith->AI()->AttackStart(target);
}
- DoScriptText(SAY_SUMMON, me);
+ Talk(SAY_SUMMON);
Summon_Timer = urand(30000, 45000);
}
else
@@ -161,7 +159,7 @@ class boss_pathaleon_the_calculator : public CreatureScript
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
{
- DoScriptText(RAND(SAY_DOMINATION_1, SAY_DOMINATION_2), me);
+ Talk(SAY_DOMINATION);
DoCast(target, SPELL_DOMINATION);
}
Domination_Timer = urand(25000, 30000);
@@ -184,7 +182,7 @@ class boss_pathaleon_the_calculator : public CreatureScript
if (!Enraged && HealthBelowPct(21))
{
DoCast(me, SPELL_FRENZY);
- DoScriptText(SAY_ENRAGE, me);
+ Talk(SAY_ENRAGE);
Enraged = true;
}
diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp
index 730bab7e626..8a107090a28 100644
--- a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp
+++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp
@@ -34,16 +34,13 @@ EndContentData */
enum eSays
{
- SAY_INTRO = -1552000,
- SAY_AGGRO = -1552001,
- SAY_KILL_1 = -1552002,
- SAY_KILL_2 = -1552003,
- SAY_MIND_1 = -1552004,
- SAY_MIND_2 = -1552005,
- SAY_FEAR_1 = -1552006,
- SAY_FEAR_2 = -1552007,
- SAY_IMAGE = -1552008,
- SAY_DEATH = -1552009,
+ SAY_INTRO = 0,
+ SAY_AGGRO = 1,
+ SAY_KILL = 2,
+ SAY_MIND = 3,
+ SAY_FEAR = 4,
+ SAY_IMAGE = 5,
+ SAY_DEATH = 6
};
enum eSpells
@@ -115,7 +112,7 @@ class boss_harbinger_skyriss : public CreatureScript
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(TYPE_HARBINGERSKYRISS, DONE);
}
@@ -139,7 +136,7 @@ class boss_harbinger_skyriss : public CreatureScript
if (victim->GetEntry() == 21436)
return;
- DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2), me);
+ Talk(SAY_KILL);
}
void DoSplit(uint32 val)
@@ -147,7 +144,7 @@ class boss_harbinger_skyriss : public CreatureScript
if (me->IsNonMeleeSpellCasted(false))
me->InterruptNonMeleeSpells(false);
- DoScriptText(SAY_IMAGE, me);
+ Talk(SAY_IMAGE);
if (val == 66)
DoCast(me, SPELL_66_ILLUSION);
@@ -167,13 +164,13 @@ class boss_harbinger_skyriss : public CreatureScript
switch (Intro_Phase)
{
case 1:
- DoScriptText(SAY_INTRO, me);
+ Talk(SAY_INTRO);
instance->HandleGameObject(instance->GetData64(DATA_SPHERE_SHIELD), true);
++Intro_Phase;
Intro_Timer = 25000;
break;
case 2:
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (Unit* mellic = Unit::GetUnit(*me, instance->GetData64(DATA_MELLICHAR)))
{
//should have a better way to do this. possibly spell exist.
@@ -224,7 +221,7 @@ class boss_harbinger_skyriss : public CreatureScript
if (me->IsNonMeleeSpellCasted(false))
return;
- DoScriptText(RAND(SAY_FEAR_1, SAY_FEAR_2), me);
+ Talk(SAY_FEAR);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
DoCast(target, SPELL_FEAR);
@@ -241,7 +238,7 @@ class boss_harbinger_skyriss : public CreatureScript
if (me->IsNonMeleeSpellCasted(false))
return;
- DoScriptText(RAND(SAY_MIND_1, SAY_MIND_2), me);
+ Talk(SAY_MIND);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
DoCast(target, SPELL_DOMINATION);
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 a53f62c96f4..4288061860e 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
@@ -28,12 +28,10 @@ EndScriptData */
enum eSays
{
- SAY_AGGRO = -1553000,
- SAY_KILL_1 = -1553001,
- SAY_KILL_2 = -1553002,
- SAY_TREE_1 = -1553003,
- SAY_TREE_2 = -1553004,
- SAY_DEATH = -1553005,
+ SAY_AGGRO = 0,
+ SAY_KILL = 1,
+ SAY_TREE = 2,
+ SAY_DEATH = 3
};
enum eSpells
@@ -83,7 +81,7 @@ class boss_high_botanist_freywinn : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void JustSummoned(Creature* summoned)
@@ -105,12 +103,12 @@ class boss_high_botanist_freywinn : public CreatureScript
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2), me);
+ Talk(SAY_KILL);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void UpdateAI(const uint32 diff)
@@ -120,7 +118,7 @@ class boss_high_botanist_freywinn : public CreatureScript
if (TreeForm_Timer <= diff)
{
- DoScriptText(RAND(SAY_TREE_1, SAY_TREE_2), me);
+ Talk(SAY_TREE);
if (me->IsNonMeleeSpellCasted(false))
me->InterruptNonMeleeSpells(true);
diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp
index ed04c42edc7..3bda920fdeb 100644
--- a/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp
+++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp
@@ -42,7 +42,7 @@ enum eSpells
};
enum eOthers
{
- EMOTE_SUMMON = -1553006,
+ EMOTE_SUMMON = 0,
MODEL_DEFAULT = 13109,
MODEL_ARCANE = 14213,
MODEL_FIRE = 13110,
@@ -175,7 +175,7 @@ class boss_laj : public CreatureScript
{
if (Summon_Timer <= diff)
{
- DoScriptText(EMOTE_SUMMON, me);
+ Talk(EMOTE_SUMMON);
DoSummons();
Summon_Timer = 2500;
}
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 2937a5b9987..74f10f97754 100644
--- a/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp
+++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp
@@ -28,12 +28,10 @@ EndScriptData */
enum eSays
{
- SAY_AGGRO = -1553007,
- SAY_SLAY_1 = -1553008,
- SAY_SLAY_2 = -1553009,
- SAY_SUMMON_1 = -1553010,
- SAY_SUMMON_2 = -1553011,
- SAY_DEATH = -1553012,
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_SUMMON = 2,
+ SAY_DEATH = 3
};
enum eSpells
@@ -162,17 +160,17 @@ class boss_warp_splinter : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void SummonTreants()
@@ -188,7 +186,7 @@ class boss_warp_splinter : public CreatureScript
if (Creature* pTreant = me->SummonCreature(CREATURE_TREANT, treant_pos[i][0], treant_pos[i][1], treant_pos[i][2], O, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 25000))
CAST_AI(mob_warp_splinter_treant::mob_warp_splinter_treantAI, pTreant->AI())->WarpGuid = me->GetGUID();
}
- DoScriptText(RAND(SAY_SUMMON_1, SAY_SUMMON_2), me);
+ Talk(SAY_SUMMON);
}
void UpdateAI(const uint32 diff)
diff --git a/src/server/scripts/Outland/blades_edge_mountains.cpp b/src/server/scripts/Outland/blades_edge_mountains.cpp
index c263ac85ef5..3932b96ad07 100644
--- a/src/server/scripts/Outland/blades_edge_mountains.cpp
+++ b/src/server/scripts/Outland/blades_edge_mountains.cpp
@@ -87,11 +87,12 @@ public:
enum eNetherdrake
{
- SAY_NIHIL_1 = -1000169, //signed for 5955
- SAY_NIHIL_2 = -1000170, //signed for 5955
- SAY_NIHIL_3 = -1000171, //signed for 5955
- SAY_NIHIL_4 = -1000172, //signed for 20021, used by 20021, 21817, 21820, 21821, 21823
- SAY_NIHIL_INTERRUPT = -1000173, //signed for 20021, used by 20021, 21817, 21820, 21821, 21823
+ //Used by 20021, 21817, 21820, 21821, 21823 but not existing in database
+ SAY_NIHIL_1 = 0,
+ SAY_NIHIL_2 = 1,
+ SAY_NIHIL_3 = 2,
+ SAY_NIHIL_4 = 3,
+ SAY_NIHIL_INTERRUPT = 4,
ENTRY_WHELP = 20021,
ENTRY_PROTO = 21821,
@@ -176,7 +177,7 @@ public:
//we are nihil, so say before transform
if (me->GetEntry() == ENTRY_NIHIL)
{
- DoScriptText(SAY_NIHIL_INTERRUPT, me);
+ Talk(SAY_NIHIL_INTERRUPT);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
IsNihil = false;
}
@@ -203,19 +204,19 @@ public:
switch (NihilSpeech_Phase)
{
case 0:
- DoScriptText(SAY_NIHIL_1, me);
+ Talk(SAY_NIHIL_1);
++NihilSpeech_Phase;
break;
case 1:
- DoScriptText(SAY_NIHIL_2, me);
+ Talk(SAY_NIHIL_2);
++NihilSpeech_Phase;
break;
case 2:
- DoScriptText(SAY_NIHIL_3, me);
+ Talk(SAY_NIHIL_3);
++NihilSpeech_Phase;
break;
case 3:
- DoScriptText(SAY_NIHIL_4, me);
+ Talk(SAY_NIHIL_4);
++NihilSpeech_Phase;
break;
case 4:
@@ -266,7 +267,7 @@ public:
enum eDaranelle
{
- SAY_SPELL_INFLUENCE = -1000174,
+ SAY_SPELL_INFLUENCE = 0,
SPELL_LASHHAN_CHANNEL = 36904
};
@@ -294,7 +295,7 @@ public:
{
if (who->HasAura(SPELL_LASHHAN_CHANNEL) && me->IsWithinDistInMap(who, 10.0f))
{
- DoScriptText(SAY_SPELL_INFLUENCE, me, who);
+ Talk(SAY_SPELL_INFLUENCE, who->GetGUID());
//TODO: Move the below to updateAI and run if this statement == true
DoCast(who, 37028, true);
}
diff --git a/src/server/scripts/Outland/hellfire_peninsula.cpp b/src/server/scripts/Outland/hellfire_peninsula.cpp
index 4da98281eb2..7ac90320347 100644
--- a/src/server/scripts/Outland/hellfire_peninsula.cpp
+++ b/src/server/scripts/Outland/hellfire_peninsula.cpp
@@ -46,8 +46,8 @@ EndContentData */
enum eAeranas
{
- SAY_SUMMON = -1000138,
- SAY_FREE = -1000139,
+ SAY_SUMMON = 0,
+ SAY_FREE = 1,
FACTION_HOSTILE = 16,
FACTION_FRIENDLY = 35,
@@ -85,7 +85,7 @@ public:
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
me->setFaction(FACTION_FRIENDLY);
- DoScriptText(SAY_SUMMON, me);
+ Talk(SAY_SUMMON);
}
void UpdateAI(const uint32 diff)
@@ -109,7 +109,7 @@ public:
me->RemoveAllAuras();
me->DeleteThreatList();
me->CombatStop(true);
- DoScriptText(SAY_FREE, me);
+ Talk(SAY_FREE);
return;
}
@@ -136,9 +136,9 @@ public:
enum eAncestralWolf
{
- EMOTE_WOLF_LIFT_HEAD = -1000496,
- EMOTE_WOLF_HOWL = -1000497,
- SAY_WOLF_WELCOME = -1000498,
+ EMOTE_WOLF_LIFT_HEAD = 0,
+ EMOTE_WOLF_HOWL = 1,
+ SAY_WOLF_WELCOME = 2,
SPELL_ANCESTRAL_WOLF_BUFF = 29981,
@@ -168,7 +168,7 @@ public:
Reset();
}
- Unit* pRyga;
+ Creature* pRyga;
void Reset()
{
@@ -178,8 +178,9 @@ public:
void MoveInLineOfSight(Unit* who)
{
- if (!pRyga && who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == NPC_RYGA && me->IsWithinDistInMap(who, 15.0f))
- pRyga = who;
+ if (!pRyga && who->GetEntry() == NPC_RYGA && me->IsWithinDistInMap(who, 15.0f))
+ if (Creature* temp = who->ToCreature())
+ pRyga = temp;
npc_escortAI::MoveInLineOfSight(who);
}
@@ -189,14 +190,14 @@ public:
switch (waypointId)
{
case 0:
- DoScriptText(EMOTE_WOLF_LIFT_HEAD, me);
+ Talk(EMOTE_WOLF_LIFT_HEAD);
break;
case 2:
- DoScriptText(EMOTE_WOLF_HOWL, me);
+ Talk(EMOTE_WOLF_HOWL);
break;
case 50:
if (pRyga && pRyga->isAlive() && !pRyga->isInCombat())
- DoScriptText(SAY_WOLF_WELCOME, pRyga);
+ pRyga->AI()->Talk(SAY_WOLF_WELCOME);
break;
}
}
@@ -368,12 +369,12 @@ public:
enum eWoundedBloodElf
{
- SAY_ELF_START = -1000117,
- SAY_ELF_SUMMON1 = -1000118,
- SAY_ELF_RESTING = -1000119,
- SAY_ELF_SUMMON2 = -1000120,
- SAY_ELF_COMPLETE = -1000121,
- SAY_ELF_AGGRO = -1000122,
+ SAY_ELF_START = 0,
+ SAY_ELF_SUMMON1 = 1,
+ SAY_ELF_RESTING = 2,
+ SAY_ELF_SUMMON2 = 3,
+ SAY_ELF_COMPLETE = 4,
+ SAY_ELF_AGGRO = 5,
QUEST_ROAD_TO_FALCON_WATCH = 9375
};
@@ -415,25 +416,25 @@ public:
switch (waypointId)
{
case 0:
- DoScriptText(SAY_ELF_START, me, player);
+ Talk(SAY_ELF_START, player->GetGUID());
break;
case 9:
- DoScriptText(SAY_ELF_SUMMON1, me, player);
+ Talk(SAY_ELF_SUMMON1, player->GetGUID());
// Spawn two Haal'eshi Talonguard
DoSpawnCreature(16967, -15, -15, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
DoSpawnCreature(16967, -17, -17, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
break;
case 13:
- DoScriptText(SAY_ELF_RESTING, me, player);
+ Talk(SAY_ELF_RESTING, player->GetGUID());
break;
case 14:
- DoScriptText(SAY_ELF_SUMMON2, me, player);
+ Talk(SAY_ELF_SUMMON2, player->GetGUID());
// Spawn two Haal'eshi Windwalker
DoSpawnCreature(16966, -15, -15, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
DoSpawnCreature(16966, -17, -17, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
break;
case 27:
- DoScriptText(SAY_ELF_COMPLETE, me, player);
+ Talk(SAY_ELF_COMPLETE, player->GetGUID());
// Award quest credit
player->GroupEventHappens(QUEST_ROAD_TO_FALCON_WATCH, me);
break;
@@ -445,7 +446,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
if (HasEscortState(STATE_ESCORT_ESCORTING))
- DoScriptText(SAY_ELF_AGGRO, me);
+ Talk(SAY_ELF_AGGRO);
}
void JustSummoned(Creature* summoned)
diff --git a/src/server/scripts/Outland/nagrand.cpp b/src/server/scripts/Outland/nagrand.cpp
index 0c9a60603f5..54565553e94 100644
--- a/src/server/scripts/Outland/nagrand.cpp
+++ b/src/server/scripts/Outland/nagrand.cpp
@@ -149,13 +149,13 @@ public:
enum eMagharCaptive
{
- SAY_MAG_START = -1000482,
- SAY_MAG_NO_ESCAPE = -1000483,
- SAY_MAG_MORE = -1000484,
- SAY_MAG_MORE_REPLY = -1000485,
- SAY_MAG_LIGHTNING = -1000486,
- SAY_MAG_SHOCK = -1000487,
- SAY_MAG_COMPLETE = -1000488,
+ SAY_MAG_START = 0,
+ SAY_MAG_NO_ESCAPE = 0,
+ SAY_MAG_MORE = 1,
+ SAY_MAG_MORE_REPLY = 0,
+ SAY_MAG_LIGHTNING = 2,
+ SAY_MAG_SHOCK = 3,
+ SAY_MAG_COMPLETE = 4,
SPELL_CHAIN_LIGHTNING = 16006,
SPELL_EARTHBIND_TOTEM = 15786,
@@ -189,7 +189,7 @@ public:
pEscortAI->Start(true, false, player->GetGUID(), quest);
- DoScriptText(SAY_MAG_START, creature);
+ creature->AI()->Talk(SAY_MAG_START);
creature->SummonCreature(NPC_MURK_RAIDER, m_afAmbushA[0]+2.5f, m_afAmbushA[1]-2.5f, m_afAmbushA[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
creature->SummonCreature(NPC_MURK_PUTRIFIER, m_afAmbushA[0]-2.5f, m_afAmbushA[1]+2.5f, m_afAmbushA[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
@@ -229,17 +229,17 @@ public:
switch (waypointId)
{
case 7:
- DoScriptText(SAY_MAG_MORE, me);
+ Talk(SAY_MAG_MORE);
if (Creature* temp = me->SummonCreature(NPC_MURK_PUTRIFIER, m_afAmbushB[0], m_afAmbushB[1], m_afAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000))
- DoScriptText(SAY_MAG_MORE_REPLY, temp);
+ temp->AI()->Talk(SAY_MAG_MORE_REPLY);
me->SummonCreature(NPC_MURK_PUTRIFIER, m_afAmbushB[0]-2.5f, m_afAmbushB[1]-2.5f, m_afAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
me->SummonCreature(NPC_MURK_SCAVENGER, m_afAmbushB[0]+2.5f, m_afAmbushB[1]+2.5f, m_afAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
me->SummonCreature(NPC_MURK_SCAVENGER, m_afAmbushB[0]+2.5f, m_afAmbushB[1]-2.5f, m_afAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
break;
case 16:
- DoScriptText(SAY_MAG_COMPLETE, me);
+ Talk(SAY_MAG_COMPLETE);
if (Player* player = GetPlayerForEscort())
player->GroupEventHappens(QUEST_TOTEM_KARDASH_H, me);
@@ -252,7 +252,7 @@ public:
void JustSummoned(Creature* summoned)
{
if (summoned->GetEntry() == NPC_MURK_BRUTE)
- DoScriptText(SAY_MAG_NO_ESCAPE, summoned);
+ summoned->AI()->Talk(SAY_MAG_NO_ESCAPE);
if (summoned->isTotem())
return;
@@ -270,7 +270,7 @@ public:
if (rand()%10)
return;
- DoScriptText(SAY_MAG_LIGHTNING, me);
+ Talk(SAY_MAG_LIGHTNING);
}
}
@@ -367,18 +367,18 @@ enum CorkiData
NPC_CORKI = 18445,
NPC_CORKI_CREDIT_1 = 18369,
GO_CORKIS_PRISON = 182349,
- CORKI_SAY_THANKS = -1800071,
+ CORKI_SAY_THANKS = 0,
// 2nd quest
QUEST_CORKIS_GONE_MISSING_AGAIN = 9924,
NPC_CORKI_2 = 20812,
GO_CORKIS_PRISON_2 = 182350,
- CORKI_SAY_PROMISE = -1800072,
+ CORKI_SAY_PROMISE = 0,
// 3rd quest
QUEST_CHOWAR_THE_PILLAGER = 9955,
NPC_CORKI_3 = 18369,
NPC_CORKI_CREDIT_3 = 18444,
GO_CORKIS_PRISON_3 = 182521,
- CORKI_SAY_LAST = -1800073
+ CORKI_SAY_LAST = 0
};
class go_corkis_prison : public GameObjectScript
@@ -468,11 +468,11 @@ public:
Say_Timer = 5000;
ReleasedFromCage = true;
if (me->GetEntry() == NPC_CORKI)
- DoScriptText(CORKI_SAY_THANKS, me);
+ Talk(CORKI_SAY_THANKS);
if (me->GetEntry() == NPC_CORKI_2)
- DoScriptText(CORKI_SAY_PROMISE, me);
+ Talk(CORKI_SAY_PROMISE);
if (me->GetEntry() == NPC_CORKI_3)
- DoScriptText(CORKI_SAY_LAST, me);
+ Talk(CORKI_SAY_LAST);
}
};
};
@@ -521,7 +521,7 @@ public:
{
creature->SetStandState(UNIT_STAND_STATE_STAND);
EscortAI->Start(true, false, player->GetGUID(), quest);
- DoScriptText(SAY_KUR_START, creature);
+ creature->AI()->Talk(SAY_KUR_START);
creature->SummonCreature(NPC_KUR_MURK_RAIDER, kurenaiAmbushA[0]+2.5f, kurenaiAmbushA[1]-2.5f, kurenaiAmbushA[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
creature->SummonCreature(NPC_KUR_MURK_BRUTE, kurenaiAmbushA[0]-2.5f, kurenaiAmbushA[1]+2.5f, kurenaiAmbushA[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
diff --git a/src/server/scripts/Outland/netherstorm.cpp b/src/server/scripts/Outland/netherstorm.cpp
index eaea4960712..7bec3674a84 100644
--- a/src/server/scripts/Outland/netherstorm.cpp
+++ b/src/server/scripts/Outland/netherstorm.cpp
@@ -45,12 +45,12 @@ EndContentData */
//used by 20209, 20417, 20418, 20440, signed for 20209
enum eManaforgeConsoleData
{
- EMOTE_START = -1000211,
- EMOTE_60 = -1000212,
- EMOTE_30 = -1000213,
- EMOTE_10 = -1000214,
- EMOTE_COMPLETE = -1000215,
- EMOTE_ABORT = -1000216,
+ EMOTE_START = 0,
+ EMOTE_60 = 1,
+ EMOTE_30 = 2,
+ EMOTE_10 = 3,
+ EMOTE_COMPLETE = 4,
+ EMOTE_ABORT = 5,
ENTRY_BNAAR_C_CONSOLE = 20209,
ENTRY_CORUU_C_CONSOLE = 20417,
@@ -114,7 +114,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(EMOTE_ABORT, me);
+ Talk(EMOTE_ABORT);
if (someplayer)
{
@@ -247,31 +247,32 @@ public:
if (someplayer)
{
Unit* u = Unit::GetUnit(*me, someplayer);
- if (u && u->GetTypeId() == TYPEID_PLAYER) DoScriptText(EMOTE_START, me, u);
+ if (u && u->GetTypeId() == TYPEID_PLAYER)
+ Talk(EMOTE_START, u->GetGUID());
}
Event_Timer = 60000;
Wave = true;
++Phase;
break;
case 2:
- DoScriptText(EMOTE_60, me);
+ Talk(EMOTE_60);
Event_Timer = 30000;
++Phase;
break;
case 3:
- DoScriptText(EMOTE_30, me);
+ Talk(EMOTE_30);
Event_Timer = 20000;
DoFinalSpawnForCreature(me);
++Phase;
break;
case 4:
- DoScriptText(EMOTE_10, me);
+ Talk(EMOTE_10);
Event_Timer = 10000;
Wave = false;
++Phase;
break;
case 5:
- DoScriptText(EMOTE_COMPLETE, me);
+ Talk(EMOTE_COMPLETE);
if (someplayer)
{
Unit* u = Unit::GetUnit(*me, someplayer);
@@ -361,17 +362,19 @@ public:
// The Speech of Dawnforge, Ardonis & Pathaleon
enum eCommanderDawnforgeData
{
- SAY_COMMANDER_DAWNFORGE_1 = -1000128,
- SAY_ARCANIST_ARDONIS_1 = -1000129,
- SAY_COMMANDER_DAWNFORGE_2 = -1000130,
- SAY_PATHALEON_CULATOR_IMAGE_1 = -1000131,
- SAY_COMMANDER_DAWNFORGE_3 = -1000132,
- SAY_PATHALEON_CULATOR_IMAGE_2 = -1000133,
- SAY_PATHALEON_CULATOR_IMAGE_2_1 = -1000134,
- SAY_PATHALEON_CULATOR_IMAGE_2_2 = -1000135,
- SAY_COMMANDER_DAWNFORGE_4 = -1000136,
- SAY_ARCANIST_ARDONIS_2 = -1000136,
- SAY_COMMANDER_DAWNFORGE_5 = -1000137,
+ SAY_COMMANDER_DAWNFORGE_1 = 0,
+ SAY_COMMANDER_DAWNFORGE_2 = 1,
+ SAY_COMMANDER_DAWNFORGE_3 = 2,
+ SAY_COMMANDER_DAWNFORGE_4 = 3,
+ SAY_COMMANDER_DAWNFORGE_5 = 4,
+
+ SAY_ARCANIST_ARDONIS_1 = 0,
+ SAY_ARCANIST_ARDONIS_2 = 1,
+
+ SAY_PATHALEON_CULATOR_IMAGE_1 = 0,
+ SAY_PATHALEON_CULATOR_IMAGE_2 = 1,
+ SAY_PATHALEON_CULATOR_IMAGE_2_1 = 2,
+ SAY_PATHALEON_CULATOR_IMAGE_2_2 = 3,
QUEST_INFO_GATHERING = 10198,
SPELL_SUNFURY_DISGUISE = 34603,
@@ -516,8 +519,8 @@ public:
return;
}
- Unit* ardonis = Unit::GetUnit(*me, ardonisGUID);
- Unit* pathaleon = Unit::GetUnit(*me, pathaleonGUID);
+ Creature* ardonis = Creature::GetCreature(*me, ardonisGUID);
+ Creature* pathaleon = Creature::GetCreature(*me, pathaleonGUID);
Player* player = Unit::GetPlayer(*me, PlayerGUID);
if (!ardonis || !player)
@@ -536,19 +539,19 @@ public:
switch (Phase)
{
case 1:
- DoScriptText(SAY_COMMANDER_DAWNFORGE_1, me);
+ Talk(SAY_COMMANDER_DAWNFORGE_1);
++Phase;
Phase_Timer = 16000;
break;
//Phase 2 Ardonis say
case 2:
- DoScriptText(SAY_ARCANIST_ARDONIS_1, ardonis);
+ ardonis->AI()->Talk(SAY_ARCANIST_ARDONIS_1);
++Phase;
Phase_Timer = 16000;
break;
//Phase 3 Dawnforge say
case 3:
- DoScriptText(SAY_COMMANDER_DAWNFORGE_2, me);
+ Talk(SAY_COMMANDER_DAWNFORGE_2);
++Phase;
Phase_Timer = 16000;
break;
@@ -561,7 +564,7 @@ public:
break;
//Phase 5 Pathaleon say
case 5:
- DoScriptText(SAY_PATHALEON_CULATOR_IMAGE_1, pathaleon);
+ pathaleon->AI()->Talk(SAY_PATHALEON_CULATOR_IMAGE_1);
++Phase;
Phase_Timer = 6000;
break;
@@ -577,7 +580,7 @@ public:
break;
//Subphase 2 Dawnforge say
case 1:
- DoScriptText(SAY_COMMANDER_DAWNFORGE_3, me);
+ Talk(SAY_COMMANDER_DAWNFORGE_3);
PhaseSubphase = 0;
++Phase;
Phase_Timer = 8000;
@@ -590,19 +593,19 @@ public:
{
//Subphase 1
case 0:
- DoScriptText(SAY_PATHALEON_CULATOR_IMAGE_2, pathaleon);
+ pathaleon->AI()->Talk(SAY_PATHALEON_CULATOR_IMAGE_2);
++PhaseSubphase;
Phase_Timer = 12000;
break;
//Subphase 2
case 1:
- DoScriptText(SAY_PATHALEON_CULATOR_IMAGE_2_1, pathaleon);
+ pathaleon->AI()->Talk(SAY_PATHALEON_CULATOR_IMAGE_2_1);
++PhaseSubphase;
Phase_Timer = 16000;
break;
//Subphase 3
case 2:
- DoScriptText(SAY_PATHALEON_CULATOR_IMAGE_2_2, pathaleon);
+ pathaleon->AI()->Talk(SAY_PATHALEON_CULATOR_IMAGE_2_2);
PhaseSubphase = 0;
++Phase;
Phase_Timer = 10000;
@@ -611,8 +614,8 @@ public:
break;
//Phase 8 Dawnforge & Ardonis say
case 8:
- DoScriptText(SAY_COMMANDER_DAWNFORGE_4, me);
- DoScriptText(SAY_ARCANIST_ARDONIS_2, ardonis);
+ Talk(SAY_COMMANDER_DAWNFORGE_4);
+ ardonis->AI()->Talk(SAY_ARCANIST_ARDONIS_2);
++Phase;
Phase_Timer = 4000;
break;
@@ -627,7 +630,7 @@ public:
break;
//Phase 10 Dawnforge say
case 10:
- DoScriptText(SAY_COMMANDER_DAWNFORGE_5, me);
+ Talk(SAY_COMMANDER_DAWNFORGE_5);
player->AreaExploredOrEventHappens(QUEST_INFO_GATHERING);
Reset();
break;
@@ -667,7 +670,7 @@ enum eProfessorDabiriData
{
SPELL_PHASE_DISTRUPTOR = 35780,
- WHISPER_DABIRI = -1000522,
+ //WHISPER_DABIRI = 0, not existing in database
QUEST_DIMENSIUS = 10439,
QUEST_ON_NETHERY_WINGS = 10438,
@@ -680,13 +683,9 @@ class npc_professor_dabiri : public CreatureScript
public:
npc_professor_dabiri() : CreatureScript("npc_professor_dabiri") { }
- bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest)
- {
- if (quest->GetQuestId() == QUEST_DIMENSIUS)
- DoScriptText(WHISPER_DABIRI, creature, player);
-
- return true;
- }
+ //OnQuestAccept:
+ //if (quest->GetQuestId() == QUEST_DIMENSIUS)
+ //creature->AI()->Talk(WHISPER_DABIRI, player->GetGUID());
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
{
@@ -725,7 +724,7 @@ enum ePhaseHunterData
NPC_PHASE_HUNTER_ENTRY = 18879,
NPC_DRAINED_PHASE_HUNTER_ENTRY = 19595,
- EMOTE_WEAK = -1000303,
+ EMOTE_WEAK = 0,
// Spells
SPELL_RECHARGING_BATTERY = 34219,
@@ -827,7 +826,7 @@ public:
if (!Weak && HealthBelowPct(WeakPercent)
&& player->GetQuestStatus(QUEST_RECHARGING_THE_BATTERIES) == QUEST_STATUS_INCOMPLETE)
{
- DoScriptText(EMOTE_WEAK, me);
+ Talk(EMOTE_WEAK);
Weak = true;
}
if (Weak && !Drained && me->HasAura(SPELL_RECHARGING_BATTERY))
@@ -857,8 +856,8 @@ enum eBessyData
N_THADELL = 20464,
SPAWN_FIRST = 20512,
SPAWN_SECOND = 19881,
- SAY_THADELL_1 = -1000524,
- SAY_THADELL_2 = -1000525,
+ SAY_THADELL_1 = 0,
+ SAY_THADELL_2 = 1,
};
class npc_bessy : public CreatureScript
@@ -912,11 +911,11 @@ public:
case 12:
player->GroupEventHappens(Q_ALMABTRIEB, me);
if (me->FindNearestCreature(N_THADELL, 30))
- DoScriptText(SAY_THADELL_1, me);
+ Talk(SAY_THADELL_1);
break;
case 13:
if (me->FindNearestCreature(N_THADELL, 30))
- DoScriptText(SAY_THADELL_2, me, player);
+ Talk(SAY_THADELL_2, player->GetGUID());
break;
}
}
diff --git a/src/server/scripts/Outland/shadowmoon_valley.cpp b/src/server/scripts/Outland/shadowmoon_valley.cpp
index dc91fb2c14f..65a4dbe92a5 100644
--- a/src/server/scripts/Outland/shadowmoon_valley.cpp
+++ b/src/server/scripts/Outland/shadowmoon_valley.cpp
@@ -55,7 +55,7 @@ EndContentData */
enum eMatureNetherwing
{
- SAY_JUST_EATEN = -1000175,
+ SAY_JUST_EATEN = 0,
SPELL_PLACE_CARCASS = 38439,
SPELL_JUST_EATEN = 38502,
@@ -152,7 +152,7 @@ public:
else if (bIsEating)
{
DoCast(me, SPELL_JUST_EATEN);
- DoScriptText(SAY_JUST_EATEN, me);
+ Talk(SAY_JUST_EATEN);
if (Player* pPlr = Unit::GetPlayer(*me, uiPlayerGUID))
{
@@ -674,25 +674,25 @@ enum eOverlordData
SPELL_THREE = 40216, // Dragonaw Faction
SPELL_FOUR = 42016, // Dragonaw Trasform
- OVERLORD_SAY_1 = -1000606,
- OVERLORD_SAY_2 = -1000607,
- OVERLORD_SAY_3 = -1000608, //signed for 28315
- OVERLORD_SAY_4 = -1000609,
- OVERLORD_SAY_5 = -1000610,
- OVERLORD_SAY_6 = -1000611,
-
- OVERLORD_YELL_1 = -1000612,
- OVERLORD_YELL_2 = -1000613,
-
- LORD_ILLIDAN_SAY_1 = -1000614,
- LORD_ILLIDAN_SAY_2 = -1000615,
- LORD_ILLIDAN_SAY_3 = -1000616,
- LORD_ILLIDAN_SAY_4 = -1000617,
- LORD_ILLIDAN_SAY_5 = -1000618,
- LORD_ILLIDAN_SAY_6 = -1000619,
- LORD_ILLIDAN_SAY_7 = -1000620,
-
- YARZILL_THE_MERC_SAY = -1000621,
+ OVERLORD_SAY_1 = 0,
+ OVERLORD_SAY_2 = 1,
+ //OVERLORD_SAY_3 = 2,
+ OVERLORD_SAY_4 = 3,
+ OVERLORD_SAY_5 = 4,
+ OVERLORD_SAY_6 = 5,
+
+ OVERLORD_YELL_1 = 6,
+ OVERLORD_YELL_2 = 7,
+
+ LORD_ILLIDAN_SAY_1 = 0,
+ LORD_ILLIDAN_SAY_2 = 1,
+ LORD_ILLIDAN_SAY_3 = 2,
+ LORD_ILLIDAN_SAY_4 = 3,
+ LORD_ILLIDAN_SAY_5 = 4,
+ LORD_ILLIDAN_SAY_6 = 5,
+ LORD_ILLIDAN_SAY_7 = 6,
+
+ YARZILL_THE_MERC_SAY = 0
};
class npc_overlord_morghor : public CreatureScript
@@ -754,7 +754,7 @@ public:
{
Player* player = Unit::GetPlayer(*me, PlayerGUID);
if (player)
- DoScriptText(OVERLORD_SAY_1, me, player);
+ Talk(OVERLORD_SAY_1, player->GetGUID());
}
ConversationTimer = 4200;
Step = 0;
@@ -764,7 +764,7 @@ public:
uint32 NextStep(uint32 Step)
{
Player* player = Unit::GetPlayer(*me, PlayerGUID);
- Unit* Illi = Unit::GetUnit(*me, IllidanGUID);
+ Creature* Illi = Creature::GetCreature(*me, IllidanGUID);
if (!player || !Illi)
{
@@ -782,7 +782,7 @@ public:
return 9000;
break;
case 2:
- DoScriptText(OVERLORD_YELL_1, me, player);
+ Talk(OVERLORD_YELL_1, player->GetGUID());
return 4500;
break;
case 3:
@@ -790,7 +790,7 @@ public:
return 3200;
break;
case 4:
- DoScriptText(OVERLORD_SAY_2, me, player);
+ Talk(OVERLORD_SAY_2, player->GetGUID());
return 2000;
break;
case 5:
@@ -805,31 +805,27 @@ public:
return 2000;
break;
case 7:
- DoScriptText(OVERLORD_YELL_2, me);
+ Talk(OVERLORD_YELL_2);
return 4500;
break;
case 8:
me->SetUInt32Value(UNIT_FIELD_BYTES_1, 8);
- return 2500;
- break;
- case 9:
- DoScriptText(OVERLORD_SAY_3, me);
- return 6500;
+ return 9000;
break;
case 10:
- DoScriptText(LORD_ILLIDAN_SAY_1, Illi);
+ Illi->AI()->Talk(LORD_ILLIDAN_SAY_1);
return 5000;
break;
case 11:
- DoScriptText(OVERLORD_SAY_4, me, player);
+ Talk(OVERLORD_SAY_4, player->GetGUID());
return 6000;
break;
case 12:
- DoScriptText(LORD_ILLIDAN_SAY_2, Illi);
+ Illi->AI()->Talk(LORD_ILLIDAN_SAY_2);
return 5500;
break;
case 13:
- DoScriptText(LORD_ILLIDAN_SAY_3, Illi);
+ Illi->AI()->Talk(LORD_ILLIDAN_SAY_3);
return 4000;
break;
case 14:
@@ -837,7 +833,7 @@ public:
return 1500;
break;
case 15:
- DoScriptText(LORD_ILLIDAN_SAY_4, Illi);
+ Illi->AI()->Talk(LORD_ILLIDAN_SAY_4);
return 1500;
break;
case 16:
@@ -847,15 +843,15 @@ public:
return 5000;
break;
case 17:
- DoScriptText(LORD_ILLIDAN_SAY_5, Illi);
+ Illi->AI()->Talk(LORD_ILLIDAN_SAY_5);
return 5000;
break;
case 18:
- DoScriptText(LORD_ILLIDAN_SAY_6, Illi);
+ Illi->AI()->Talk(LORD_ILLIDAN_SAY_6);
return 5000;
break;
case 19:
- DoScriptText(LORD_ILLIDAN_SAY_7, Illi);
+ Illi->AI()->Talk(LORD_ILLIDAN_SAY_7);
return 5000;
break;
case 20:
@@ -864,7 +860,7 @@ public:
return 500;
break;
case 21:
- DoScriptText(OVERLORD_SAY_5, me);
+ Talk(OVERLORD_SAY_5);
return 500;
break;
case 22:
@@ -881,7 +877,7 @@ public:
return 5000;
break;
case 25:
- DoScriptText(OVERLORD_SAY_6, me);
+ Talk(OVERLORD_SAY_6);
return 2000;
break;
case 26:
@@ -905,24 +901,21 @@ public:
break;
case 29:
{
- Unit* Yarzill = me->FindNearestCreature(C_YARZILL, 50);
- if (Yarzill)
- DoScriptText(YARZILL_THE_MERC_SAY, Yarzill, player);
+ if (Creature* Yarzill = me->FindNearestCreature(C_YARZILL, 50.0f))
+ Yarzill->AI()->Talk(YARZILL_THE_MERC_SAY, player->GetGUID());
return 5000;
}
break;
case 30:
{
- Unit* Yarzill = me->FindNearestCreature(C_YARZILL, 50);
- if (Yarzill)
+ if (Creature* Yarzill = me->FindNearestCreature(C_YARZILL, 50.0f))
Yarzill->SetTarget(0);
return 5000;
}
break;
case 31:
{
- Unit* Yarzill = me->FindNearestCreature(C_YARZILL, 50);
- if (Yarzill)
+ if (Creature* Yarzill = me->FindNearestCreature(C_YARZILL, 50.0f))
Yarzill->CastSpell(player, 41540, true);
return 1000;
}
@@ -960,16 +953,13 @@ public:
enum eEarthmender
{
- SAY_WIL_START = -1000381,
- SAY_WIL_AGGRO1 = -1000382,
- SAY_WIL_AGGRO2 = -1000383,
- SAY_WIL_PROGRESS1 = -1000384,
- SAY_WIL_PROGRESS2 = -1000385,
- SAY_WIL_FIND_EXIT = -1000386,
- SAY_WIL_PROGRESS4 = -1000387,
- SAY_WIL_PROGRESS5 = -1000388,
- SAY_WIL_JUST_AHEAD = -1000389,
- SAY_WIL_END = -1000390,
+ SAY_WIL_START = 0,
+ SAY_WIL_AGGRO = 1,
+ SAY_WIL_PROGRESS1 = 2,
+ SAY_WIL_PROGRESS2 = 3,
+ SAY_WIL_FIND_EXIT = 4,
+ SAY_WIL_JUST_AHEAD = 5,
+ SAY_WIL_END = 6,
SPELL_CHAIN_LIGHTNING = 16006,
SPELL_EARTHBING_TOTEM = 15786,
@@ -990,7 +980,7 @@ public:
{
if (quest->GetQuestId() == QUEST_ESCAPE_COILSCAR)
{
- DoScriptText(SAY_WIL_START, creature, player);
+ creature->AI()->Talk(SAY_WIL_START, player->GetGUID());
creature->setFaction(FACTION_EARTHEN);
if (npc_earthmender_wildaAI* pEscortAI = CAST_AI(npc_earthmender_wilda::npc_earthmender_wildaAI, creature->AI()))
@@ -1024,14 +1014,14 @@ public:
switch (waypointId)
{
case 13:
- DoScriptText(SAY_WIL_PROGRESS1, me, player);
+ Talk(SAY_WIL_PROGRESS1, player->GetGUID());
DoSpawnAssassin();
break;
case 14:
DoSpawnAssassin();
break;
case 15:
- DoScriptText(SAY_WIL_FIND_EXIT, me, player);
+ Talk(SAY_WIL_FIND_EXIT, player->GetGUID());
break;
case 19:
DoRandomSay();
@@ -1058,7 +1048,7 @@ public:
DoSpawnAssassin();
break;
case 39:
- DoScriptText(SAY_WIL_JUST_AHEAD, me, player);
+ Talk(SAY_WIL_JUST_AHEAD, player->GetGUID());
break;
case 43:
DoRandomSay();
@@ -1067,7 +1057,7 @@ public:
DoSpawnAssassin();
break;
case 50:
- DoScriptText(SAY_WIL_END, me, player);
+ Talk(SAY_WIL_END, player->GetGUID());
player->GroupEventHappens(QUEST_ESCAPE_COILSCAR, me);
break;
}
@@ -1082,7 +1072,7 @@ public:
//this is very unclear, random say without no real relevance to script/event
void DoRandomSay()
{
- DoScriptText(RAND(SAY_WIL_PROGRESS2, SAY_WIL_PROGRESS4, SAY_WIL_PROGRESS5), me);
+ Talk(SAY_WIL_PROGRESS2);
}
void DoSpawnAssassin()
@@ -1102,7 +1092,7 @@ public:
{
//appears to be random
if (urand(0, 1))
- DoScriptText(RAND(SAY_WIL_AGGRO1, SAY_WIL_AGGRO2), who);
+ Talk(SAY_WIL_AGGRO);
}
}
@@ -1140,28 +1130,25 @@ npc_lord_illidan_stormrage : Creature that controls the event.
go_crystal_prison : GameObject that begins the event and hands out quest
EndContentData */
-#define END_TEXT -1000366 //signed for 10646
-
#define QUEST_BATTLE_OF_THE_CRIMSON_WATCH 10781
#define EVENT_AREA_RADIUS 65 //65yds
#define EVENT_COOLDOWN 30000 //in ms. appear after event completed or failed (should be = Adds despawn time)
struct TorlothCinematic
{
- int32 TextId;
uint32 creature, Timer;
};
// Creature 0 - Torloth, 1 - Illidan
static TorlothCinematic TorlothAnim[]=
{
- {-1000367, 0, 2000},
- {-1000368, 1, 7000},
- {-1000369, 0, 3000},
- {0, 0, 2000}, // Torloth stand
- {-1000370, 0, 1000},
- {0, 0, 3000},
- {0, 0, 0}
+ {0, 2000},
+ {1, 7000},
+ {0, 3000},
+ {0, 2000}, // Torloth stand
+ {0, 1000},
+ {0, 3000},
+ {0, 0}
};
struct Location
@@ -1195,15 +1182,14 @@ struct WaveData
{
uint8 SpawnCount, UsedSpawnPoint;
uint32 CreatureId, SpawnTimer, YellTimer;
- int32 WaveTextId;
};
static WaveData WavesInfo[]=
{
- {9, 0, 22075, 10000, 7000, -1000371}, //Illidari Soldier
- {2, 9, 22074, 10000, 7000, -1000372}, //Illidari Mind Breaker
- {4, 11, 19797, 10000, 7000, -1000373}, //Illidari Highlord
- {1, 15, 22076, 10000, 7000, -1000374} //Torloth The Magnificent
+ {9, 0, 22075, 10000, 7000}, //Illidari Soldier
+ {2, 9, 22074, 10000, 7000}, //Illidari Mind Breaker
+ {4, 11, 19797, 10000, 7000}, //Illidari Highlord
+ {1, 15, 22076, 10000, 7000} //Torloth The Magnificent
};
struct SpawnSpells
@@ -1278,9 +1264,6 @@ public:
return;
}
- if (TorlothAnim[AnimationCount].TextId)
- DoScriptText(TorlothAnim[AnimationCount].TextId, creature);
-
AnimationTimer = TorlothAnim[AnimationCount].Timer;
switch (AnimationCount)
@@ -1377,7 +1360,6 @@ public:
if (Creature* LordIllidan = (Unit::GetCreature(*me, LordIllidanGUID)))
{
- DoScriptText(END_TEXT, LordIllidan, killer);
LordIllidan->AI()->EnterEvadeMode();
}
}
@@ -1512,14 +1494,17 @@ public:
{
if (!Announced && AnnounceTimer <= diff)
{
- DoScriptText(WavesInfo[WaveCount].WaveTextId, me);
Announced = true;
- } else AnnounceTimer -= diff;
+ }
+ else
+ AnnounceTimer -= diff;
if (WaveTimer <= diff)
{
SummonNextWave();
- } else WaveTimer -= diff;
+ }
+ else
+ WaveTimer -= diff;
}
CheckEventFail();
diff --git a/src/server/scripts/Outland/shattrath_city.cpp b/src/server/scripts/Outland/shattrath_city.cpp
index 76cffa9e1fe..c45ad519d39 100644
--- a/src/server/scripts/Outland/shattrath_city.cpp
+++ b/src/server/scripts/Outland/shattrath_city.cpp
@@ -286,28 +286,32 @@ public:
# npc_kservant
######*/
-#define SAY1 -1000234
-#define WHISP1 -1000235
-#define WHISP2 -1000236
-#define WHISP3 -1000237
-#define WHISP4 -1000238
-#define WHISP5 -1000239
-#define WHISP6 -1000240
-#define WHISP7 -1000241
-#define WHISP8 -1000242
-#define WHISP9 -1000243
-#define WHISP10 -1000244
-#define WHISP11 -1000245
-#define WHISP12 -1000246
-#define WHISP13 -1000247
-#define WHISP14 -1000248
-#define WHISP15 -1000249
-#define WHISP16 -1000250
-#define WHISP17 -1000251
-#define WHISP18 -1000252
-#define WHISP19 -1000253
-#define WHISP20 -1000254
-#define WHISP21 -1000255
+enum KServant
+{
+ SAY1 = 0,
+ WHISP1 = 1,
+ WHISP2 = 2,
+ WHISP3 = 3,
+ WHISP4 = 4,
+ WHISP5 = 5,
+ WHISP6 = 6,
+ WHISP7 = 7,
+ WHISP8 = 8,
+ WHISP9 = 9,
+ WHISP10 = 10,
+ WHISP11 = 11,
+ WHISP12 = 12,
+ WHISP13 = 13,
+ WHISP14 = 14,
+ WHISP15 = 15,
+ WHISP16 = 16,
+ WHISP17 = 17,
+ WHISP18 = 18,
+ WHISP19 = 19,
+ WHISP20 = 20,
+ WHISP21 = 21
+};
+
class npc_kservant : public CreatureScript
{
public:
@@ -332,70 +336,70 @@ public:
switch (waypointId)
{
case 0:
- DoScriptText(SAY1, me, player);
+ Talk(SAY1, player->GetGUID());
break;
case 4:
- DoScriptText(WHISP1, me, player);
+ Talk(WHISP1, player->GetGUID());
break;
case 6:
- DoScriptText(WHISP2, me, player);
+ Talk(WHISP2, player->GetGUID());
break;
case 7:
- DoScriptText(WHISP3, me, player);
+ Talk(WHISP3, player->GetGUID());
break;
case 8:
- DoScriptText(WHISP4, me, player);
+ Talk(WHISP4, player->GetGUID());
break;
case 17:
- DoScriptText(WHISP5, me, player);
+ Talk(WHISP5, player->GetGUID());
break;
case 18:
- DoScriptText(WHISP6, me, player);
+ Talk(WHISP6, player->GetGUID());
break;
case 19:
- DoScriptText(WHISP7, me, player);
+ Talk(WHISP7, player->GetGUID());
break;
case 33:
- DoScriptText(WHISP8, me, player);
+ Talk(WHISP8, player->GetGUID());
break;
case 34:
- DoScriptText(WHISP9, me, player);
+ Talk(WHISP9, player->GetGUID());
break;
case 35:
- DoScriptText(WHISP10, me, player);
+ Talk(WHISP10, player->GetGUID());
break;
case 36:
- DoScriptText(WHISP11, me, player);
+ Talk(WHISP11, player->GetGUID());
break;
case 43:
- DoScriptText(WHISP12, me, player);
+ Talk(WHISP12, player->GetGUID());
break;
case 44:
- DoScriptText(WHISP13, me, player);
+ Talk(WHISP13, player->GetGUID());
break;
case 49:
- DoScriptText(WHISP14, me, player);
+ Talk(WHISP14, player->GetGUID());
break;
case 50:
- DoScriptText(WHISP15, me, player);
+ Talk(WHISP15, player->GetGUID());
break;
case 51:
- DoScriptText(WHISP16, me, player);
+ Talk(WHISP16, player->GetGUID());
break;
case 52:
- DoScriptText(WHISP17, me, player);
+ Talk(WHISP17, player->GetGUID());
break;
case 53:
- DoScriptText(WHISP18, me, player);
+ Talk(WHISP18, player->GetGUID());
break;
case 54:
- DoScriptText(WHISP19, me, player);
+ Talk(WHISP19, player->GetGUID());
break;
case 55:
- DoScriptText(WHISP20, me, player);
+ Talk(WHISP20, player->GetGUID());
break;
case 56:
- DoScriptText(WHISP21, me, player);
+ Talk(WHISP21, player->GetGUID());
player->GroupEventHappens(10211, me);
break;
}
@@ -429,16 +433,19 @@ public:
#define GOSSIP_BOOK "Ezekiel said that you might have a certain book..."
-#define SAY_1 -1000274
-#define SAY_2 -1000275
-#define SAY_3 -1000276
-#define SAY_4 -1000277
-#define SAY_5 -1000278
-#define SAY_GIVEUP -1000279
-
-#define QUEST_WBI 10231
-#define NPC_CREEPJACK 19726
-#define NPC_MALONE 19725
+enum DirtyLarry
+{
+ SAY_1 = 0,
+ SAY_2 = 1,
+ SAY_3 = 2,
+ SAY_4 = 3,
+ SAY_5 = 4,
+ SAY_GIVEUP = 5,
+
+ QUEST_WBI = 10231,
+ NPC_CREEPJACK = 19726,
+ NPC_MALONE = 19725
+};
class npc_dirty_larry : public CreatureScript
{
@@ -500,11 +507,11 @@ public:
if (Malone)
Malone->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); }return 2000;
- case 1: DoScriptText(SAY_1, me, player); return 3000;
- case 2: DoScriptText(SAY_2, me, player); return 5000;
- case 3: DoScriptText(SAY_3, me, player); return 2000;
- case 4: DoScriptText(SAY_4, me, player); return 2000;
- case 5: DoScriptText(SAY_5, me, player); return 2000;
+ case 1: Talk(SAY_1, player->GetGUID()); return 3000;
+ case 2: Talk(SAY_2, player->GetGUID()); return 5000;
+ case 3: Talk(SAY_3, player->GetGUID()); return 2000;
+ case 4: Talk(SAY_4, player->GetGUID()); return 2000;
+ case 5: Talk(SAY_5, player->GetGUID()); return 2000;
case 6: Attack = true; return 2000;
default: return 0;
}
@@ -572,7 +579,7 @@ public:
}
me->setFaction(1194);
Done = true;
- DoScriptText(SAY_GIVEUP, me, NULL);
+ Talk(SAY_GIVEUP);
me->DeleteThreatList();
me->CombatStop();
me->GetMotionMaster()->MoveTargetedHome();
diff --git a/src/server/scripts/Outland/terokkar_forest.cpp b/src/server/scripts/Outland/terokkar_forest.cpp
index 2298f676692..d1f37dd5bfc 100644
--- a/src/server/scripts/Outland/terokkar_forest.cpp
+++ b/src/server/scripts/Outland/terokkar_forest.cpp
@@ -45,14 +45,16 @@ EndContentData */
## mob_unkor_the_ruthless
######*/
-#define SAY_SUBMIT -1000194
+enum UnkorTheRuthless
+{
+ SAY_SUBMIT = 0,
-#define FACTION_HOSTILE 45
-#define FACTION_FRIENDLY 35
-#define QUEST_DONTKILLTHEFATONE 9889
+ FACTION_HOSTILE = 45,
+ FACTION_FRIENDLY = 35,
+ QUEST_DONTKILLTHEFATONE = 9889,
-#define SPELL_PULVERIZE 2676
-//#define SPELL_QUID9889 32174
+ SPELL_PULVERIZE = 2676
+};
class mob_unkor_the_ruthless : public CreatureScript
{
@@ -85,7 +87,7 @@ public:
void DoNice()
{
- DoScriptText(SAY_SUBMIT, me);
+ Talk(SAY_SUBMIT);
me->setFaction(FACTION_FRIENDLY);
me->SetStandState(UNIT_STAND_STATE_SIT);
me->RemoveAllAuras();
@@ -344,7 +346,7 @@ public:
enum eFloon
{
- SAY_FLOON_ATTACK = -1000195,
+ SAY_FLOON_ATTACK = 0,
SPELL_SILENCE = 6726,
SPELL_FROSTBOLT = 9672,
@@ -371,7 +373,7 @@ public:
{
player->CLOSE_GOSSIP_MENU();
creature->setFaction(FACTION_HOSTILE_FL);
- DoScriptText(SAY_FLOON_ATTACK, creature, player);
+ creature->AI()->Talk(SAY_FLOON_ATTACK, player->GetGUID());
creature->AI()->AttackStart(player);
}
return true;
@@ -447,10 +449,10 @@ public:
######*/
enum eIslaStarmaneData
{
- SAY_PROGRESS_1 = -1000571,
- SAY_PROGRESS_2 = -1000572,
- SAY_PROGRESS_3 = -1000573,
- SAY_PROGRESS_4 = -1000574,
+ SAY_PROGRESS_1 = 0,
+ SAY_PROGRESS_2 = 1,
+ SAY_PROGRESS_3 = 2,
+ SAY_PROGRESS_4 = 3,
QUEST_EFTW_H = 10052,
QUEST_EFTW_A = 10051,
@@ -480,16 +482,16 @@ public:
Cage->SetGoState(GO_STATE_ACTIVE);
break;
case 2:
- DoScriptText(SAY_PROGRESS_1, me, player);
+ Talk(SAY_PROGRESS_1, player->GetGUID());
break;
case 5:
- DoScriptText(SAY_PROGRESS_2, me, player);
+ Talk(SAY_PROGRESS_2, player->GetGUID());
break;
case 6:
- DoScriptText(SAY_PROGRESS_3, me, player);
+ Talk(SAY_PROGRESS_3, player->GetGUID());
break;
case 29:
- DoScriptText(SAY_PROGRESS_4, me, player);
+ Talk(SAY_PROGRESS_4, player->GetGUID());
if (player->GetTeam() == ALLIANCE)
player->GroupEventHappens(QUEST_EFTW_A, me);
else if (player->GetTeam() == HORDE)
diff --git a/src/server/scripts/Outland/zangarmarsh.cpp b/src/server/scripts/Outland/zangarmarsh.cpp
index 03e40b8d7dc..1fbb8a48324 100644
--- a/src/server/scripts/Outland/zangarmarsh.cpp
+++ b/src/server/scripts/Outland/zangarmarsh.cpp
@@ -45,9 +45,24 @@ EndContentData */
#define GOSSIP_ITEM_BLESS_ASH "Grant me your mark, wise ancient."
#define GOSSIP_ITEM_BLESS_KEL "Grant me your mark, mighty ancient."
-//signed for 17900 but used by 17900, 17901
-#define GOSSIP_REWARD_BLESS -1000359
-//#define TEXT_BLESSINGS "<You need higher standing with Cenarion Expedition to recive a blessing.>"
+
+enum AshyenAndKeleth
+{
+ GOSSIP_REWARD_BLESS = 0,
+
+ NPC_ASHYEN = 17900,
+ NPC_KELETH = 17901,
+
+ SPELL_BLESS_ASH_EXA = 31815,
+ SPELL_BLESS_ASH_REV = 31811,
+ SPELL_BLESS_ASH_HON = 31810,
+ SPELL_BLESS_ASH_FRI = 31808,
+
+ SPELL_BLESS_KEL_EXA = 31814,
+ SPELL_BLESS_KEL_REV = 31813,
+ SPELL_BLESS_KEL_HON = 31812,
+ SPELL_BLESS_KEL_FRI = 31807
+};
class npcs_ashyen_and_keleth : public CreatureScript
{
@@ -58,10 +73,10 @@ public:
{
if (player->GetReputationRank(942) > REP_NEUTRAL)
{
- if (creature->GetEntry() == 17900)
+ if (creature->GetEntry() == NPC_ASHYEN)
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BLESS_ASH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
- if (creature->GetEntry() == 17901)
+ if (creature->GetEntry() == NPC_KELETH)
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BLESS_KEL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
}
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
@@ -78,54 +93,60 @@ public:
creature->SetMaxPower(POWER_MANA, 200); //set a "fake" mana value, we can't depend on database doing it in this case
creature->SetPower(POWER_MANA, 200);
- if (creature->GetEntry() == 17900) //check which Creature we are dealing with
+ if (creature->GetEntry() == NPC_ASHYEN) //check which Creature we are dealing with
{
+ uint32 spell = 0;
switch (player->GetReputationRank(942))
{ //mark of lore
case REP_FRIENDLY:
- creature->CastSpell(player, 31808, true);
- DoScriptText(GOSSIP_REWARD_BLESS, creature);
+ spell = SPELL_BLESS_ASH_FRI;
break;
case REP_HONORED:
- creature->CastSpell(player, 31810, true);
- DoScriptText(GOSSIP_REWARD_BLESS, creature);
+ spell = SPELL_BLESS_ASH_HON;
break;
case REP_REVERED:
- creature->CastSpell(player, 31811, true);
- DoScriptText(GOSSIP_REWARD_BLESS, creature);
+ spell = SPELL_BLESS_ASH_REV;
break;
case REP_EXALTED:
- creature->CastSpell(player, 31815, true);
- DoScriptText(GOSSIP_REWARD_BLESS, creature);
+ spell = SPELL_BLESS_ASH_EXA;
break;
default:
break;
}
+
+ if (spell)
+ {
+ creature->CastSpell(player, spell, true);
+ creature->AI()->Talk(GOSSIP_REWARD_BLESS);
+ }
}
- if (creature->GetEntry() == 17901)
+ if (creature->GetEntry() == NPC_KELETH)
{
+ uint32 spell = 0;
switch (player->GetReputationRank(942)) //mark of war
{
case REP_FRIENDLY:
- creature->CastSpell(player, 31807, true);
- DoScriptText(GOSSIP_REWARD_BLESS, creature);
+ spell = SPELL_BLESS_KEL_FRI;
break;
case REP_HONORED:
- creature->CastSpell(player, 31812, true);
- DoScriptText(GOSSIP_REWARD_BLESS, creature);
+ spell = SPELL_BLESS_KEL_HON;
break;
case REP_REVERED:
- creature->CastSpell(player, 31813, true);
- DoScriptText(GOSSIP_REWARD_BLESS, creature);
+ spell = SPELL_BLESS_KEL_REV;
break;
case REP_EXALTED:
- creature->CastSpell(player, 31814, true);
- DoScriptText(GOSSIP_REWARD_BLESS, creature);
+ spell = SPELL_BLESS_KEL_EXA;
break;
default:
break;
}
+
+ if (spell)
+ {
+ creature->CastSpell(player, spell, true);
+ creature->AI()->Talk(GOSSIP_REWARD_BLESS);
+ }
}
player->CLOSE_GOSSIP_MENU();
player->TalkedToCreature(creature->GetEntry(), creature->GetGUID());
@@ -304,12 +325,11 @@ public:
enum eKayra
{
- SAY_START = -1000343,
- SAY_AMBUSH1 = -1000344,
- SAY_PROGRESS = -1000345,
- SAY_AMBUSH2 = -1000346,
- SAY_NEAR_END = -1000347,
- SAY_END = -1000348, //this is signed for 10646
+ SAY_START = 0,
+ SAY_AMBUSH1 = 1,
+ SAY_PROGRESS = 2,
+ SAY_AMBUSH2 = 3,
+ SAY_END = 4,
QUEST_ESCAPE_FROM = 9752,
NPC_SLAVEBINDER = 18042
@@ -335,25 +355,24 @@ public:
switch (waypointId)
{
case 4:
- DoScriptText(SAY_AMBUSH1, me, player);
+ Talk(SAY_AMBUSH1, player->GetGUID());
DoSpawnCreature(NPC_SLAVEBINDER, -10.0f, -5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
DoSpawnCreature(NPC_SLAVEBINDER, -8.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
break;
case 5:
- DoScriptText(SAY_PROGRESS, me, player);
+ Talk(SAY_PROGRESS, player->GetGUID());
SetRun();
break;
case 16:
- DoScriptText(SAY_AMBUSH2, me, player);
+ Talk(SAY_AMBUSH2, player->GetGUID());
DoSpawnCreature(NPC_SLAVEBINDER, -10.0f, -5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
DoSpawnCreature(NPC_SLAVEBINDER, -8.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
break;
case 17:
SetRun(false);
- DoScriptText(SAY_NEAR_END, me, player);
break;
case 25:
- DoScriptText(SAY_END, me, player);
+ Talk(SAY_END, player->GetGUID());
player->GroupEventHappens(QUEST_ESCAPE_FROM, me);
break;
}
@@ -364,7 +383,7 @@ public:
{
if (quest->GetQuestId() == QUEST_ESCAPE_FROM)
{
- DoScriptText(SAY_START, creature, player);
+ creature->AI()->Talk(SAY_START, player->GetGUID());
if (npc_escortAI* pEscortAI = CAST_AI(npc_kayra_longmane::npc_kayra_longmaneAI, creature->AI()))
pEscortAI->Start(false, false, player->GetGUID());
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index 026a0c7b280..77374932cbd 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -367,59 +367,9 @@ class spell_gen_remove_flight_auras : public SpellScriptLoader
}
};
-// 66118 Leeching Swarm
-enum LeechingSwarmSpells
-{
- SPELL_LEECHING_SWARM_DMG = 66240,
- SPELL_LEECHING_SWARM_HEAL = 66125,
-};
-
-class spell_gen_leeching_swarm : public SpellScriptLoader
-{
- public:
- spell_gen_leeching_swarm() : SpellScriptLoader("spell_gen_leeching_swarm") { }
-
- class spell_gen_leeching_swarm_AuraScript : public AuraScript
- {
- PrepareAuraScript(spell_gen_leeching_swarm_AuraScript);
-
- bool Validate(SpellInfo const* /*spellEntry*/)
- {
- if (!sSpellMgr->GetSpellInfo(SPELL_LEECHING_SWARM_DMG) || !sSpellMgr->GetSpellInfo(SPELL_LEECHING_SWARM_HEAL))
- return false;
- return true;
- }
-
- void HandleEffectPeriodic(AuraEffect const* aurEff)
- {
- Unit* caster = GetCaster();
- if (Unit* target = GetTarget())
- {
- int32 lifeLeeched = target->CountPctFromCurHealth(aurEff->GetAmount());
- if (lifeLeeched < 250)
- lifeLeeched = 250;
- // Damage
- caster->CastCustomSpell(target, SPELL_LEECHING_SWARM_DMG, &lifeLeeched, 0, 0, false);
- // Heal
- caster->CastCustomSpell(caster, SPELL_LEECHING_SWARM_HEAL, &lifeLeeched, 0, 0, false);
- }
- }
-
- void Register()
- {
- OnEffectPeriodic += AuraEffectPeriodicFn(spell_gen_leeching_swarm_AuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
- }
- };
-
- AuraScript* GetAuraScript() const
- {
- return new spell_gen_leeching_swarm_AuraScript();
- }
-};
-
enum EluneCandle
{
- NPC_OMEN = 15467,
+ NPC_OMEN = 15467,
SPELL_ELUNE_CANDLE_OMEN_HEAD = 26622,
SPELL_ELUNE_CANDLE_OMEN_CHEST = 26624,
@@ -483,128 +433,6 @@ class spell_gen_elune_candle : public SpellScriptLoader
}
};
-// 24750 Trick
-enum TrickSpells
-{
- SPELL_PIRATE_COSTUME_MALE = 24708,
- SPELL_PIRATE_COSTUME_FEMALE = 24709,
- SPELL_NINJA_COSTUME_MALE = 24710,
- SPELL_NINJA_COSTUME_FEMALE = 24711,
- SPELL_LEPER_GNOME_COSTUME_MALE = 24712,
- SPELL_LEPER_GNOME_COSTUME_FEMALE = 24713,
- SPELL_SKELETON_COSTUME = 24723,
- SPELL_GHOST_COSTUME_MALE = 24735,
- SPELL_GHOST_COSTUME_FEMALE = 24736,
- SPELL_TRICK_BUFF = 24753,
-};
-
-class spell_gen_trick : public SpellScriptLoader
-{
- public:
- spell_gen_trick() : SpellScriptLoader("spell_gen_trick") {}
-
- class spell_gen_trick_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_gen_trick_SpellScript);
- bool Validate(SpellInfo const* /*spellEntry*/)
- {
- if (!sSpellMgr->GetSpellInfo(SPELL_PIRATE_COSTUME_MALE) || !sSpellMgr->GetSpellInfo(SPELL_PIRATE_COSTUME_FEMALE) || !sSpellMgr->GetSpellInfo(SPELL_NINJA_COSTUME_MALE)
- || !sSpellMgr->GetSpellInfo(SPELL_NINJA_COSTUME_FEMALE) || !sSpellMgr->GetSpellInfo(SPELL_LEPER_GNOME_COSTUME_MALE) || !sSpellMgr->GetSpellInfo(SPELL_LEPER_GNOME_COSTUME_FEMALE)
- || !sSpellMgr->GetSpellInfo(SPELL_SKELETON_COSTUME) || !sSpellMgr->GetSpellInfo(SPELL_GHOST_COSTUME_MALE) || !sSpellMgr->GetSpellInfo(SPELL_GHOST_COSTUME_FEMALE) || !sSpellMgr->GetSpellInfo(SPELL_TRICK_BUFF))
- return false;
- return true;
- }
-
- void HandleScript(SpellEffIndex /*effIndex*/)
- {
- Unit* caster = GetCaster();
- if (Player* target = GetHitPlayer())
- {
- uint8 gender = target->getGender();
- uint32 spellId = SPELL_TRICK_BUFF;
- switch (urand(0, 5))
- {
- case 1:
- spellId = gender ? SPELL_LEPER_GNOME_COSTUME_FEMALE : SPELL_LEPER_GNOME_COSTUME_MALE;
- break;
- case 2:
- spellId = gender ? SPELL_PIRATE_COSTUME_FEMALE : SPELL_PIRATE_COSTUME_MALE;
- break;
- case 3:
- spellId = gender ? SPELL_GHOST_COSTUME_FEMALE : SPELL_GHOST_COSTUME_MALE;
- break;
- case 4:
- spellId = gender ? SPELL_NINJA_COSTUME_FEMALE : SPELL_NINJA_COSTUME_MALE;
- break;
- case 5:
- spellId = SPELL_SKELETON_COSTUME;
- break;
- default:
- break;
- }
-
- caster->CastSpell(target, spellId, true, NULL);
- }
- }
-
- void Register()
- {
- OnEffectHitTarget += SpellEffectFn(spell_gen_trick_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
- }
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_gen_trick_SpellScript();
- }
-};
-
-// 24751 Trick or Treat
-enum TrickOrTreatSpells
-{
- SPELL_TRICK = 24714,
- SPELL_TREAT = 24715,
- SPELL_TRICKED_OR_TREATED = 24755
-};
-
-class spell_gen_trick_or_treat : public SpellScriptLoader
-{
- public:
- spell_gen_trick_or_treat() : SpellScriptLoader("spell_gen_trick_or_treat") {}
-
- class spell_gen_trick_or_treat_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_gen_trick_or_treat_SpellScript);
-
- bool Validate(SpellInfo const* /*spellEntry*/)
- {
- if (!sSpellMgr->GetSpellInfo(SPELL_TRICK) || !sSpellMgr->GetSpellInfo(SPELL_TREAT) || !sSpellMgr->GetSpellInfo(SPELL_TRICKED_OR_TREATED))
- return false;
- return true;
- }
-
- void HandleScript(SpellEffIndex /*effIndex*/)
- {
- Unit* caster = GetCaster();
- if (Player* target = GetHitPlayer())
- {
- caster->CastSpell(target, roll_chance_i(50) ? SPELL_TRICK : SPELL_TREAT, true, NULL);
- caster->CastSpell(target, SPELL_TRICKED_OR_TREATED, true, NULL);
- }
- }
-
- void Register()
- {
- OnEffectHitTarget += SpellEffectFn(spell_gen_trick_or_treat_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
- }
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_gen_trick_or_treat_SpellScript();
- }
-};
-
class spell_creature_permanent_feign_death : public SpellScriptLoader
{
public:
@@ -1590,7 +1418,7 @@ class spell_gen_luck_of_the_draw : public SpellScriptLoader
if (group->isLFGGroup())
if (uint32 dungeonId = sLFGMgr->GetDungeon(group->GetGUID(), true))
if (LFGDungeonData const* dungeon = sLFGMgr->GetLFGDungeon(dungeonId))
- if (uint32(dungeon->map) == map->GetId() && dungeon->difficulty == uint32(map->GetDifficulty()))
+ if (uint32(dungeon->map) == map->GetId() && dungeon->difficulty == map->GetDifficulty())
if (randomDungeon && randomDungeon->type == LFG_TYPE_RANDOM)
return; // in correct dungeon
@@ -3305,6 +3133,61 @@ class spell_gen_gift_of_naaru : public SpellScriptLoader
}
};
+enum Replenishment
+{
+ SPELL_REPLENISHMENT = 57669,
+ SPELL_INFINITE_REPLENISHMENT = 61782
+};
+
+class spell_gen_replenishment : public SpellScriptLoader
+{
+ public:
+ spell_gen_replenishment() : SpellScriptLoader("spell_gen_replenishment") { }
+
+ class spell_gen_replenishment_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_gen_replenishment_AuraScript);
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_REPLENISHMENT) ||
+ !sSpellMgr->GetSpellInfo(SPELL_INFINITE_REPLENISHMENT))
+ return false;
+ return true;
+ }
+
+ bool Load()
+ {
+ return GetUnitOwner()->GetPower(POWER_MANA);
+ }
+
+ void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
+ {
+ switch (GetSpellInfo()->Id)
+ {
+ case SPELL_REPLENISHMENT:
+ amount = GetUnitOwner()->GetMaxPower(POWER_MANA) * 0.002f;
+ break;
+ case SPELL_INFINITE_REPLENISHMENT:
+ amount = GetUnitOwner()->GetMaxPower(POWER_MANA) * 0.0025f;
+ break;
+ default:
+ break;
+ }
+ }
+
+ void Register()
+ {
+ DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_gen_replenishment_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_PERIODIC_ENERGIZE);
+ }
+ };
+
+ AuraScript* GetAuraScript() const
+ {
+ return new spell_gen_replenishment_AuraScript();
+ }
+};
+
void AddSC_generic_spell_scripts()
{
new spell_gen_absorb0_hitlimit1();
@@ -3312,12 +3195,9 @@ void AddSC_generic_spell_scripts()
new spell_gen_av_drekthar_presence();
new spell_gen_burn_brutallus();
new spell_gen_cannibalize();
- new spell_gen_leeching_swarm();
new spell_gen_parachute();
new spell_gen_pet_summoned();
new spell_gen_remove_flight_auras();
- new spell_gen_trick();
- new spell_gen_trick_or_treat();
new spell_creature_permanent_feign_death();
new spell_pvp_trinket_wotf_shared_cd();
new spell_gen_animal_blood();
@@ -3381,4 +3261,5 @@ void AddSC_generic_spell_scripts()
new spell_gen_upper_deck_create_foam_sword();
new spell_gen_bonked();
new spell_gen_gift_of_naaru();
+ new spell_gen_replenishment();
}
diff --git a/src/server/scripts/Spells/spell_holiday.cpp b/src/server/scripts/Spells/spell_holiday.cpp
index 5b1cbe0c36a..40cef99048f 100644
--- a/src/server/scripts/Spells/spell_holiday.cpp
+++ b/src/server/scripts/Spells/spell_holiday.cpp
@@ -110,7 +110,241 @@ class spell_love_is_in_the_air_romantic_picnic : public SpellScriptLoader
}
};
+// 24750 Trick
+enum TrickSpells
+{
+ SPELL_PIRATE_COSTUME_MALE = 24708,
+ SPELL_PIRATE_COSTUME_FEMALE = 24709,
+ SPELL_NINJA_COSTUME_MALE = 24710,
+ SPELL_NINJA_COSTUME_FEMALE = 24711,
+ SPELL_LEPER_GNOME_COSTUME_MALE = 24712,
+ SPELL_LEPER_GNOME_COSTUME_FEMALE = 24713,
+ SPELL_SKELETON_COSTUME = 24723,
+ SPELL_GHOST_COSTUME_MALE = 24735,
+ SPELL_GHOST_COSTUME_FEMALE = 24736,
+ SPELL_TRICK_BUFF = 24753,
+};
+
+class spell_hallow_end_trick : public SpellScriptLoader
+{
+ public:
+ spell_hallow_end_trick() : SpellScriptLoader("spell_hallow_end_trick") { }
+
+ class spell_hallow_end_trick_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_hallow_end_trick_SpellScript);
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_PIRATE_COSTUME_MALE) || !sSpellMgr->GetSpellInfo(SPELL_PIRATE_COSTUME_FEMALE) || !sSpellMgr->GetSpellInfo(SPELL_NINJA_COSTUME_MALE)
+ || !sSpellMgr->GetSpellInfo(SPELL_NINJA_COSTUME_FEMALE) || !sSpellMgr->GetSpellInfo(SPELL_LEPER_GNOME_COSTUME_MALE) || !sSpellMgr->GetSpellInfo(SPELL_LEPER_GNOME_COSTUME_FEMALE)
+ || !sSpellMgr->GetSpellInfo(SPELL_SKELETON_COSTUME) || !sSpellMgr->GetSpellInfo(SPELL_GHOST_COSTUME_MALE) || !sSpellMgr->GetSpellInfo(SPELL_GHOST_COSTUME_FEMALE) || !sSpellMgr->GetSpellInfo(SPELL_TRICK_BUFF))
+ return false;
+ return true;
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+ if (Player* target = GetHitPlayer())
+ {
+ uint8 gender = target->getGender();
+ uint32 spellId = SPELL_TRICK_BUFF;
+ switch (urand(0, 5))
+ {
+ case 1:
+ spellId = gender ? SPELL_LEPER_GNOME_COSTUME_FEMALE : SPELL_LEPER_GNOME_COSTUME_MALE;
+ break;
+ case 2:
+ spellId = gender ? SPELL_PIRATE_COSTUME_FEMALE : SPELL_PIRATE_COSTUME_MALE;
+ break;
+ case 3:
+ spellId = gender ? SPELL_GHOST_COSTUME_FEMALE : SPELL_GHOST_COSTUME_MALE;
+ break;
+ case 4:
+ spellId = gender ? SPELL_NINJA_COSTUME_FEMALE : SPELL_NINJA_COSTUME_MALE;
+ break;
+ case 5:
+ spellId = SPELL_SKELETON_COSTUME;
+ break;
+ default:
+ break;
+ }
+
+ caster->CastSpell(target, spellId, true, NULL);
+ }
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_hallow_end_trick_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_hallow_end_trick_SpellScript();
+ }
+};
+
+// 24751 Trick or Treat
+enum TrickOrTreatSpells
+{
+ SPELL_TRICK = 24714,
+ SPELL_TREAT = 24715,
+ SPELL_TRICKED_OR_TREATED = 24755,
+ SPELL_TRICKY_TREAT_SPEED = 42919,
+ SPELL_TRICKY_TREAT_TRIGGER = 42965,
+ SPELL_UPSET_TUMMY = 42966
+};
+
+class spell_hallow_end_trick_or_treat : public SpellScriptLoader
+{
+ public:
+ spell_hallow_end_trick_or_treat() : SpellScriptLoader("spell_hallow_end_trick_or_treat") {}
+
+ class spell_hallow_end_trick_or_treat_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_hallow_end_trick_or_treat_SpellScript);
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_TRICK) || !sSpellMgr->GetSpellInfo(SPELL_TREAT) || !sSpellMgr->GetSpellInfo(SPELL_TRICKED_OR_TREATED))
+ return false;
+ return true;
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+ if (Player* target = GetHitPlayer())
+ {
+ caster->CastSpell(target, roll_chance_i(50) ? SPELL_TRICK : SPELL_TREAT, true, NULL);
+ caster->CastSpell(target, SPELL_TRICKED_OR_TREATED, true, NULL);
+ }
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_hallow_end_trick_or_treat_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_hallow_end_trick_or_treat_SpellScript();
+ }
+};
+
+class spell_hallow_end_tricky_treat : public SpellScriptLoader
+{
+ public:
+ spell_hallow_end_tricky_treat() : SpellScriptLoader("spell_hallow_end_tricky_treat") { }
+
+ class spell_hallow_end_tricky_treat_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_hallow_end_tricky_treat_SpellScript);
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_TRICKY_TREAT_SPEED))
+ return false;
+ if (!sSpellMgr->GetSpellInfo(SPELL_TRICKY_TREAT_TRIGGER))
+ return false;
+ if (!sSpellMgr->GetSpellInfo(SPELL_UPSET_TUMMY))
+ return false;
+ return true;
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+ if (caster->HasAura(SPELL_TRICKY_TREAT_TRIGGER) && caster->GetAuraCount(SPELL_TRICKY_TREAT_SPEED) > 3 && roll_chance_i(33))
+ caster->CastSpell(caster, SPELL_UPSET_TUMMY, true);
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_hallow_end_tricky_treat_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_hallow_end_tricky_treat_SpellScript();
+ }
+};
+
+enum Mistletoe
+{
+ SPELL_CREATE_MISTLETOE = 26206,
+ SPELL_CREATE_HOLLY = 26207,
+ SPELL_CREATE_SNOWFLAKES = 45036
+};
+
+class spell_winter_veil_mistletoe : public SpellScriptLoader
+{
+ public:
+ spell_winter_veil_mistletoe() : SpellScriptLoader("spell_winter_veil_mistletoe") { }
+
+ class spell_winter_veil_mistletoe_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_winter_veil_mistletoe_SpellScript);
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_CREATE_MISTLETOE) ||
+ !sSpellMgr->GetSpellInfo(SPELL_CREATE_HOLLY) ||
+ !sSpellMgr->GetSpellInfo(SPELL_CREATE_SNOWFLAKES))
+ return false;
+ return true;
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+
+ if (Player* target = GetHitPlayer())
+ {
+ uint32 spellId = 0;
+ switch (urand(0, 2))
+ {
+ case 0:
+ spellId = SPELL_CREATE_MISTLETOE;
+ break;
+ case 1:
+ spellId = SPELL_CREATE_HOLLY;
+ break;
+ case 2:
+ spellId = SPELL_CREATE_SNOWFLAKES;
+ break;
+ default:
+ return;
+ }
+
+ caster->CastSpell(target, spellId, true);
+ }
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_winter_veil_mistletoe_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_winter_veil_mistletoe_SpellScript();
+ }
+};
+
void AddSC_holiday_spell_scripts()
{
+ // Love is in the Air
new spell_love_is_in_the_air_romantic_picnic();
+ // Hallow's End
+ new spell_hallow_end_trick();
+ new spell_hallow_end_trick_or_treat();
+ new spell_hallow_end_tricky_treat();
+ // Winter Veil
+ new spell_winter_veil_mistletoe();
}
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp
index a73af6892ca..a5122ff5f08 100644
--- a/src/server/scripts/Spells/spell_hunter.cpp
+++ b/src/server/scripts/Spells/spell_hunter.cpp
@@ -706,6 +706,36 @@ class spell_hun_tame_beast : public SpellScriptLoader
}
};
+class spell_hun_target_only_pet_and_owner : public SpellScriptLoader
+{
+ public:
+ spell_hun_target_only_pet_and_owner() : SpellScriptLoader("spell_hun_target_only_pet_and_owner") { }
+
+ class spell_hun_target_only_pet_and_owner_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_hun_target_only_pet_and_owner_SpellScript);
+
+ void FilterTargets(std::list<WorldObject*>& targets)
+ {
+ targets.clear();
+ targets.push_back(GetCaster());
+ if (Unit* owner = GetCaster()->GetOwner())
+ targets.push_back(owner);
+ }
+
+ void Register()
+ {
+ OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_hun_target_only_pet_and_owner_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_CASTER_AREA_PARTY);
+ OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_hun_target_only_pet_and_owner_SpellScript::FilterTargets, EFFECT_1, TARGET_UNIT_CASTER_AREA_PARTY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_hun_target_only_pet_and_owner_SpellScript();
+ }
+};
+
void AddSC_hunter_spell_scripts()
{
new spell_hun_aspect_of_the_beast();
@@ -722,4 +752,5 @@ void AddSC_hunter_spell_scripts()
new spell_hun_misdirection_proc();
new spell_hun_disengage();
new spell_hun_tame_beast();
+ new spell_hun_target_only_pet_and_owner();
}
diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp
index a15eb7ddc2c..2feb6e2b6ef 100644
--- a/src/server/scripts/Spells/spell_priest.cpp
+++ b/src/server/scripts/Spells/spell_priest.cpp
@@ -376,14 +376,14 @@ class spell_pri_vampiric_touch : public SpellScriptLoader
}
};
-class spell_priest_renew : public SpellScriptLoader
+class spell_pri_renew : public SpellScriptLoader
{
public:
- spell_priest_renew() : SpellScriptLoader("spell_priest_renew") { }
+ spell_pri_renew() : SpellScriptLoader("spell_pri_renew") { }
- class spell_priest_renew_AuraScript : public AuraScript
+ class spell_pri_renew_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_priest_renew_AuraScript);
+ PrepareAuraScript(spell_pri_renew_AuraScript);
bool Load()
{
@@ -408,13 +408,13 @@ class spell_priest_renew : public SpellScriptLoader
void Register()
{
- OnEffectApply += AuraEffectApplyFn(spell_priest_renew_AuraScript::HandleApplyEffect, EFFECT_0, SPELL_AURA_PERIODIC_HEAL, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
+ OnEffectApply += AuraEffectApplyFn(spell_pri_renew_AuraScript::HandleApplyEffect, EFFECT_0, SPELL_AURA_PERIODIC_HEAL, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
}
};
AuraScript* GetAuraScript() const
{
- return new spell_priest_renew_AuraScript();
+ return new spell_pri_renew_AuraScript();
}
};
@@ -460,6 +460,6 @@ void AddSC_priest_spell_scripts()
new spell_pri_mind_sear();
new spell_pri_prayer_of_mending_heal();
new spell_pri_vampiric_touch();
- new spell_priest_renew();
+ new spell_pri_renew();
new spell_pri_shadow_word_death();
}
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp
index da80ec8f1da..58b6fca8a81 100644
--- a/src/server/scripts/Spells/spell_quest.cpp
+++ b/src/server/scripts/Spells/spell_quest.cpp
@@ -1432,7 +1432,7 @@ class spell_q11010_q11102_q11023_choose_loc : public SpellScriptLoader
Unit* caster = GetCaster();
// Check for player that is in 65 y range
std::list<Player*> playerList;
- Trinity::AnyPlayerInObjectRangeCheck checker(caster, 765.0f);
+ Trinity::AnyPlayerInObjectRangeCheck checker(caster, 65.0f);
Trinity::PlayerListSearcher<Trinity::AnyPlayerInObjectRangeCheck> searcher(caster, playerList, checker);
caster->VisitNearbyWorldObject(65.0f, searcher);
for (std::list<Player*>::const_iterator itr = playerList.begin(); itr != playerList.end(); ++itr)
diff --git a/src/server/scripts/World/achievement_scripts.cpp b/src/server/scripts/World/achievement_scripts.cpp
index 178df2078f8..178df2078f8 100755..100644
--- a/src/server/scripts/World/achievement_scripts.cpp
+++ b/src/server/scripts/World/achievement_scripts.cpp
diff --git a/src/server/scripts/World/chat_log.cpp b/src/server/scripts/World/chat_log.cpp
index 236436b229b..236436b229b 100755..100644
--- a/src/server/scripts/World/chat_log.cpp
+++ b/src/server/scripts/World/chat_log.cpp
diff --git a/src/server/scripts/World/guards.cpp b/src/server/scripts/World/guards.cpp
index 951c0ed9688..8fc63a1eacf 100644
--- a/src/server/scripts/World/guards.cpp
+++ b/src/server/scripts/World/guards.cpp
@@ -39,9 +39,7 @@ enum GuardGeneric
{
GENERIC_CREATURE_COOLDOWN = 5000,
- SAY_GUARD_SIL_AGGRO1 = -1070001,
- SAY_GUARD_SIL_AGGRO2 = -1070002,
- SAY_GUARD_SIL_AGGRO3 = -1070003,
+ SAY_GUARD_SIL_AGGRO = 0,
NPC_CENARION_HOLD_INFANTRY = 15184,
NPC_STORMWIND_CITY_GUARD = 68,
@@ -67,7 +65,7 @@ public:
void EnterCombat(Unit* who)
{
if (me->GetEntry() == NPC_CENARION_HOLD_INFANTRY)
- DoScriptText(RAND(SAY_GUARD_SIL_AGGRO1, SAY_GUARD_SIL_AGGRO2, SAY_GUARD_SIL_AGGRO3), me, who);
+ Talk(SAY_GUARD_SIL_AGGRO, who->GetGUID());
if (SpellInfo const* spell = me->reachWithSpellAttack(who))
DoCast(who, spell->Id);
}
diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp
index 4e0818c7c82..4524a3a9374 100644
--- a/src/server/scripts/World/npc_professions.cpp
+++ b/src/server/scripts/World/npc_professions.cpp
@@ -785,7 +785,7 @@ enum eEngineeringTrinkets
SPELL_TO_TOSHLEY = 36955,
};
-#define GOSSIP_ITEM_ZAP "[PH] Unknown"
+#define GOSSIP_ITEM_ZAP "This Dimensional Imploder sounds dangerous! How can I make one?"
#define GOSSIP_ITEM_JHORDY "I must build a beacon for this marvelous device!"
#define GOSSIP_ITEM_KABLAM "[PH] Unknown"
@@ -819,7 +819,7 @@ public:
switch (creature->GetEntry())
{
case NPC_ZAP:
- canLearn = CanLearn(player, 7249, 0, 260, S_GOBLIN, SPELL_TO_EVERLOOK, npcTextId);
+ canLearn = CanLearn(player, 6092, 0, 260, S_GOBLIN, SPELL_TO_EVERLOOK, npcTextId);
if (canLearn)
gossipItem = GOSSIP_ITEM_ZAP;
break;
diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
index b38530b2a4a..36657dc76c3 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -313,12 +313,16 @@ public:
# npc_chicken_cluck
#########*/
-#define EMOTE_HELLO -1070004
-#define EMOTE_CLUCK_TEXT -1070006
+enum ChickenCluck
+{
+ EMOTE_HELLO_A = 0,
+ EMOTE_HELLO_H = 1,
+ EMOTE_CLUCK_TEXT = 2,
-#define QUEST_CLUCK 3861
-#define FACTION_FRIENDLY 35
-#define FACTION_CHICKEN 31
+ QUEST_CLUCK = 3861,
+ FACTION_FRIENDLY = 35,
+ FACTION_CHICKEN = 31
+};
class npc_chicken_cluck : public CreatureScript
{
@@ -367,7 +371,7 @@ public:
{
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
me->setFaction(FACTION_FRIENDLY);
- DoScriptText(EMOTE_HELLO, me);
+ Talk(player->GetTeam() == HORDE ? EMOTE_HELLO_H : EMOTE_HELLO_A);
}
break;
case TEXT_EMOTE_CHEER:
@@ -375,7 +379,7 @@ public:
{
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
me->setFaction(FACTION_FRIENDLY);
- DoScriptText(EMOTE_CLUCK_TEXT, me);
+ Talk(EMOTE_CLUCK_TEXT);
}
break;
}
@@ -500,15 +504,15 @@ public:
## Triage quest
######*/
-//signed for 9623
-#define SAY_DOC1 -1000201
-#define SAY_DOC2 -1000202
-#define SAY_DOC3 -1000203
+enum Doctor
+{
+ SAY_DOC = 0,
-#define DOCTOR_ALLIANCE 12939
-#define DOCTOR_HORDE 12920
-#define ALLIANCE_COORDS 7
-#define HORDE_COORDS 6
+ DOCTOR_ALLIANCE = 12939,
+ DOCTOR_HORDE = 12920,
+ ALLIANCE_COORDS = 7,
+ HORDE_COORDS = 6
+};
struct Location
{
@@ -773,7 +777,7 @@ public:
//stand up
me->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_STAND);
- DoScriptText(RAND(SAY_DOC1, SAY_DOC2, SAY_DOC3), me);
+ Talk(SAY_DOC);
uint32 mobId = me->GetEntry();
me->SetWalk(false);
@@ -879,7 +883,7 @@ void npc_doctor::npc_doctorAI::UpdateAI(uint32 const diff)
//TODO: get text for each NPC
-enum eGarments
+enum Garments
{
SPELL_LESSER_HEAL_R2 = 2052,
SPELL_FORTITUDE_R1 = 1243,
@@ -896,18 +900,10 @@ enum eGarments
ENTRY_KORJA = 12430,
ENTRY_DG_KEL = 12428,
- //used by 12429, 12423, 12427, 12430, 12428, but signed for 12429
- SAY_COMMON_HEALED = -1000164,
- SAY_DG_KEL_THANKS = -1000165,
- SAY_DG_KEL_GOODBYE = -1000166,
- SAY_ROBERTS_THANKS = -1000167,
- SAY_ROBERTS_GOODBYE = -1000168,
- SAY_KORJA_THANKS = -1000169,
- SAY_KORJA_GOODBYE = -1000170,
- SAY_DOLF_THANKS = -1000171,
- SAY_DOLF_GOODBYE = -1000172,
- SAY_SHAYA_THANKS = -1000173,
- SAY_SHAYA_GOODBYE = -1000174, //signed for 21469
+ // used by 12429, 12423, 12427, 12430, 12428, but signed for 12429
+ SAY_THANKS = 0,
+ SAY_GOODBYE = 1,
+ SAY_HEALED = 2,
};
class npc_garments_of_quests : public CreatureScript
@@ -917,7 +913,10 @@ public:
struct npc_garments_of_questsAI : public npc_escortAI
{
- npc_garments_of_questsAI(Creature* creature) : npc_escortAI(creature) {Reset();}
+ npc_garments_of_questsAI(Creature* creature) : npc_escortAI(creature)
+ {
+ Reset();
+ }
uint64 CasterGUID;
@@ -936,15 +935,15 @@ public:
RunAwayTimer = 5000;
me->SetStandState(UNIT_STAND_STATE_KNEEL);
- //expect database to have RegenHealth=0
+ // expect database to have RegenHealth=0
me->SetHealth(me->CountPctFromMaxHealth(70));
}
- void EnterCombat(Unit* /*who*/) {}
+ void EnterCombat(Unit* /*who*/) { }
- void SpellHit(Unit* caster, SpellInfo const* Spell)
+ void SpellHit(Unit* caster, SpellInfo const* spell)
{
- if (Spell->Id == SPELL_LESSER_HEAL_R2 || Spell->Id == SPELL_FORTITUDE_R1)
+ if (spell->Id == SPELL_LESSER_HEAL_R2 || spell->Id == SPELL_FORTITUDE_R1)
{
//not while in combat
if (me->isInCombat())
@@ -961,16 +960,16 @@ public:
case ENTRY_SHAYA:
if (player->GetQuestStatus(QUEST_MOON) == QUEST_STATUS_INCOMPLETE)
{
- if (IsHealed && !CanRun && Spell->Id == SPELL_FORTITUDE_R1)
+ if (IsHealed && !CanRun && spell->Id == SPELL_FORTITUDE_R1)
{
- DoScriptText(SAY_SHAYA_THANKS, me, caster);
+ Talk(SAY_THANKS, caster->GetGUID());
CanRun = true;
}
- else if (!IsHealed && Spell->Id == SPELL_LESSER_HEAL_R2)
+ else if (!IsHealed && spell->Id == SPELL_LESSER_HEAL_R2)
{
CasterGUID = caster->GetGUID();
me->SetStandState(UNIT_STAND_STATE_STAND);
- DoScriptText(SAY_COMMON_HEALED, me, caster);
+ Talk(SAY_HEALED, caster->GetGUID());
IsHealed = true;
}
}
@@ -978,16 +977,16 @@ public:
case ENTRY_ROBERTS:
if (player->GetQuestStatus(QUEST_LIGHT_1) == QUEST_STATUS_INCOMPLETE)
{
- if (IsHealed && !CanRun && Spell->Id == SPELL_FORTITUDE_R1)
+ if (IsHealed && !CanRun && spell->Id == SPELL_FORTITUDE_R1)
{
- DoScriptText(SAY_ROBERTS_THANKS, me, caster);
+ Talk(SAY_THANKS, caster->GetGUID());
CanRun = true;
}
- else if (!IsHealed && Spell->Id == SPELL_LESSER_HEAL_R2)
+ else if (!IsHealed && spell->Id == SPELL_LESSER_HEAL_R2)
{
CasterGUID = caster->GetGUID();
me->SetStandState(UNIT_STAND_STATE_STAND);
- DoScriptText(SAY_COMMON_HEALED, me, caster);
+ Talk(SAY_HEALED, caster->GetGUID());
IsHealed = true;
}
}
@@ -995,16 +994,16 @@ public:
case ENTRY_DOLF:
if (player->GetQuestStatus(QUEST_LIGHT_2) == QUEST_STATUS_INCOMPLETE)
{
- if (IsHealed && !CanRun && Spell->Id == SPELL_FORTITUDE_R1)
+ if (IsHealed && !CanRun && spell->Id == SPELL_FORTITUDE_R1)
{
- DoScriptText(SAY_DOLF_THANKS, me, caster);
+ Talk(SAY_THANKS, caster->GetGUID());
CanRun = true;
}
- else if (!IsHealed && Spell->Id == SPELL_LESSER_HEAL_R2)
+ else if (!IsHealed && spell->Id == SPELL_LESSER_HEAL_R2)
{
CasterGUID = caster->GetGUID();
me->SetStandState(UNIT_STAND_STATE_STAND);
- DoScriptText(SAY_COMMON_HEALED, me, caster);
+ Talk(SAY_HEALED, caster->GetGUID());
IsHealed = true;
}
}
@@ -1012,16 +1011,16 @@ public:
case ENTRY_KORJA:
if (player->GetQuestStatus(QUEST_SPIRIT) == QUEST_STATUS_INCOMPLETE)
{
- if (IsHealed && !CanRun && Spell->Id == SPELL_FORTITUDE_R1)
+ if (IsHealed && !CanRun && spell->Id == SPELL_FORTITUDE_R1)
{
- DoScriptText(SAY_KORJA_THANKS, me, caster);
+ Talk(SAY_THANKS, caster->GetGUID());
CanRun = true;
}
- else if (!IsHealed && Spell->Id == SPELL_LESSER_HEAL_R2)
+ else if (!IsHealed && spell->Id == SPELL_LESSER_HEAL_R2)
{
CasterGUID = caster->GetGUID();
me->SetStandState(UNIT_STAND_STATE_STAND);
- DoScriptText(SAY_COMMON_HEALED, me, caster);
+ Talk(SAY_HEALED, caster->GetGUID());
IsHealed = true;
}
}
@@ -1029,23 +1028,23 @@ public:
case ENTRY_DG_KEL:
if (player->GetQuestStatus(QUEST_DARKNESS) == QUEST_STATUS_INCOMPLETE)
{
- if (IsHealed && !CanRun && Spell->Id == SPELL_FORTITUDE_R1)
+ if (IsHealed && !CanRun && spell->Id == SPELL_FORTITUDE_R1)
{
- DoScriptText(SAY_DG_KEL_THANKS, me, caster);
+ Talk(SAY_THANKS, caster->GetGUID());
CanRun = true;
}
- else if (!IsHealed && Spell->Id == SPELL_LESSER_HEAL_R2)
+ else if (!IsHealed && spell->Id == SPELL_LESSER_HEAL_R2)
{
CasterGUID = caster->GetGUID();
me->SetStandState(UNIT_STAND_STATE_STAND);
- DoScriptText(SAY_COMMON_HEALED, me, caster);
+ Talk(SAY_HEALED, caster->GetGUID());
IsHealed = true;
}
}
break;
}
- //give quest credit, not expect any special quest objectives
+ // give quest credit, not expect any special quest objectives
if (CanRun)
player->TalkedToCreature(me->GetEntry(), me->GetGUID());
}
@@ -1068,19 +1067,19 @@ public:
switch (me->GetEntry())
{
case ENTRY_SHAYA:
- DoScriptText(SAY_SHAYA_GOODBYE, me, unit);
+ Talk(SAY_GOODBYE, unit->GetGUID());
break;
case ENTRY_ROBERTS:
- DoScriptText(SAY_ROBERTS_GOODBYE, me, unit);
+ Talk(SAY_GOODBYE, unit->GetGUID());
break;
case ENTRY_DOLF:
- DoScriptText(SAY_DOLF_GOODBYE, me, unit);
+ Talk(SAY_GOODBYE, unit->GetGUID());
break;
case ENTRY_KORJA:
- DoScriptText(SAY_KORJA_GOODBYE, me, unit);
+ Talk(SAY_GOODBYE, unit->GetGUID());
break;
case ENTRY_DG_KEL:
- DoScriptText(SAY_DG_KEL_GOODBYE, me, unit);
+ Talk(SAY_GOODBYE, unit->GetGUID());
break;
}
@@ -1587,49 +1586,6 @@ public:
}
};
-/*####
-## npc_winter_reveler
-####*/
-
-enum WinterReveler
-{
- SPELL_MISTLETOE_DEBUFF = 26218,
- SPELL_CREATE_MISTLETOE = 26206,
- SPELL_CREATE_HOLLY = 26207,
- SPELL_CREATE_SNOWFLAKES = 45036,
-};
-
-class npc_winter_reveler : public CreatureScript
-{
- public:
- npc_winter_reveler() : CreatureScript("npc_winter_reveler") { }
-
- struct npc_winter_revelerAI : public ScriptedAI
- {
- npc_winter_revelerAI(Creature* creature) : ScriptedAI(creature) {}
-
- void ReceiveEmote(Player* player, uint32 emote)
- {
- if (player->HasAura(SPELL_MISTLETOE_DEBUFF))
- return;
-
- if (!IsHolidayActive(HOLIDAY_FEAST_OF_WINTER_VEIL))
- return;
-
- if (emote == TEXT_EMOTE_KISS)
- {
- uint32 spellId = RAND<uint32>(SPELL_CREATE_MISTLETOE, SPELL_CREATE_HOLLY, SPELL_CREATE_SNOWFLAKES);
- me->CastSpell(player, spellId, false);
- me->CastSpell(player, SPELL_MISTLETOE_DEBUFF, false);
- }
- }
- };
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new npc_winter_revelerAI(creature);
- }
-};
/*####
## npc_snake_trap_serpents
@@ -2951,7 +2907,7 @@ public:
me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
}
- void EnterCombat(Unit * /*who*/) { }
+ void EnterCombat(Unit* /*who*/) { }
void DoAction(const int32 /*param*/)
{
@@ -3040,7 +2996,6 @@ void AddSC_npcs_special()
new npc_sayge();
new npc_steam_tonk();
new npc_tonk_mine();
- new npc_winter_reveler();
new npc_brewfest_reveler();
new npc_snake_trap();
new npc_mirror_image();